From: Hugh Dickins <hugh@veritas.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: linux-mm@kvack.org
Subject: s390's PageSwapCache test
Date: Sat, 2 Aug 2008 10:05:18 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0808020944330.1992@blonde.site> (raw)
Hi Martin,
I'm slightly bothered by that PageSwapCache() test you've just added
in page_remove_rmap(), before s390's page_test_dirty():
if ((!PageAnon(page) || PageSwapCache(page)) &&
page_test_dirty(page)) {
page_clear_dirty(page);
set_page_dirty(page);
}
It's not wrong; but if it's necessary, then I need to understand why;
and if it's unnecessary, then we'd do better to remove it (optimizing
your optimization a little).
I believe it's unnecessary: it is possible, yes, to arrive here and
find the anon page dirty with respect to what's on swap disk; but
because anon pages are COWed, never sharing modification with other
users, that will only be so if we're the only user of that page, and
about to free it, in which case no point in doing the set_page_dirty().
For a very similar case, see the PageAnon() test in zap_pte_range(),
where we also skip the set_page_dirty().
Hugh
--
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 reply other threads:[~2008-08-02 9:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-02 9:05 Hugh Dickins [this message]
2008-08-02 16:20 ` Martin Schwidefsky
2008-08-02 18:44 ` Hugh Dickins
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.0808020944330.1992@blonde.site \
--to=hugh@veritas.com \
--cc=linux-mm@kvack.org \
--cc=schwidefsky@de.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox