From: Andrey Savochkin <saw@saw.sw.com.sg>
To: Rik van Riel <riel@conectiva.com.br>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Bill Huey <billh@gnuppy.monkey.org>,
John Levon <moz@compsoc.man.ac.uk>,
linux-mm@kvack.org, "Theodore Y. Ts'o" <tytso@MIT.EDU>,
linux-kernel@vger.kernel.org
Subject: Re: Rik van Riel's VM patch
Date: Mon, 4 Sep 2000 09:47:50 +0800 [thread overview]
Message-ID: <20000904094750.A13518@saw.sw.com.sg> (raw)
In-Reply-To: <Pine.LNX.4.21.0009031743190.1112-100000@duckman.distro.conectiva>; from "Rik van Riel" on Sun, Sep 03, 2000 at 05:47:01PM
Hi,
On Sun, Sep 03, 2000 at 05:47:01PM -0300, Rik van Riel wrote:
> On Sun, 3 Sep 2000, Alan Cox wrote:
>
> > Things like random memory corruption from dropping dirty bits,
> > and some of the others are far more serious showstoppers alas
>
> Indeed, there are 4 major issues left in the VM area:
>
[snip]
> 2) dirty bits can get lost, try_to_swap_out() and other
> places have a race with the hardware
>
> [from mm/vmscan.c, line 60 has a race with the /hardware/]
> 55 if (pte_young(pte)) {
> 56 /*
> 57 * Transfer the "accessed" bit from the page
> 58 * tables to the global page map.
> 59 */
> 60 set_pte(page_table, pte_mkold(pte));
> 61 SetPageReferenced(page);
> 62 goto out_failed;
> 63 }
I wonder about software races.
Page table manipulations in mm/memory.c are guarded by page_table_lock
against concurrent kswapd actions, with the following comments:
/*
* This is a long-lived spinlock. That's fine.
* There's no contention, because the page table
* lock only protects against kswapd anyway, and
* even if kswapd happened to be looking at this
* process we _want_ it to get stuck.
*/
and in the other place
*
* Note the "page_table_lock". It is to protect against kswapd removing
* pages from under us. Note that kswapd only ever _removes_ pages, never
* adds them. As such, once we have noticed that the page is not present,
* we can drop the lock early.
Fine. However, I don't see a trace of page_table_lock in swapping-out code!
And I don't see any other lock which may ensure the serialization.
Am I missing something?
Andrey
--
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/
prev parent reply other threads:[~2000-09-04 1:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-02 17:39 John Levon
2000-09-03 0:10 ` Bill Huey
2000-09-03 0:28 ` Byron Stanoszek
2000-09-03 2:14 ` Jeff V. Merkey
2000-09-03 21:38 ` Peter Rival
2000-09-03 11:47 ` Alan Cox
2000-09-03 20:47 ` Rik van Riel
2000-09-04 1:47 ` Andrey Savochkin [this message]
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=20000904094750.A13518@saw.sw.com.sg \
--to=saw@saw.sw.com.sg \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=billh@gnuppy.monkey.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=moz@compsoc.man.ac.uk \
--cc=riel@conectiva.com.br \
--cc=tytso@MIT.EDU \
/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