From: Aubrey <aubreylee@gmail.com>
To: "Nick Piggin" <nickpiggin@yahoo.com.au>
Cc: "Sonic Zhang" <sonic.adi@gmail.com>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
vapier.adi@gmail.com
Subject: Re: The VFS cache is not freed when there is not enough free memory to allocate
Date: Thu, 30 Nov 2006 20:54:34 +0800 [thread overview]
Message-ID: <6d6a94c50611300454g22196d2frec54e701abaebf17@mail.gmail.com> (raw)
In-Reply-To: <456D5347.3000208@yahoo.com.au>
On 11/29/06, Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> 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.
>
I have done several test cases. when cat /proc/meminfo show MemFree < 8192KB,
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 be
shrunk 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?
Thanks,
-Aubrey
next prev parent reply other threads:[~2006-11-30 12:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 7:51 Aubrey
2006-11-22 8:43 ` Peter Zijlstra
2006-11-22 10:02 ` Aubrey
2006-11-22 10:42 ` Peter Zijlstra
2006-11-22 11:09 ` Aubrey
2006-11-27 1:34 ` Mike Frysinger
2006-11-27 7:39 ` Nick Piggin
2006-11-29 7:17 ` Sonic Zhang
2006-11-29 9:27 ` Aubrey
2006-11-29 9:30 ` Nick Piggin
2006-11-30 12:54 ` Aubrey [this message]
2006-11-30 21:18 ` Nick Piggin
2006-12-01 10:00 ` Aubrey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d6a94c50611300454g22196d2frec54e701abaebf17@mail.gmail.com \
--to=aubreylee@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--cc=sonic.adi@gmail.com \
--cc=vapier.adi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®