linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	lhms <lhms-devel@lists.sourceforge.net>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: [Lhms-devel] new memory hotremoval patch
Date: Wed, 30 Jun 2004 22:28:44 -0700	[thread overview]
Message-ID: <1088659723.10720.3.camel@nighthawk> (raw)
In-Reply-To: <20040701030543.8CE8F70A92@sv1.valinux.co.jp>

On Wed, 2004-06-30 at 20:05, IWAMOTO Toshihiro wrote:
> At Wed, 30 Jun 2004 17:11:11 -0700,
> Dave Hansen wrote:
> > 
> > On Wed, 2004-06-30 at 04:17, IWAMOTO Toshihiro wrote:
> > > Due to struct page changes, page->mapping == NULL predicate can no
> > > longer be used for detecting cancellation of an anonymous page
> > > remapping operation.  So the PG_again bit is being used again.
> > > It may be still possible to kill the PG_again bit, but the priority is
> > > rather low.
> > 
> > But, you reintroduced it everywhere, including file-backed pages, not
> > just for anonymous pages?  Why was this necessary?
> 
> Which PG_again check are you talking about?
> I think BUG_ON()s in file backed page codes should be kept for now.

I'm referring to all of the code segments like this:
        
        +       if (PageAgain(page)) {
        +               unlock_page(page);
        +               page_cache_release(page);
        +               goto again;
        +       }
        +       BUG_ON(PageAgain(page));
        
For any page that's in the page cache that you want to remove, simply
take the page lock, overwrite page->mapping, and the page cache code
will take care of the rest, no PG_again needed.  

> For swap pages, one possibility to reserve a special swap entry
> constant (SWAP_AGAIN) and check page->private instead of PageAgain
> check, but I'm not sure if this is a good idea.
> 
> #define	SWAP_AGAIN	~0UL

Do you mean pages in the swap cache?

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2004-07-01  5:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30 11:17 IWAMOTO Toshihiro
2004-06-30 11:32 ` Arjan van de Ven
2004-06-30 14:33   ` [Lhms-devel] " Hirokazu Takahashi
2004-06-30 23:31 ` [Lhms-devel] " Dave Hansen
2004-07-01  2:10   ` IWAMOTO Toshihiro
2004-07-01  0:11 ` Dave Hansen
2004-07-01  3:05   ` IWAMOTO Toshihiro
2004-07-01  5:28     ` Dave Hansen [this message]
2004-07-01  5:58       ` IWAMOTO Toshihiro
2004-07-01  6:15         ` Dave Hansen
2004-07-01  7:16 ` [patch] new memory hotremoval patch for hugetlbpages Hirokazu Takahashi

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=1088659723.10720.3.camel@nighthawk \
    --to=haveblue@us.ibm.com \
    --cc=iwamoto@valinux.co.jp \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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