linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	hugh@veritas.com, dhowells@redhat.com, christoph@lameter.com,
	mbligh@google.com, npiggin@suse.de, torvalds@osdl.org
Subject: Re: [PATCH 1/5] mm: tracking shared dirty pages
Date: Tue, 27 Jun 2006 17:57:47 -0700	[thread overview]
Message-ID: <20060627175747.521c6733.akpm@osdl.org> (raw)
In-Reply-To: <20060627182814.20891.36856.sendpatchset@lappy>

Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
>
> Tracking of dirty pages in shared writeable mmap()s.

I mangled this a bit to fit it on top of Christoph's vm counters rewrite
(mm/page-writeback.c).

I worry about the changes to __set_page_dirty_nobuffers() and
test_clear_page_dirty().

They both already require that the page be locked (or that the
address_space be otherwise pinned).  But I'm not sure we get that right at
present.  With these changes, our exposure to that gets worse, and we
additionally are exposed to the possibility of the page itself being
reclaimed, and not just the address_space.

So ho hum.  I'll stick this:

--- a/mm/page-writeback.c~mm-tracking-shared-dirty-pages-checks
+++ a/mm/page-writeback.c
@@ -625,6 +625,7 @@ EXPORT_SYMBOL(write_one_page);
  */
 int __set_page_dirty_nobuffers(struct page *page)
 {
+	WARN_ON_ONCE(!PageLocked(page));
 	if (!TestSetPageDirty(page)) {
 		struct address_space *mapping = page_mapping(page);
 		struct address_space *mapping2;
@@ -722,6 +723,7 @@ int test_clear_page_dirty(struct page *p
 	struct address_space *mapping = page_mapping(page);
 	unsigned long flags;
 
+	WARN_ON_ONCE(!PageLocked(page));
 	if (mapping) {
 		write_lock_irqsave(&mapping->tree_lock, flags);
 		if (TestClearPageDirty(page)) {
_

in there.

--
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>

  reply	other threads:[~2006-06-28  0:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-27 18:28 [PATCH 0/5] mm: tracking dirty pages -v13 Peter Zijlstra
2006-06-27 18:28 ` [PATCH 1/5] mm: tracking shared dirty pages Peter Zijlstra
2006-06-28  0:57   ` Andrew Morton [this message]
2006-06-28 19:49     ` Hugh Dickins
2006-06-28 19:58       ` Andrew Morton
2006-06-28 17:41   ` Hugh Dickins
2006-06-27 18:28 ` [PATCH 2/5] mm: balance " Peter Zijlstra
2006-06-27 18:28 ` [PATCH 3/5] mm: msync() cleanup Peter Zijlstra
2006-06-27 18:28 ` [PATCH 4/5] mm: optimize the new mprotect() code a bit Peter Zijlstra
2006-06-27 18:29 ` [PATCH 5/5] mm: small cleanup of install_page() Peter Zijlstra
  -- strict thread matches above, loose matches on Subject: below --
2006-06-23 22:31 [PATCH 0/5] mm: tracking dirty pages -v11 Peter Zijlstra
2006-06-23 22:31 ` [PATCH 1/5] mm: tracking shared dirty pages Peter Zijlstra
2006-06-23 23:54   ` Peter Zijlstra

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=20060627175747.521c6733.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=christoph@lameter.com \
    --cc=dhowells@redhat.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@google.com \
    --cc=npiggin@suse.de \
    --cc=torvalds@osdl.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