linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Dave Chinner <david@fromorbit.com>
Cc: kosaki.motohiro@jp.fujitsu.com, Christoph Lameter <cl@linux.com>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	linux-mm@kvack.org, akpm@linux-foundation.org, npiggin@kernel.dk,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	kamezawa.hiroyu@jp.fujitsu.com, Mel Gorman <mel@csn.ul.ie>,
	Minchan Kim <minchan.kim@gmail.com>
Subject: Re: [PATCH 0/3] Unmapped page cache control (v5)
Date: Mon,  4 Apr 2011 21:05:09 +0900 (JST)	[thread overview]
Message-ID: <20110404210523.DA69.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20110404001936.GL6957@dastard>

Hi Dave,

Thanks long explanation.

> > Secondly, You misparsed "avoid direct reclaim" paragraph. We don't talk
> > about "avoid direct reclaim even if system memory is no enough", We talk
> > about "avoid direct reclaim by preparing before". 
> 
> I don't think I misparsed it. I am addressing the "avoid direct
> reclaim by preparing before" principle directly. The problem with it
> is that just enalrging the free memory pool doesn't guarantee future
> allocation success when there are other concurrent allocations
> occurring. IOWs, if you don't _reserve_ the free memory for the
> critical area in advance then there is no guarantee it will be
> available when needed by the critical section.

Right.

Then, I made per-task reserve memory code at very years ago when I'm
working for embedded. So, There are some design choice here. best effort
as Christoph described or per thread or RT thread specific reservation.


> A simple example: the radix tree node preallocation code to
> guarantee inserts succeed while holding a spinlock. If just relying
> on free memory was sufficient, then GFP_ATOMIC allocations are all
> that is necessary. However, even that isn't sufficient as even the
> GFP_ATOMIC reserved pool can be exhausted by other concurrent
> GFP_ATOMIC allocations. Hence preallocation is required before
> entering the critical section to guarantee success in all cases.
> 
> And to state the obvious: doing allocation before the critical
> section will trigger reclaim if necessary so there is no need to
> have the application trigger reclaim.

Yes and No.
Preallocation is core piece, yes. But Almost all syscall call 
kmalloc() implicitly. then mlock() is no sufficient preallocation.
Almost all application except HPC can't avoid syscall use. That's 
the reason why finance people repeatedly requirest us the feature,
I think.

Thanks!


--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-04-04 12:05 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30  5:30 Balbir Singh
2011-03-30  5:31 ` [PATCH 1/3] Move zone_reclaim() outside of CONFIG_NUMA (v5) Balbir Singh
2011-03-30  5:31 ` [PATCH 2/3] Refactor zone_reclaim code (v5) Balbir Singh
2011-03-30  5:32 ` [PATCH 3/3] Provide control over unmapped pages (v5) Balbir Singh
2011-03-30 23:35   ` Andrew Morton
2011-03-31  5:52     ` Balbir Singh
2011-03-30 23:36 ` [PATCH 0/3] Unmapped page cache control (v5) Andrew Morton
2011-03-31  5:27   ` Balbir Singh
2011-03-31  5:32     ` Andrew Morton
2011-04-01 17:31       ` Balbir Singh
2011-03-31  5:40 ` KOSAKI Motohiro
2011-03-31  8:28   ` Balbir Singh
2011-04-01  7:56     ` KOSAKI Motohiro
2011-04-01 13:12       ` Balbir Singh
2011-04-01 13:21         ` KOSAKI Motohiro
2011-04-01 18:04           ` Balbir Singh
2011-04-03  9:39             ` KOSAKI Motohiro
2011-03-31 20:13   ` Christoph Lameter
2011-04-01 13:17     ` KOSAKI Motohiro
2011-04-01 14:50       ` Christoph Lameter
2011-04-03  9:44         ` KOSAKI Motohiro
2011-04-03 18:45           ` Christoph Lameter
2011-04-01 23:10       ` Satoru Moriya
2011-04-02  1:10       ` Dave Chinner
2011-04-03  9:32         ` KOSAKI Motohiro
2011-04-04  0:19           ` Dave Chinner
2011-04-04 12:05             ` KOSAKI Motohiro [this message]
2011-04-03 18:41         ` Christoph Lameter
2011-03-31 21:40 ` Dave Chinner
2011-04-01  3:08   ` Balbir Singh
2011-04-01  5:31     ` Dave Chinner
2011-04-01  3:18   ` KOSAKI Motohiro

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=20110404210523.DA69.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=cl@linux.com \
    --cc=david@fromorbit.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --cc=npiggin@kernel.dk \
    /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