From: kanoj@google.engr.sgi.com (Kanoj Sarcar)
To: "Benjamin C.R. LaHaise" <blah@kvack.org>
Cc: erik@arbat.com, ak-uu@muc.de, linux-mm@kvack.org
Subject: Re: Assumed Failure rates in Various o.s's ?
Date: Fri, 21 May 1999 10:06:47 -0700 (PDT) [thread overview]
Message-ID: <199905211706.KAA50091@google.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.3.95.990521101041.17710A-100000@as200.spellcast.com> from "Benjamin C.R. LaHaise" at May 21, 99 10:25:42 am
>
> On Fri, 21 May 1999, Erik Corry wrote:
>
> > According to Andi you already fixed this with a read lock that
> > prevents mmap and mmunmap from doing anything while the copy
> > is running. This makes sense, since if you do it right with a
> > readers/writers lock you can keep out mmap without serialising
> > copy_to_user or copy_from_user.
>
> I really like the cleanliness of this approach, but it's troublesome:
> memory allocations in other threads would then get blocked during large
> IOs -- very bad. What if we instead move from the mm level semaphore to a
> per vma locking scheme? The mmap semaphore could become a spinlock for
> fudging with list of vmas, and mmap/page faults/... could lock the
> specific vma. Or would this be too heavy?
>
I am sorry I did not clear up this misconception in your original mail.
Though the uaccess procedures in my patch are called upage_rlock/upage_wlock,
they do not do any kind of locking. The code looks at the pte, decides
whether it is in a readable/writable state, and if so, fastpaths out,
returning a kernel virtual address for the user page, that kernel code can
use (without incurring faults). The reason this will work is because
uaccess callers already have the kernel_lock, so no one can steal the
page (or munmap it). If the page is not in the proper state for the
access, then the procedure longpaths into grabbing the mmap_sem and
doing a handle_mm_fault, which it keeps on doing until the page is in
the proper state.
Kanoj
--
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/
next prev parent reply other threads:[~1999-05-21 17:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199905191428.QAA1295681@beryllium.daimi.au.dk>
1999-05-19 17:37 ` Assumed Failure rates in Various o.s's ? Kanoj Sarcar
1999-05-21 10:07 ` Erik Corry
1999-05-21 14:25 ` Benjamin C.R. LaHaise
1999-05-21 14:54 ` Erik Corry
1999-05-21 16:02 ` Benjamin C.R. LaHaise
1999-05-21 17:06 ` Kanoj Sarcar [this message]
1999-05-21 17:23 ` 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=199905211706.KAA50091@google.engr.sgi.com \
--to=kanoj@google.engr.sgi.com \
--cc=ak-uu@muc.de \
--cc=blah@kvack.org \
--cc=erik@arbat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.