Proposed new kernel noncaching memory allocator for the 405gp

Ralph Blach rblach at intrex.net
Fri Mar 23 04:46:03 EST 2001


Dan,

I forsee using these for
Descriptors that must be read and written by the processor and need atomic
updating.
Using these in the OHCI driver would greatly simply the driver because the
TD would not be cached.
Data should always be flushed and never allocated no-cache.

Where are these functions that you say you have implemented?

Chip

Dan Malek wrote:

> Ralph Blach wrote:
>
> > I propose a kmalloc_noncache and a kfree_noncached.
> >
> > These would be module and would be loaded when necessary.  They would
> > operate allocating say 16k (could be any size)  of memory during boot
> > time
> > and then mapping it non cached.
>
> That's a simplistic start, but not the right implementation.  It
> should be a clone of kmalloc/kfree that will dynamically allocate
> and free pages when necessary.  I've implemented the simplistic
> version of these functions specifically for the MPC8xx CPM and
> associated drivers, just copy those and use them if you want.
>
> You have to carefully trade off using uncached memory against the
> cache management (flush, invalidate, etc.) functions.  Using uncached
> memory is a significant performance loss, and I know the USB is
> already implemented to use cached memory and the management functions.
> This works on all of the existing processor architectures, so there
> isn't any reason to go back and change it.
>
> Why don't you just go ahead and write and test these functions and
> submit them as a patch against a recent kernel?  That would be much
> more useful than just suggesting things and being upset when the
> rest of us don't implement them because we have higher priority projects
> to work on.
>
>         -- Dan

--
Ralph "Chip" Blach
KF4WBK
Chapel Hill, North Carolina


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/






More information about the Linuxppc-embedded mailing list