public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: "David S. Miller" <davem@redhat.com>
Cc: hugh@veritas.com, linux-kernel@vger.kernel.org, trivial@rustcorp.com.au
Subject: Re: remove mixture of non-atomic operations with page->flags which requires atomic operations to access
Date: Mon, 3 Jun 2002 04:00:55 -0700	[thread overview]
Message-ID: <20020603110055.GB912@holomorphy.com> (raw)
In-Reply-To: <20020602224422.GP14918@holomorphy.com> <Pine.LNX.4.21.0206031051370.10595-100000@localhost.localdomain> <20020603102809.GA912@holomorphy.com> <20020603.022739.102772773.davem@redhat.com>

From: William Lee Irwin III <wli@holomorphy.com>
Date: Mon, 3 Jun 2002 03:28:09 -0700
>    It should be clearing it, I'd retransmit if there weren't other objections
>    to address...

On Mon, Jun 03, 2002 at 02:27:39AM -0700, David S. Miller wrote:
> Such as the fact that none of these operations need to
> be atomic :-)

After looking around a little bit the unique reference guarantee
plus various memory barriers surrounding it appear to suffice. But
I'm still left quite uneasy by the usage of non-atomic operations
on an atomically updated lock word. At the very least making the
operand shifted an unsigned long is needed. So this ensues:


Cheers,
Bill

===== mm/page_alloc.c 1.63 vs edited =====
--- 1.63/mm/page_alloc.c	Tue May 28 16:57:49 2002
+++ edited/mm/page_alloc.c	Mon Jun  3 03:58:59 2002
@@ -110,8 +110,8 @@
 		BUG();
 	if (PageWriteback(page))
 		BUG();
-	ClearPageDirty(page);
-	page->flags &= ~(1<<PG_referenced);
+
+	page->flags &= ~((1UL << PG_referenced) | (1UL << PG_dirty));
 
 	if (current->flags & PF_FREE_PAGES)
 		goto local_freelist;

  reply	other threads:[~2002-06-03 11:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-02 22:44 remove mixture of non-atomic operations with page->flags which requires atomic operations to access William Lee Irwin III
2002-06-03 10:14 ` Hugh Dickins
2002-06-03  9:12   ` David S. Miller
2002-06-03 10:28   ` William Lee Irwin III
2002-06-03  9:27     ` David S. Miller
2002-06-03 11:00       ` William Lee Irwin III [this message]
2002-06-03 10:00         ` David S. Miller
2002-06-03 11:07           ` William Lee Irwin III

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=20020603110055.GB912@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=davem@redhat.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com.au \
    /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