public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
[parent not found: <200103181813.KAA22153@penguin.transmeta.com>]
* Re: changing mm->mmap_sem  (was: Re: system call for process information?)
@ 2001-03-18  9:34 Manfred Spraul
  2001-03-18 10:56 ` Rik van Riel
  2001-03-19 12:54 ` Stephen C. Tweedie
  0 siblings, 2 replies; 105+ messages in thread
From: Manfred Spraul @ 2001-03-18  9:34 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-kernel, Stephen C. Tweedie

>
> The problem is that mmap_sem seems to be protecting the list
> of VMAs, so taking _only_ the page_table_lock could let a VMA
> change under us while a page fault is underway ...

No, that can't happen.
VMA changes only happen if both the mmap_sem and the page table lock is
acquired. (check insert_vm() at the end of mm/mmap.c)
The page fault path uses the map_sem, kswaps uses page_table_lock.

<< from your patch:
--- linux-2.4.2-ac20-vm/mm/vmscan.c.orig	Sat Mar 17 11:30:49 2001
+++ linux-2.4.2-ac20-vm/mm/vmscan.c	Sat Mar 17 20:53:10 2001
@@ -231,6 +231,7 @@
 	 * Find the proper vm-area after freezing the vma chain
 	 * and ptes.
 	 */
+	down_read(&mm->mmap_sem);
                spin_lock(&mm->page_table_lock);
 >>>>

Why do you acquire the mmap semaphore in swapout_mm()? The old rule was
that kswapd should never sleep on the mmap semaphore. Isn't there a
deadlock if mmap sem is already acquired? I don't remember the details.

>
> The problem is that mmap_sem seems to be protecting the list
> of VMAs, so taking _only_ the page_table_lock could let a VMA
> change under us while a page fault is underway ...

I remember that the pmd_alloc() and pte_alloc() functions need
additional locking.

--
    Manfred


^ permalink raw reply	[flat|nested] 105+ messages in thread
* Re: system call for process information?
@ 2001-03-14 19:19 Rik van Riel
  2001-03-15 12:24 ` changing mm->mmap_sem (was: Re: system call for process information?) Rik van Riel
  0 siblings, 1 reply; 105+ messages in thread
From: Rik van Riel @ 2001-03-14 19:19 UTC (permalink / raw)
  To: george anzinger
  Cc: Martin Dalecki, Albert D. Cahalan, npsimons,
	Guennadi Liakhovetski, Alexander Viro, linux-kernel

On Wed, 14 Mar 2001, george anzinger wrote:

> Is it REALLY necessary to prevent them from seeing an
> inconsistent state?  Seems to me that in the total picture (i.e.
> system wide) they will never see a consistent state, so why be
> concerned with a small corner of the system.

You're right. All we need to make sure of is that the address
space we want to print info about doesn't go away while we're
reading the stats ...

(I think ... but we'll need to look at the procfs code in more
detail)

regards,

Rik
--
Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml

Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

		http://www.surriel.com/
http://www.conectiva.com/	http://distro.conectiva.com/


^ permalink raw reply	[flat|nested] 105+ messages in thread

end of thread, other threads:[~2001-04-27 20:07 UTC | newest]

Thread overview: 105+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox