Kernel OOM from cache not being dropped
Sorry if this has been discussed. I did a search on the forum and did not find the answer. If your search-fu is better than mine, please point me in the right direction.
Here's the problem. Embedded system, no swap. Cache eats up all available RAM during heavy usage. This is not a problem. As soon as user-space program allocates memory, cache gives it up. Everything works as advertised.
However, there's a 3rd party device driver that for certain operations, tries to allocate a 5th order page of physical memory. Well buddyinfo shows there are no 5th order page available -- OOM.
But, as soon as I force a drop cache, plenty becomes available, and the operation proceeds as normal.
So it would seem that when allocating virtual memory, cache is dropped to make that happen. When allocating physical memory, cache doesn't get dropped? That doesn't make sense, because then a full cache will make kernel drivers that require contiguous physical memory to fail, which I think is worse than having slow disk access.
Kernel is 2.6.36, memory compaction is enabled.
Perhaps there's some tuning parameter that I have to set?
Thanks!