linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-mm@kvack.org
Subject: Re: Drop PageReclaim()
Date: Wed, 7 Feb 2007 09:25:17 -0800	[thread overview]
Message-ID: <20070207092517.15071f04.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0702070612010.14171@schroedinger.engr.sgi.com>

On Wed, 7 Feb 2007 06:13:48 -0800 (PST) Christoph Lameter <clameter@sgi.com> wrote:

> Am I missing something here? I cannot see PageReclaim have any effect?
> 
> 
> 
> PageReclaim is only used for dead code. The only current user is
> end_page_writeback() which has the following lines:
> 
>  if (!TestClearPageReclaim(page) || rotate_reclaimable_page(page)) {
>          if (!test_clear_page_writeback(page))
>                   BUG();
>  }
> 
> So the if statement is performed if !PageReclaim(page).
> If PageReclaim is set then we call rorate_reclaimable(page) which
> does:
> 
>  if (!PageLRU(page))
>        return 1;
> 
> The only user of PageReclaim is shrink_list(). The pages processed
> by shrink_list have earlier been taken off the LRU. So !PageLRU is always 
> true.
> 
> The if statement is therefore always true and the rotating code
> is never executed.

end_page_writeback() is amazingly obscure for such a short function.  For
which I apologise, but on revisit, it's still not obvious how to clean it
up.

It does:

	if (!PageReclaim(page)) {
		clear_page_writeback();
	}
	if (PageRecaim(page)) {
		ClearPageReclaim(page);
		foo = rotate_reclaimable_page(page);
		if (foo == 0) {
			/*
			 * rotate_reclaimable_page has already done
			 * clear_page_writeback()
			 */
		} else {
			clear_page_writeback(page);
		}
	}

--
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:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2007-02-07 17:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07 14:13 Drop PageReclaim() Christoph Lameter
2007-02-07 14:32 ` Hugh Dickins
2007-02-08 21:20   ` Christoph Lameter
2007-02-08 21:38     ` Christoph Lameter
2007-02-08 21:42       ` Christoph Lameter
2007-02-08 21:55         ` Christoph Lameter
2007-02-08 22:03           ` Andrew Morton
2007-02-08 22:14             ` Christoph Lameter
2007-02-08 22:24               ` Andrew Morton
2007-02-08 22:26                 ` Christoph Lameter
2007-02-08 22:37                   ` Andrew Morton
2007-02-08 22:40                     ` Christoph Lameter
2007-02-08 23:13                       ` Andrew Morton
2007-02-09  0:22                         ` Christoph Lameter
2007-02-09  0:39                           ` Andrew Morton
2007-02-09  1:06                             ` Christoph Lameter
2007-02-09  1:18                               ` Andrew Morton
2007-02-11  5:12                             ` Rik van Riel
2007-02-07 17:25 ` Andrew Morton [this message]
2007-02-08 21:19   ` Christoph Lameter

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=20070207092517.15071f04.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --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;
as well as URLs for NNTP newsgroup(s).