linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@redhat.com>
To: ms <masp0008@stud.uni-sb.de>, Linus Torvalds <torvalds@transmeta.com>
Cc: linux-mm@kvack.org, Stephen Tweedie <sct@redhat.com>
Subject: [PATCH] Re: mm synchronization question
Date: Wed, 28 Jul 1999 05:34:06 +0100 (BST)	[thread overview]
Message-ID: <14238.34878.790624.59746@dukat.scot.redhat.com> (raw)
In-Reply-To: <003101bed81b$1d39dac0$30b16086@sl16es04.phil.uni-sb.de>

Hi,

On Tue, 27 Jul 1999 12:30:39 +0200, "ms" <masp0008@stud.uni-sb.de> said:

> I think I found a minor bug: do_wp_page() does not call spin_unlock()
> if called with bad parameters: if "goto bad_wp_page" is executed, then
> noone unlocks the page_table_lock spinlock.

Indeed, that looks like a genuine fault.  Patch below.
 
> My second question is the mm semaphore: It seems that if in a multi
> threaded application several threads access a large mmaped file, that
> then all page-in operations are serialized (including waiting for the
> disk IO). Is that correct?  

Only partially.  The IOs are serialised, but the readahead IOs that the
page faults implicitly trigger are asynchronous to that.

> Are there any plans to change that?

Not right now afaik, but we probably could do it at some point.  It
would be very easy to do a simple solution which allowed concurrent page
faults while still barring mmap()/munmap() operations from colliding
with the fault.

--Stephen

----------------------------------------------------------------
--- mm/memory.c~	Wed Jul 28 00:52:42 1999
+++ mm/memory.c	Wed Jul 28 05:30:48 1999
@@ -846,6 +855,7 @@
 	return 1;
 
 bad_wp_page:
+	spin_unlock(&tsk->mm->page_table_lock);
 	printk("do_wp_page: bogus page at address %08lx (%08lx)\n",address,old_page);
 	return -1;
 }
--
To unsubscribe, send a message with 'unsubscribe linux-mm' 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-07-28  4:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-27 10:30 ms
1999-07-28  4:34 ` Stephen C. Tweedie [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=14238.34878.790624.59746@dukat.scot.redhat.com \
    --to=sct@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=masp0008@stud.uni-sb.de \
    --cc=torvalds@transmeta.com \
    /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