public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: changing mm->mmap_sem  (was: Re: system call for process information?)
Date: 18 Mar 2001 10:13:11 -0800	[thread overview]
Message-ID: <992trn$lk1$1@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0103181407520.1426-100000@mikeg.weiden.de> <Pine.LNX.4.21.0103181122480.13050-100000@imladris.rielhome.conectiva>

In article <Pine.LNX.4.21.0103181122480.13050-100000@imladris.rielhome.conectiva>,
Rik van Riel  <riel@conectiva.com.br> wrote:
>
>OK, I'll write some code to prevent multiple threads from
>stepping all over each other when they pagefault at the
>same address.
>
>What would be the preferred method of fixing this ?
>
>- fixing do_swap_page and all ->nopage functions

There is no need to fix gthe "nopage" functions. They never see the page
table directly anyway. 

So the only thing that _should_ be needed is to make sure that
do_no_page(), do_swap_page() and do_anonymous_page() will re-aquire the
mm->page_table_lock and undo their work if it turns out that the page
table entry is no longer empty.. 

(do_wp_page() should already be ok in this regard - it already does this
exactly because present pagetable entries can already race with kswapd. 
What we're adding is that _nonpresent_ page table entries can race with
multiple invocations of concurrent page faults)

>- hacking handle_mm_fault to make sure no overlapping
>  pagefaults will be served at the same time

No. The whole reason the rw_semaphores were done in the first place was
to allow page faults to happen concurrently to allow threaded
applictions to scale up even when faulting.

		Linus

  reply	other threads:[~2001-03-18 18:14 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.33.0103181407520.1426-100000@mikeg.weiden.de>
2001-03-18 14:43 ` changing mm->mmap_sem (was: Re: system call for process information?) Rik van Riel
2001-03-18 18:13   ` Linus Torvalds [this message]
2001-04-24 11:44     ` [PATCH] Single user linux imel96
2001-04-24 12:04       ` Alexander Viro
2001-04-24 12:44         ` imel96
2001-04-24 12:58           ` Daniel Stone
2001-04-24 13:27             ` imel96
2001-04-24 13:38               ` Daniel Stone
2001-04-24 14:04                 ` problem found (was Re: [PATCH] Single user linux) imel96
2001-04-24 14:06                   ` Daniel Stone
2001-04-24 14:47                     ` Xavier Bestel
2001-04-25 18:13                   ` Paul Jakma
2001-04-25  0:01                 ` [PATCH] Single user linux Aaron Lehmann
2001-04-25  0:07                   ` Daniel Stone
2001-04-25  0:16                     ` Alan Cox
2001-04-25  0:34                       ` Daniel Stone
2001-04-25  0:52                         ` Gerhard Mack
2001-04-25  7:46                           ` Ronald Bultje
2001-04-25 14:17                             ` Disconnect
2001-04-27 20:06                               ` Jim Gettys
2001-04-26 19:41                           ` Pavel Machek
2001-04-27 19:00                             ` Erik Mouw
2001-04-27 13:12                         ` Robert Varga
2001-04-27 12:42                           ` [OT] linux on pda was " Collectively Unconscious
2001-04-27 19:05                             ` Erik Mouw
2001-04-27 13:34                           ` Daniel Stone
2001-04-25  0:20                     ` Aaron Lehmann
2001-04-25  0:32                       ` Daniel Stone
2001-04-25  0:35                         ` Aaron Lehmann
2001-04-25  0:43                           ` Daniel Stone
2001-04-25  7:45                         ` Alan Cox
2001-04-25  7:55                           ` Daniel Stone
2001-04-25 15:07                           ` Jonathan Lundell
2001-04-25 14:42                         ` Jordan Crouse
2001-04-26 19:47                         ` Pavel Machek
2001-04-25  1:12                       ` Disconnect
2001-04-25  0:26                   ` Jonathan Lundell
2001-04-25  7:13                     ` Mike A. Harris
2001-04-26 19:54                       ` agenda & vtech helio [was Re: [PATCH] Single user linux] Pavel Machek
2001-04-25  7:04                   ` [PATCH] Single user linux Mike A. Harris
2001-04-26 19:35                 ` Pavel Machek
2001-04-27 14:26                   ` Daniel Stone
2001-04-24 13:40               ` Mohammad A. Haque
2001-04-25  5:29               ` Ben Ford
2001-04-24 12:59           ` Alexander Viro
2001-04-24 13:02           ` Sean Hunter
2001-04-24 13:03           ` Roland Seuhs
2001-04-24 13:50             ` Mike A. Harris
2001-04-24 13:13           ` Richard B. Johnson
2001-04-24 13:37             ` imel96
2001-04-25  7:57               ` Helge Hafting
2001-04-25 10:42               ` Albert D. Cahalan
2001-04-24 14:03           ` Alan Cox
2001-04-24 14:10             ` imel96
2001-04-24 14:27               ` Mike A. Harris
2001-04-24 14:30               ` Alan Cox
2001-04-24 15:07             ` Jeremy Jackson
2001-04-24 17:43           ` Russell King
2001-04-24 18:37           ` Garett Spencley
2001-04-24 12:51       ` Mohammad A. Haque
2001-04-24 13:07         ` Alexander Viro
2001-04-24 12:52       ` [OFFTOPIC] " Mike A. Harris
2001-04-24 13:18         ` Tomas Telensky
2001-04-24 13:34           ` Mohammad A. Haque
2001-04-24 13:40             ` Alexander Viro
2001-04-24 14:18               ` Alan Cox
2001-04-24 14:22                 ` Alexander Viro
2001-04-24 14:37                   ` Alan Cox
2001-04-24 14:41                     ` Alexander Viro
2001-04-24 14:47                     ` CaT
2001-04-24 14:59                       ` Alan Cox
2001-04-24 15:11                         ` CaT
2001-04-24 15:53                           ` Alan Cox
2001-04-24 16:04                             ` Alex Riesen
2001-04-24 17:02                             ` Jesse Pollard
2001-04-24 17:16                               ` Alan Cox
2001-04-24 17:30                             ` Markus Schaber
2001-04-24 14:30                 ` Gábor Lénárt
2001-04-24 14:49                   ` Pjotr Kourzanoff
2001-04-24 14:56                     ` Gábor Lénárt
2001-04-24 14:59                     ` CaT
2001-04-24 15:17                       ` Pjotr Kourzanoff
2001-04-24 14:50                 ` Gerhard Mack
2001-04-24 15:00                   ` Alan Cox
2001-04-24 13:37           ` Alexander Viro
2001-04-24 13:52             ` Tomas Telensky
2001-04-24 14:07               ` Alexander Viro
2001-04-24 19:03           ` David Gómez 
2001-04-25  5:26           ` Ben Ford
2001-04-24 17:55       ` J Sloan
2001-04-24 17:06     ` Stephen Satchell
     [not found] <200103181813.KAA22153@penguin.transmeta.com>
2001-03-18 20:59 ` changing mm->mmap_sem (was: Re: system call for process information?) Rik van Riel
2001-03-19  1:21   ` Linus Torvalds
2001-03-19  2:59     ` Rik van Riel
2001-03-18  9:34 Manfred Spraul
2001-03-18 10:56 ` Rik van Riel
2001-03-19 12:54 ` Stephen C. Tweedie
  -- strict thread matches above, loose matches on Subject: below --
2001-03-14 19:19 system call for process information? Rik van Riel
2001-03-15 12:24 ` changing mm->mmap_sem (was: Re: system call for process information?) Rik van Riel
2001-03-16  9:49   ` Stephen C. Tweedie
2001-03-16 11:50     ` Rik van Riel
2001-03-16 12:53       ` Stephen C. Tweedie
2001-03-18  7:23         ` Rik van Riel
2001-03-18  9:56           ` Mike Galbraith
2001-03-18 10:46             ` Rik van Riel
2001-03-18 12:33               ` Mike Galbraith

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='992trn$lk1$1@penguin.transmeta.com' \
    --to=torvalds@transmeta.com \
    --cc=linux-kernel@vger.kernel.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