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, torvalds@transmeta.com, sct@redhat.com,
	andrea@suse.de
Subject: Re: [RFC] [RFT] [PATCH] kanoj-mm9-2.2.10 simplify swapcache/shm code interaction
Date: Mon, 21 Jun 1999 14:32:56 +0100 (BST)	[thread overview]
Message-ID: <14190.16136.552955.557245@dukat.scot.redhat.com> (raw)
In-Reply-To: <199906192314.QAA33843@google.engr.sgi.com>

Hi,

On Sat, 19 Jun 1999 16:14:26 -0700 (PDT), kanoj@google.engr.sgi.com
(Kanoj Sarcar) said:

> There is no reason for shared memory pages to have to be marked
> PG_swap_cache to fool the underlying swap io routines. 

That code was never intended to "fool" anyone: the swap IO code is able
to do read/write swap even in the absense of swap cache entries for the
page.  Only recently have we forced all swap to go through the swap
cache, but the IO routines are still capable of doing it both ways.

> -	if (PageSwapCache(page)) {
> +	if (!shmfs) {
>  		/* Make sure we are the only process doing I/O with this swap page. */
>  		while (test_and_set_bit(offset,p->swap_lockmap)) {
>  			run_task_queue(&tq_disk);

This looks wrong, conceptually.  I'd prefer to see us do the locking any
time the page happens to have an appropriate swap lock map bit.
PageSwapCache() is the right test in this case: the rw_swap_page stuff
shouldn't care about whether it is shmfs calling it or not.  It should
just care about doing the swap cache locking correctly if that happens
to be required.

--Stephen
--
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-06-21 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-19 23:14 Kanoj Sarcar
1999-06-21 13:32 ` Stephen C. Tweedie [this message]
1999-06-21 17:17   ` Kanoj Sarcar
1999-06-21 17:51     ` Stephen C. Tweedie
1999-06-21 18:31       ` Andrea Arcangeli
1999-06-21 19:12         ` [RFC] [RFT] [PATCH] kanoj-mm9-2.2.10 simplify swapcache/shm code 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=14190.16136.552955.557245@dukat.scot.redhat.com \
    --to=sct@redhat.com \
    --cc=andrea@suse.de \
    --cc=kanoj@google.engr.sgi.com \
    --cc=linux-mm@kvack.org \
    --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