From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Hugh Dickins <hugh@veritas.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Andrew Morton <akpm@osdl.org>, Andrea Arcangeli <andrea@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rmap 24 pte_young first
Date: Sat, 8 May 2004 23:45:29 +0100 [thread overview]
Message-ID: <20040508234529.B20560@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0405082332590.26651-100000@localhost.localdomain>; from hugh@veritas.com on Sat, May 08, 2004 at 11:39:32PM +0100
On Sat, May 08, 2004 at 11:39:32PM +0100, Hugh Dickins wrote:
> rmap 25 of course
>
> On Sat, 8 May 2004, Christoph Hellwig wrote:
> > On Sat, May 08, 2004 at 10:56:26PM +0100, Hugh Dickins wrote:
> > >
> > > - if (ptep_test_and_clear_young(pte))
> > > + if (pte_young(*pte) && ptep_test_and_clear_young(pte))
> >
> > stupid question - shouldn't the pte_young check simply move to
> > the beginning of ptep_test_and_clear_young?
>
> I don't think that would be a good idea. We're used to those
> test_and_clear operations being atomic, putting an initial non-atomic
> test inside would make it fundamentally non-atomic. We know here that
> it's not the end of the world if we miss a racing transition of the
> young bit, but it wouldn't be good to hide and force that on others.
EAGAIN.
include/asm-generic/pgtable.h:
#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
static inline int ptep_test_and_clear_young(pte_t *ptep)
{
pte_t pte = *ptep;
if (!pte_young(pte))
return 0;
set_pte(ptep, pte_mkold(pte));
return 1;
}
#endif
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next prev parent reply other threads:[~2004-05-08 22:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-08 21:55 [PATCH] rmap 24 no rmap fastcalls Hugh Dickins
2004-05-08 21:56 ` [PATCH] rmap 24 pte_young first Hugh Dickins
2004-05-08 22:22 ` Christoph Hellwig
2004-05-08 22:39 ` Hugh Dickins
2004-05-08 22:45 ` Russell King [this message]
2004-05-08 22:59 ` Hugh Dickins
2004-05-09 10:31 ` Hugh Dickins
2004-05-08 21:58 ` [PATCH] rmap 26 __setup_arg_pages Hugh Dickins
2004-05-08 22:00 ` [PATCH] rmap 27 memset 0 vma Hugh Dickins
2004-05-08 22:01 ` [PATCH] rmap 28 remove_vm_struct Hugh Dickins
2004-05-08 22:02 ` [PATCH] rmap 29 VM_RESERVED safety Hugh Dickins
2004-05-08 22:04 ` [PATCH] rmap 30 fix bad mapcount Hugh Dickins
2004-05-08 22:05 ` [PATCH] rmap 31 unlikely bad memory Hugh Dickins
2004-05-08 22:06 ` [PATCH] rmap 32 zap_pmd_range wrap Hugh Dickins
2004-05-08 22:21 ` [PATCH] rmap 24 no rmap fastcalls Christoph Hellwig
2004-05-08 22:32 ` Hugh Dickins
2004-05-08 22:35 ` Christoph Hellwig
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=20040508234529.B20560@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=hch@infradead.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®