From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"minchan.kim@gmail.com" <minchan.kim@gmail.com>,
cl@linux-foundation.org,
"hugh.dickins" <hugh.dickins@tiscali.co.uk>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC PATCH] asynchronous page fault.
Date: Mon, 4 Jan 2010 07:55:59 -0800 [thread overview]
Message-ID: <20100104155559.GA6748@linux.vnet.ibm.com> (raw)
In-Reply-To: <1262591604.4375.4075.camel@twins>
On Mon, Jan 04, 2010 at 08:53:23AM +0100, Peter Zijlstra wrote:
> On Sun, 2010-01-03 at 19:02 -0800, Paul E. McKenney wrote:
> > It would not be all that hard for me to make a call_srcu(), but...
> >
> > 1. How are you avoiding OOM by SRCU callback? (I am sure you
> > have this worked out, but I do have to ask!)
>
> Well, I was thinking srcu to have this force quiescent state in
> call_srcu() much like you did for the preemptible rcu.
Ah, so the idea would be that you register a function with the srcu_struct
that is invoked when some readers are stuck for too long in their SRCU
read-side critical sections? Presumably you also supply a time value for
"too long" as well. Hmmm... What do you do, cancel the corresponding
I/O or something?
This would not be hard once I get SRCU folded into the treercu
infrastructure. However, at the moment, SRCU has no way of tracking
which tasks are holding things up. So not 2.6.34 material, but definitely
doable longer term.
> Alternatively we could actively throttle the call_srcu() call when we've
> got too much pending work.
This could be done with the existing SRCU implementation. This could be
a call to a function you registered. In theory, it would be possible
to make call_srcu() refuse to enqueue a callback when there were too
many, but that really badly violates the spirit of the call_rcu() family
of functions.
> > 2. How many srcu_struct data structures are you envisioning?
> > One globally? One per process? One per struct vma?
> > (Not necessary to know this for call_srcu(), but will be needed
> > as I work out how to make SRCU scale with large numbers of CPUs.)
>
> For this patch in particular, one global one, covering all vmas.
Whew!!! ;-)
Then it would still be feasible for the CPU-hotplug code to scan all
SRCU structures, if need be. (The reason that SRCU gets away without
worrying about CPU hotplug now is that it doesn't keep track of which
tasks are in read-side critical sections.)
> One reason to keep the vma RCU domain separate from other RCU objects is
> that these VMA thingies can have rather long quiescent periods due to
> this sleep stuff. So mixing that in with other RCU users which have much
> better defined periods will just degrade everything bringing that OOM
> scenario much closer.
Fair enough!
Thanx, Paul
--
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>
next prev parent reply other threads:[~2010-01-04 15:56 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-25 1:51 [RFC PATCH] asynchronous page fault KAMEZAWA Hiroyuki
2009-12-27 9:47 ` Minchan Kim
2009-12-27 23:59 ` KAMEZAWA Hiroyuki
2009-12-27 11:19 ` Peter Zijlstra
2009-12-28 0:00 ` KAMEZAWA Hiroyuki
2009-12-28 0:57 ` Balbir Singh
2009-12-28 1:05 ` KAMEZAWA Hiroyuki
2009-12-28 2:58 ` Balbir Singh
2009-12-28 3:13 ` KAMEZAWA Hiroyuki
2009-12-28 8:34 ` Peter Zijlstra
2009-12-28 8:32 ` Peter Zijlstra
2009-12-29 9:54 ` Balbir Singh
2009-12-27 12:03 ` Peter Zijlstra
2009-12-28 0:36 ` KAMEZAWA Hiroyuki
2009-12-28 1:19 ` KAMEZAWA Hiroyuki
2009-12-28 8:30 ` Peter Zijlstra
2009-12-28 9:58 ` KAMEZAWA Hiroyuki
2009-12-28 10:30 ` Peter Zijlstra
2009-12-28 10:40 ` Peter Zijlstra
2010-01-02 16:14 ` Peter Zijlstra
2010-01-04 3:02 ` Paul E. McKenney
2010-01-04 7:53 ` Peter Zijlstra
2010-01-04 15:55 ` Paul E. McKenney [this message]
2010-01-04 16:02 ` Peter Zijlstra
2010-01-04 16:56 ` Paul E. McKenney
2010-01-04 13:48 ` [RFC PATCH -v2] speculative " Peter Zijlstra
2009-12-28 10:57 ` [RFC PATCH] asynchronous " KAMEZAWA Hiroyuki
2009-12-28 11:06 ` Peter Zijlstra
2009-12-28 8:55 ` Peter Zijlstra
2009-12-28 10:08 ` KAMEZAWA Hiroyuki
2009-12-28 11:43 ` Peter Zijlstra
2010-01-02 21:45 ` Benjamin Herrenschmidt
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=20100104155559.GA6748@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=cl@linux-foundation.org \
--cc=hugh.dickins@tiscali.co.uk \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).