Aubrey wrote:
On 11/29/06, Nick Piggin <[email protected]> wrote:I have done several test cases. when cat /proc/meminfo show MemFree < 8192KB,That was the order-9 allocation failure. Which is not going to be solved properly by just dropping caches. But Sonic apparently saw failures with 4K allocations, where the caches weren't getting shrunk properly. This would be more interesting because it would indicate a real problem with the kernel.1) malloc(1024 * 4), 256 times = 8MB, allocation successful. 2) malloc(1024 * 16), 64 times = 8MB, allocation successful. 3) malloc(1024 * 64), 16 times = 8MB, allocation successful. 4) malloc(1024 * 128), 8 times = 8MB, allocation failed. 5) malloc(1024 * 256), 4 times = 8MB, allocation failed.From those results, we know, when allocation <=64K, cache can beshrunk properly. That means the malloc size of an application on nommu should be <=64KB. That's exactly our problem. Some video programmes need a big block which has contiguous physical address. But yes, as you said, we must keep malloc not to alloc a big block to make the current kernel working robust on nommu. So, my question is, Can we improve this issue? why malloc(64K) is ok but malloc(128K) not? Is there any existing parameters about this issue? why not kernel attempt to shrunk cache no matter how big memory allocation is requested? Any thoughts?
The pattern you are seeing here is probably due to the page allocator always retrying process context allocations which are <= order 3 (64K with 4K pages). You might be able to increase this limit a bit for your system, but it could easily cause problems. Especially fragmentation on nommu systems where the anonymous memory cannot be paged out. -- SUSE Labs, Novell Inc.Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- The VFS cache is not freed when there is not enough free memory to allocate
- From: Aubrey <[email protected]>
- Re: The VFS cache is not freed when there is not enough free memory to allocate
- From: Peter Zijlstra <[email protected]>
- Re: The VFS cache is not freed when there is not enough free memory to allocate
- From: Aubrey <[email protected]>
- Re: The VFS cache is not freed when there is not enough free memory to allocate
- From: Nick Piggin <[email protected]>
- Re: The VFS cache is not freed when there is not enough free memory to allocate
- From: "Sonic Zhang" <[email protected]>
- Re: The VFS cache is not freed when there is not enough free memory to allocate
- From: Aubrey <[email protected]>
- Re: The VFS cache is not freed when there is not enough free memory to allocate
- From: Nick Piggin <[email protected]>
- Re: The VFS cache is not freed when there is not enough free memory to allocate
- From: Aubrey <[email protected]>
- The VFS cache is not freed when there is not enough free memory to allocate
- Prev by Date: [PATCH] atomic_cmpxchg return type error
- Next by Date: Re: 2.6.19-rc6-mm2: uli526x only works after reload
- Previous by thread: Re: The VFS cache is not freed when there is not enough free memory to allocate
- Next by thread: Re: The VFS cache is not freed when there is not enough free memory to allocate
- Index(es):