[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MBUF memory allocation
- Date: Thu, 17 Sep 98 12:14:26 -0600
- From: eric at skatter.USask.Ca (Eric Norum)
- Subject: MBUF memory allocation
Jay Monkman <jmonkman at frasca.com> wrote:
> I want to enable instruction and data caching on the MPC860. But
> that are used for the CPM shouldn't be cached. It looks
> like m_clalloc is
> where they are allocated for TCP/IP, right?
> Should I modify m_clalloc or
> kmem_malloc (since it handles the
> mbuf clusters specially) or is there a
> better way?
> What I want to do is have one area in memory (probably 512K
> that's the most convenient page size) that all of the CPM buffers
> allocated from. That way I can enable caching on the rest
> of the
First, let me state that I do not know all the detals on the way the
860 cache works........
I'm not sure that it's adequate to just put the mbuf clusters in
non-cacheable memory. You would probably have to put all the mbuf
space in non-cachable memory, too since the network code might put
headers in an mbuf. And what happens if we want to implement a
`zero-copy' option? Then the user I/O buffer would have to be placed
in non-cacheable memory, too!
Wouldn't it be better to just flush the cache entries for the mbuf
to memory before starting the DMA output operation, and mark the
cache entries `invalid' for an incoming packet?
Eric Norum eric at skatter.usask.ca
Saskatchewan Accelerator Laboratory Phone: (306) 966-6308
University of Saskatchewan FAX: (306) 966-6058