linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@redhat.com>
To: Kanoj Sarcar <kanoj@google.engr.sgi.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.rutgers.edu,
	Stephen Tweedie <sct@redhat.com>
Subject: Re: [RFT] [PATCH] kanoj-mm1-2.2.5 ia32 big memory patch
Date: Tue, 11 May 1999 00:41:32 +0100 (BST)	[thread overview]
Message-ID: <14135.28332.780955.729082@dukat.scot.redhat.com> (raw)
In-Reply-To: <199905101734.KAA43772@google.engr.sgi.com>

Hi,

On Mon, 10 May 1999 10:33:59 -0700 (PDT), kanoj@google.engr.sgi.com
(Kanoj Sarcar) said:

> There are probably a lot of problems with the code as it stands
> today. Reviewers, please let me know of any possible improvements.
> Any ideas on how to improve the uaccess performance will also be
> greatly appreciated. Testers, your input will be most valuable.

On a first scan one thing in particular jumped out:

+/*
+ * validate in a user page, so that the kernel can use the kernel direct
+ * mapped vaddr for the physical page to access user data. This locking
+ * relies on the fact that the caller has kernel_lock held, which restricts
+ * kswapd (or anyone else looking for a free page) from running and stealing 
+ * pages. By the same token, grabbing mmap_sem is not needed. 
+ */

Unfortunately, mmap_sem _is_ needed here.  Both find_extend_vma and
handle_mm_fault need it.  You can't modify or block while scanning the
vma list without it, or you risk breaking things in threaded
applications (for example, taking a page fault in handle_mm_fault
without it can be nasty if you are in the middle of a munmap at the
time).

--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

  reply	other threads:[~1999-05-10 23:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-10 17:33 Kanoj Sarcar
1999-05-10 23:41 ` Stephen C. Tweedie [this message]
1999-05-11  0:10   ` Kanoj Sarcar
1999-05-11  0:16     ` Stephen C. Tweedie
1999-05-12  3:19       ` Kanoj Sarcar

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=14135.28332.780955.729082@dukat.scot.redhat.com \
    --to=sct@redhat.com \
    --cc=kanoj@google.engr.sgi.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.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