linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "Juan J. Quintela" <quintela@fi.udc.es>,
	linux-mm@kvack.org, Kanoj Sarcar <kanoj@google.engr.sgi.com>
Subject: Re: Oops in __free_pages_ok (pre7-1) (Long)
Date: Wed, 3 May 2000 02:38:47 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.21.0005030228300.3498-100000@alpha.random> (raw)
In-Reply-To: <Pine.LNX.4.21.0005030008150.1677-100000@alpha.random>

On Wed, 3 May 2000, Andrea Arcangeli wrote:

>Making swap cache dirty will take a swap entry locked indefinitely (well,

I thought some more at it and I think the best thing to do is to reduce
the ability of the swap entry bit. The swap entry bit should keep to be
effective only as far as the page is an anonymous page not shared and it
should never be set on a swap cache page.

Once the swap-entry-page is mapped by more than one process we don't know
anymore which was the original task that was swapped out in such previous
location (if the parent or the child) so during cow we don't know if the
new page or the old page should get the entry bit. I'm not going to
discover that ;).

So what I propose is to set the entry bit in the swapin path only if we
take over the swap cache, and to clear it in do_wp_page during COW and in
free_page_and_swap_cache unconditionally (we know if it's set the page was
not shared). We should also set it while taking over the swap cache in the
cow after removing the page from the swap cache (in the case the page
isn't shared).

This way the swap-entry logic will take care only of the simple case where
a big task gets swapped out then a little part gets swapped in and we'll
try to swapout it again in the same place. That looks sane feature to me.

Note that dirty swap cache during COW have the same problem to choose if
the swap entry should be inherit by the old page or by the new page (so
it's not going to be a solution for that). My conclusion is that dropping
the persistence on the swap during cow looks rasonable action.

Comments?

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/

  reply	other threads:[~2000-05-03  0:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-02  1:08 Juan J. Quintela
2000-05-02 20:43 ` Linus Torvalds
2000-05-02 21:31   ` Juan J. Quintela
2000-05-02 21:40     ` Linus Torvalds
2000-05-02 22:06       ` Juan J. Quintela
2000-05-02 22:26       ` Andrea Arcangeli
2000-05-03  0:38         ` Andrea Arcangeli [this message]
2000-05-03  0:45           ` Linus Torvalds
2000-05-03  1:28             ` Andrea Arcangeli
2000-05-03 10:37           ` Rik van Riel
2000-05-02 22:02     ` Andrea Arcangeli
2000-05-02 22:13       ` Juan J. Quintela
2000-05-03  0:43       ` Andrea Arcangeli
2000-05-02 22:54     ` Andrea Arcangeli
2000-05-02 22:08 ` Andrea Arcangeli
2000-05-02 23:58   ` Juan J. Quintela

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.0005030228300.3498-100000@alpha.random \
    --to=andrea@suse.de \
    --cc=kanoj@google.engr.sgi.com \
    --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