All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Hugh Dickins <hugh@veritas.com>,
	Andrea Arcangeli <andrea@suse.de>
Subject: Re: [patch 18/27] always update page->flags atomically
Date: Fri, 05 Jul 2002 02:41:57 -0700	[thread overview]
Message-ID: <3D2569E5.A9AC4F3B@zip.com.au> (raw)
In-Reply-To: 20020705100637.B23355@flint.arm.linux.org.uk

Russell King wrote:
> 
> On Thu, Jul 04, 2002 at 04:54:50PM -0700, Andrew Morton wrote:
> > It had no right to go clearing PG_arch_1.  I'm now clearing PG_arch_1
> > inside rmqueue() which is still a bit presumptious.
> 
> Davem should know the right behaviour for this bit.  It's not a generic
> "architecture" bit, but it has some defined behaviour behind it.  See
> cachetlb.txt:
> 
>   void flush_dcache_page(struct page *page)
> ...
>         There is a bit set aside in page->flags (PG_arch_1) as
>         "architecture private".  The kernel guarantees that,
>         for pagecache pages, it will clear this bit when such
>         a page first enters the pagecache.
> 
> I think you may have broken this... ;(

For pagecache pages we're OK - they're only added to pagecache
once, and PG_arch_1 is cleared at page allocation time.

However swapcache pages are added and removed.

It's rather moot, because swapcache pages are not subject to
flush_dcache_page() any more.  If you're using swap-over-NBD
then I guess networking makes its own arrangements...

So hmmm.  Actually, I think the current behaviour is correct.
If a page is added to swapcache then removed then added, then
removed, the kernel should never stomp on PG_arch_1.  That's
an arch-private cache to say "you need to perform cache writeback
for this page if another mm later shares it", yes?  So we need
to preserve that info as the page enters and leaves swapcache.

I think.

-

      reply	other threads:[~2002-07-05  9:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-04 23:54 [patch 18/27] always update page->flags atomically Andrew Morton
2002-07-05  9:06 ` Russell King
2002-07-05  9:41   ` Andrew Morton [this message]

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=3D2569E5.A9AC4F3B@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=andrea@suse.de \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=torvalds@transmeta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.