[Click] Re: click memory questions
Eddie Kohler
kohler at CS.UCLA.EDU
Thu Oct 7 14:46:10 EDT 2004
Hi Erik!
On Oct 7, 2004, at 10:08 AM, Erik VandeKieft wrote:
> Hi Eddie,
>
> I'm the one that was asking you before about kernel mode click memory
> usage (using kmalloc versus vmalloc, etc.) I have to quick questions
> for
> you:
>
> (1) Why does click currently do all its kmalloc() allocations using the
> GFP_ATOMIC flag? Wouldn't GFP_KERNEL be fine? Why must we not block?
Hmm. GFP_KERNEL probably would be fine. Click *may* occasionally
allocate memory in an interrupt context (FromDevice or some such), but
it probably shouldn't. So I think GFP_KERNEL is worth a try.
> (2) I'm told that no matter what I do, because of limitations of linux
> 2.4, I will not be able to use more than 1GB of memory while running in
> kernel mode (even less because of the 128MB for page tables). Has
> anyone
> run into this limitation before, and is there anything that can be done
> about it?
I don't believe anyone has.
> (3) I'm no longer doing kmalloc() for large memory requests (I use
> vmalloc
> for everything greater than a certain size), but kmalloc still
> eventually
> fails. It fails after only 520MB total have been allocated on a 2GB
> machine... do you know if there is some kind of statically defined
> kmalloc
> pool limit that can be increased?
The relevant Linux source is mm/slab.c. I don't know the answer to
this off the top of my head. Is 520MB including the vmalloc()ed pages?
Eddie
>
> Thanks,
> --Erik
More information about the click
mailing list