Memory allocation problem

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

 



Hi,

We are developing a PCI driver for a specialized hardware which
needs blocks of physically contiguous memory regions of
32 KB. We need to allocate 514 such blocks for a total of 16 MB
We were using an ioctl implementation in the driver which uses
kmalloc() to allocate the required memory blocks. kmalloc()(GFP_KERNEL)
fails after allocating some 250 blocks of memory (probably due to fragmentation).
We then tried using __get_free_pages() and the result was the same.
Even though the free pages in zone NORMAL and DMA were 10000 and 1500 respectively.


Are we hitting some limit because of fragmentation and are
not able to allocate 8 contiguous physical pages? We tried moving the
memory allocation in init_module and made the driver load during boot
time, during which allocation succeeds.


The kernel version we are using is 2.4.18 (Redhat 8.0) and the total
amount of memory available in the box is 128MB


Is there any other mechanism to allocate large amount of physically
contiguous memory blocks during normal run time of the driver? Is this
being addressed in later kernels.


Rgds
Anand




-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/



[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