[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090217123017.GG26402@wotan.suse.de>
Date: Tue, 17 Feb 2009 13:30:17 +0100
From: Nick Piggin <npiggin@...e.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Edward Shishkin <edward.shishkin@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Ryan Hope <rmh3093@...il.com>,
Randy Dunlap <randy.dunlap@...cle.com>,
linux-kernel@...r.kernel.org,
ReiserFS Mailing List <reiserfs-devel@...r.kernel.org>
Subject: Re: set_page_dirty races (was: Re: [patch 2/4] vfs: add set_page_dirty_notag)
On Tue, Feb 17, 2009 at 01:05:34PM +0100, Peter Zijlstra wrote:
> On Tue, 2009-02-17 at 12:55 +0100, Nick Piggin wrote:
> > If nobody thinks it is insane, I'll resend to Andrew in a new thread.
>
> Right, gup_fast() seems to also respect .write properly,
Phew! :)
> so it would
> also be used to balance that.
>
> I guess gup_fast() would need to use trylock_page(), and fall back to
> the slow path when we start taking PG_locked on .write.
Yeah, you're right there. It might also be possible to have a flag
somewhere to avoid the lock if the underlying filesystem doesn't
have a page_mkwrite or doesn't account dirty... which could avoid
the overhead for the common case of anonymous or tmpfs memory.
For gup_fast that pretty much implies an extra page flag I think. But
let's not get too worried with details... I don't think put_user_pages
hurts, even if it only remains as put_page loop. Just to help reader
through the page refcounting.
> I suppose we should start converting a few gup users over to pup before
> handing the thing to Andrew, to have at least a few examples in-kernel.
Could do. There are quite a few easy ones.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists