linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Sonic Zhang" <sonic.adi@gmail.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Aubrey <aubreylee@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: The VFS cache is not freed when there is not enough free memory to allocate
Date: Wed, 29 Nov 2006 15:17:13 +0800	[thread overview]
Message-ID: <4e5ebad50611282317r55c22228qa5333306ccfff28e@mail.gmail.com> (raw)
In-Reply-To: <456A964D.2050004@yahoo.com.au>

Forward to the mailing list.

Sonic Zhang wrote:
> On 11/27/06, Nick Piggin <nickpiggin@yahoo.com.au> wrote:


>> I haven't actually written any nommu userspace code, but it is obvious
>> that you must try to keep malloc to <= PAGE_SIZE (although order 2 and
>> even 3 allocations seem to be reasonable, from process context)... Then
>> you would use something a bit more advanced than a linear array to store
>> data (a pagetable-like radix tree would be a nice, easy idea).
>>
>
> But, even we split the 8M memory into 2048 x 4k blocks, we still face
> this failure. The key problem is that available memory is small than
> 2048 x 4k, while there are still a lot of VFS cache. The VFS cache can
> be freed, but kernel allocation function ignores it. See the new test
> application.


Which kernel allocation function? If you can provide more details I'd
like to get to the bottom of this.

Because the anonymous memory allocation in mm/nommu.c is all allocated
with GFP_KERNEL from process context, and in that case, the allocator
should not fail but call into page reclaim which in turn will free VFS
caches.



> What's a better way to free the VFS cache in memory allocator?


It should be freeing it for you, so I'm not quite sure what is going
on. Can you send over the kernel messages you see when the allocation
fails?

Also, do you happen to know of a reasonable toolchain + emulator setup
that I could test the nommu kernel with?

Thanks,
Nick

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-11-29  7:17 UTC|newest]

Thread overview: 15+ 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 [this message]
2006-11-29  9:27         ` Aubrey
2006-11-29  9:30           ` Nick Piggin
2006-11-30 12:54             ` Aubrey
2006-11-30 21:18               ` Nick Piggin
2006-12-01 10:00                 ` Aubrey
2006-11-28 13:29 Robin Getz
2006-11-28 14:41 ` Nick Piggin

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=4e5ebad50611282317r55c22228qa5333306ccfff28e@mail.gmail.com \
    --to=sonic.adi@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aubreylee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    /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