From: Andrea Arcangeli <andrea@suse.de>
To: "Juan J. Quintela" <quintela@fi.udc.es>
Cc: linux-mm@kvack.org, linux-kernel@vger.rutgers.edu,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: Helding the Kernel lock while doing IO???
Date: Sat, 6 May 2000 15:16:50 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.21.0005060509050.2332-100000@alpha.random> (raw)
In-Reply-To: <yttpur0wjlk.fsf@vexeta.dc.fi.udc.es>
On 6 May 2000, Juan J. Quintela wrote:
>I am losing some detail?
kernel lock is released by schedule(). (the only problem of swapin are the
races with swapoff)
>diff -u -urN --exclude=CVS --exclude=*~ --exclude=.#* --exclude=TAGS pre7-6/ipc/shm.c testing2/ipc/shm.c
>--- pre7-6/ipc/shm.c Fri May 5 23:58:56 2000
>+++ testing2/ipc/shm.c Sat May 6 02:39:17 2000
>@@ -1379,10 +1379,11 @@
> if (!page) {
> lock_kernel();
> swapin_readahead(entry);
>- page = read_swap_cache(entry);
>+ page = read_swap_cache_async(entry, 0);
> unlock_kernel();
> if (!page)
> goto oom;
>+ wait_on_page(page);
> }
> delete_from_swap_cache(page);
> page = replace_with_highmem(page);
>diff -u -urN --exclude=CVS --exclude=*~ --exclude=.#* --exclude=TAGS pre7-6/mm/memory.c testing2/mm/memory.c
>--- pre7-6/mm/memory.c Fri May 5 23:58:56 2000
>+++ testing2/mm/memory.c Sat May 6 02:02:53 2000
>@@ -1038,11 +1038,10 @@
> if (!page) {
> lock_kernel();
> swapin_readahead(entry);
>- page = read_swap_cache(entry);
>+ page = read_swap_cache_async(entry, 0);
> unlock_kernel();
> if (!page)
> return -1;
>-
> flush_page_to_ram(page);
> flush_icache_page(vma, page);
> }
The above patch would break swapin.
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
prev parent reply other threads:[~2000-05-06 13:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-06 1:30 Juan J. Quintela
2000-05-06 1:34 ` Helding the Kernel lock while doing IO??? (take 2) Juan J. Quintela
2000-05-06 11:48 ` Helding the Kernel lock while doing IO??? Stephen C. Tweedie
2000-05-14 22:02 ` PATCH: " Juan J. Quintela
2000-05-06 13:16 ` Andrea Arcangeli [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=Pine.LNX.4.21.0005060509050.2332-100000@alpha.random \
--to=andrea@suse.de \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=quintela@fi.udc.es \
--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