From: Andrew Morton <akpm@linux-foundation.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Switching TestSetPageLocked to trylock_page
Date: Mon, 4 Aug 2008 20:57:54 -0700 [thread overview]
Message-ID: <20080804205754.b05c8aa9.akpm@linux-foundation.org> (raw)
In-Reply-To: <200808051341.53282.nickpiggin@yahoo.com.au>
On Tue, 5 Aug 2008 13:41:53 +1000 Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> On Tuesday 05 August 2008 13:28, Linus Torvalds wrote:
> > On Tue, 5 Aug 2008, Nick Piggin wrote:
> > > On Thursday 31 July 2008 17:26, Nick Piggin wrote:
> > > > Hi,
> > > >
> > > > I'm wondering if I could get a patch merged which changes all
> > > > TestSetPageLocked and replaces them with trylock_page?
> > >
> > > Yes? No?
> > >
> > > The alternative is try to merge it via -mm or -next, but that just
> > > wastes everybodies time with conflicts of having these differences
> > > between -mm and mainline.
> >
> > Heh. I had just been _assuming_ this would go through -mm, since it's
> > exactly the kind of thing that usually does go through there.
> >
> > So I hadn't even really considered it.
>
> OK... it just causes Andrew headaches I suspect. But if he prefers
> to hold onto it for an entire release cycle... Andrew?
>
Yup. A mechanical rename-foo-to-bar can be prepared and merged late -
there's little payback for the pain of maintaining it for a couple of
months.
Would prefer either that we hold off until after 2.6.27 is released or
just do it now.
>
> > I don't mind the patch per se, but can you give some background on what
> > the pending optimization is that makes such a big difference?
>
> Using the lock semantics bitops is the first one. While it is true
> that we could just hack them into TestSetPageLocked, I really prefer
> callers to require at least a cursory glance to convert them, and
> understand that this is a lock lock, and not a test_and_set bitop
> with full barrier semantics.
This patch wouldn't do anything to ensure that callers get the review
which you describe, would it?
(and we don't need to patch the code to just read it!)
> lock semantics bitops obviously doesn't help x86 a bit. It really
> helps powerpc though.
>
> The part that helps x86 is another patch further down my stack, which
> can avoid looking at the hashed page waitqueue at unlock_page-time.
> Basically this eliminates the entire page waitqueue from the cache
> footprint of fastpath workloads where the lock is uncontended (often:
> page faulting, write(2), writeout etc).
>
> I'll send all that stuff off to -mm for 2.6.28 if this gets upstream
> (or into -mm).
I'm OK with that.
next prev parent reply other threads:[~2008-08-05 3:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 7:26 Switching TestSetPageLocked to trylock_page Nick Piggin
2008-07-31 7:38 ` KOSAKI Motohiro
2008-07-31 9:33 ` Peter Zijlstra
2008-08-05 3:14 ` Nick Piggin
2008-08-05 3:28 ` Linus Torvalds
2008-08-05 3:41 ` Nick Piggin
2008-08-05 3:57 ` Andrew Morton [this message]
2008-08-05 4:01 ` Benjamin Herrenschmidt
2008-08-05 4:18 ` Nick Piggin
2008-08-05 4:09 ` Nick Piggin
2008-08-05 4:32 ` Linus Torvalds
2008-08-05 4:44 ` Nick Piggin
2008-08-05 4:57 ` Linus Torvalds
2008-08-05 5:09 ` Nick Piggin
2008-08-05 4:25 ` Linus Torvalds
2008-08-05 4:46 ` 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=20080804205754.b05c8aa9.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--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