linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@transmeta.com>
To: Ben LaHaise <bcrl@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: oopses in test10-pre4 (was Re: [RFC] atomic pte updates and pae changes, take 3)
Date: Thu, 19 Oct 2000 13:16:37 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.10.10010191301270.1350-100000@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0010132002440.25522-100000@devserv.devel.redhat.com>


Ben,
 you added these two BUG() conditions in your atomic pte patch:

> diff -ur v2.4.0-test10-pre2/mm/vmscan.c work-10-2/mm/vmscan.c
> --- v2.4.0-test10-pre2/mm/vmscan.c	Fri Oct 13 17:18:37 2000
> +++ work-10-2/mm/vmscan.c	Fri Oct 13 17:19:47 2000
> @@ -99,6 +98,10 @@
>  	if (PageSwapCache(page)) {
>  		entry.val = page->index;
>  		swap_duplicate(entry);
> +		if (pte_dirty(pte))
> +			BUG();
> +		if (pte_write(pte))
> +			BUG();
>  		set_pte(page_table, swp_entry_to_pte(entry));
>  drop_pte:
>  		UnlockPage(page);
> @@ -109,6 +112,13 @@

and people are getting them left and right when they start swapping.

As far as I can tell, the thing you test for is not actually a bug at all.
The pte may be dirty, but that's ok - the swap cache page is obviously
up-to-date, as it's actually physically the very same page.

I think you overlooked the fact that SHM mappings use the page cache, and
it's ok if such pages are dirty and writable - they will get written out
by the shm_swap() logic once there are no mappings active any more.

I like the test per se, because I think it's correct for the "normal"
case of a private page, but I really think those two BUG()'s are not bugs
at all in general, and we should just remove the two tests.

Comments? Anything I've overlooked?

			Linus

--
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.eu.org/Linux-MM/

  parent reply	other threads:[~2000-10-19 20:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-14  0:17 [RFC] atomic pte updates and pae changes, take 2 Ben LaHaise
2000-10-14  1:43 ` Linus Torvalds
2000-10-14  8:26   ` David S. Miller
2000-10-15 12:07   ` Ingo Molnar
2000-10-14 13:33 ` Stephen Tweedie
2000-10-15 12:01   ` Ingo Molnar
2000-10-19 20:16 ` Linus Torvalds [this message]
2000-10-20  5:44   ` oopses in test10-pre4 (was Re: [RFC] atomic pte updates and pae changes, take 3) Ben LaHaise
2000-10-20 17:18     ` Linus Torvalds

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.10.10010191301270.1350-100000@penguin.transmeta.com \
    --to=torvalds@transmeta.com \
    --cc=bcrl@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.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