kmalloc(GFP_KERNEL) vs buffer cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All,

In dealing with a 2.2 kernel, I'm seeing what appears to be a
kmalloc(GFP_KERNEL) failing to allocate memory because the buffer cache
is using most of available RAM.  There are about 5k allocations of about
2k each, done in a loop in an ioctl case (so it is in process context). 
It looks like about 3MB of them succeed before one fails.

Is this hypothesis reasonable or not?  Why?
According to LDD, GFP_KERNEL will try to swap to get memory if
needed--If that is the case, why would it fail to get memory from the
buffer cache?

What is the correct way to allocate a large number of (relatively) small
buffers?  Did this change between 2.2 and 2.4?

TIA,

Eli 
--------------------.     Real Users find the one combination of bizarre
Eli Carter           \ input values that shuts down the system for days.
eli.carter(a)inet.com `-------------------------------------------------
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux