From: Christoph Lameter <clameter@sgi.com>
To: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: akpm@osdl.org, linux-mm@kvack.org,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Hugh Dickins <hugh@veritas.com>
Subject: Re: [PATCH 4/7] PM cleanup: Drop nr_refs in remove_references()
Date: Mon, 1 May 2006 11:53:28 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0605011150490.16261@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <1146508468.5216.88.camel@localhost.localdomain>
On Mon, 1 May 2006, Lee Schermerhorn wrote:
> > You only need one additional refcount to hold the page. This is the same
> > as in the case of migrate_pages(). Where does the second refcount come from?
>
> One from the cache [where I find the page on fault], one from
> find_get_page().
The function alrady considers the reference from mapping. The
find_get_page() ref is basically the same that isolate_lru_page() takes.
> Plus 1 from page_private(page) buf refs, if any. Also, to match the
That is also considered in the function.
> page
> state for direct migration, I isolate the page from the lru so it can't
> be found, except through the cache, while I'm migrating it; and that
> adds
> yet another ref. Net is 1 extra ref in the fault path.
Since you already have a ref from find_get_page() I would not think that
you would not need an additional one from isolate_lru_page().
> > zap_pte_range() can remove a mapcount without obtaining a lock. Hmmm...
> > Seems to do nothing with the mapping though. Removal of anonymous mappings
> > are deferred until we reach free_page() so that does not apply. Check the
> > file I/O functions.
>
> I did. Looked like page->mapping only gets NULLed out in
> [__]remove_from_page_cache(). I backtracked all of the
> refs I could find, and all seemed to hold page lock. But, again,
> I could have missed some [cscope can lie, as can my eyes].
If there is none then we can completely remove that check. We already
check for the mapping to be non null earlier.
--
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>
next prev parent reply other threads:[~2006-05-01 18:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-29 3:22 Page Migration patchsets overview Christoph Lameter
2006-04-29 3:22 ` [PATCH 1/7] PM cleanup: Rename "ignrefs" to "migration" Christoph Lameter
2006-04-29 3:22 ` [PATCH 2/7] PM cleanup: Group functions Christoph Lameter
2006-04-29 3:23 ` [PATCH 3/7] PM cleanup: Remove useless definitions Christoph Lameter
2006-04-29 3:23 ` [PATCH 4/7] PM cleanup: Drop nr_refs in remove_references() Christoph Lameter
2006-05-01 16:09 ` Lee Schermerhorn
2006-05-01 16:15 ` Christoph Lameter
2006-05-01 17:51 ` Lee Schermerhorn
2006-05-01 18:04 ` Christoph Lameter
2006-05-01 18:34 ` Lee Schermerhorn
2006-05-01 18:53 ` Christoph Lameter [this message]
2006-04-29 3:23 ` [PATCH 5/7] PM cleanup: Extract try_to_unmap from migration functions Christoph Lameter
2006-04-29 3:23 ` [PATCH 6/7] PM cleanup: Pass "mapping" to " Christoph Lameter
2006-04-29 3:23 ` [PATCH 7/7] PM cleanup: Move fallback handling into special function Christoph Lameter
2006-04-29 3:23 ` [PATCH 1/3] Swapless PM: add R/W migration entries Christoph Lameter
2006-04-29 3:23 ` [PATCH 2/3] Swapless PM: Rip out swap based logic Christoph Lameter
2006-04-29 3:23 ` [PATCH 3/3] Swapless PM: Modify core logic Christoph Lameter
2006-04-29 3:23 ` {PATCH 1/2} More PM: do not inc/dec rss counters Christoph Lameter
2006-04-29 3:23 ` {PATCH 2/2} More PM: use migration entries for file pages 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=Pine.LNX.4.64.0605011150490.16261@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=Lee.Schermerhorn@hp.com \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=kamezawa.hiroyu@jp.fujitsu.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).