public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Hugh Dickins <hugh@veritas.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] rmap: parisc __flush_dcache_page
Date: Thu, 8 Apr 2004 19:51:58 +0200	[thread overview]
Message-ID: <20040408175158.GK31667@dualathlon.random> (raw)
In-Reply-To: <1081446226.2105.402.camel@mulgrave>

On Thu, Apr 08, 2004 at 12:43:45PM -0500, James Bottomley wrote:
> On Thu, 2004-04-08 at 12:10, Andrea Arcangeli wrote:
> > I said above per-arch abstraction, a per-arch abstraction isn't an irq
> > safe spinlock, we cannot add an irq safe spinlock there, it'd be too bad
> > for all the common archs that don't need to walk those lists (actually
> > trees in my -aa tree) from irq context.
> 
> I think we agree on the abstraction thing.  I was more wondering what
> you thought was so costly about an irq safe spinlock as opposed to an
> ordinary one?  Is there something adding to this cost I don't know
> about?  i.e. should we be thinking about something like RCU or phased
> tree approach to walking the mapping lists?

that path can take as long as timeslice to run, not taking interrupts
for a whole scheduler timeslice is pretty bad.

Note that the data structure will become a tree soon, but a prio-tree,
walking it with RCU lockless sounds very tricky to me, but it may be
doable. For the short term I doubt you want the RCU prio-tree, I guess
you want to stabilze the kernel first with the irq safe spinlock, then
you can try to hack on the prio-tree to read it in a lockless fascion.
If you can make the reading lockless we can giveup the abstraction too,
since we can make all archs walk with lockless, but warning, freeing
vmas in rcu callbacks means freeing mm in rcu callbacks, that then means
freeing pgd in rcu callbacks, the whole mm layer will collapse on you as
soon as you try to read that tree without any locking, only the inode
will be still there as far as you've a reference on the page (and as far
as you don't use nonlinear :-/ ).

  reply	other threads:[~2004-04-08 17:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-08 13:41 rmap: parisc __flush_dcache_page Hugh Dickins
2004-04-08 13:52 ` [parisc-linux] " James Bottomley
2004-04-08 14:16   ` Hugh Dickins
2004-04-08 14:40     ` James Bottomley
2004-04-08 15:14       ` Andrea Arcangeli
2004-04-08 15:28         ` James Bottomley
2004-04-08 15:34           ` Andrea Arcangeli
2004-04-08 15:47             ` James Bottomley
2004-04-08 16:16               ` Andrea Arcangeli
2004-04-08 16:29                 ` James Bottomley
2004-04-08 17:10                   ` Andrea Arcangeli
2004-04-08 17:43                     ` James Bottomley
2004-04-08 17:51                       ` Andrea Arcangeli [this message]
2004-04-08 18:07                         ` James Bottomley
2004-04-08 18:18                           ` Andrea Arcangeli
2004-04-08 18:28                             ` James Bottomley
2004-04-08 18:42                               ` Andrea Arcangeli
2004-04-08 18:49                                 ` James Bottomley
2004-04-08 19:02                                   ` Andrea Arcangeli
2004-04-10  1:21                                 ` Paul E. McKenney
2004-04-08 15:35         ` Hugh Dickins
2004-04-08 16:13           ` Andrea Arcangeli

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=20040408175158.GK31667@dualathlon.random \
    --to=andrea@suse.de \
    --cc=James.Bottomley@steeleye.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=parisc-linux@parisc-linux.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