Hi Philip On Sun, Aug 8, 2010 at 22:13, Philip Downer <phil@xxxxxxxxx> wrote: > Hi folks, > > I'm developing a kernel module (sorry under nda till product release so > no code available) which is currently allocating ~6MB of buffers (3 x > 2MB buffers) with pci_alloc_consistent for dma usage, it will be less > later on but for now the hardware requires this. Sorry to snip out a lot of your original post. Kindly allow me to share my idea here: You seems to allocate large continous memory block, precisely in DMA range, am I right? Assuming we're talking about the "old" DMA which can address only the first 16 MiB of physical RAM, then I think that's the problem. Quite likely, your function fails to allocate that large physically continous block of RAM. I stress the word "physically continous". During run time, as you probably aware too, allocation and deallocation works hundreds..maybe thousands or more. Thus fragmentation is inevitable. Effect? You bet...hard....er to get physically contigous block of RAM. So, again if I am right interpreting your situation, you have several solutions: 1. allocate it during boot.... i forgot the func names...but it will works better since RAM is still pristine situation that time 2. allocate smaller... and somehow strings them together. So instead of 6 MiB, how about 512 KiB times 12? More about it, maybe you can read my article http://linuxdevcenter.com/pub/a/linux/2006/11/30/linux-out-of-memory.html. It talks about user mode mem allocation, but IMO it applies in kernel too... Good luck -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ