linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Hugh Dickins <hugh@veritas.com>
Cc: Rik van Riel <riel@conectiva.com.br>,
	"David S. Miller" <davem@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: 2.4.14 + Bug in swap_out.
Date: 21 Nov 2001 09:26:21 -0700	[thread overview]
Message-ID: <m1y9l0ytsi.fsf@frodo.biederman.org> (raw)
In-Reply-To: <Pine.LNX.4.21.0111211558160.1394-100000@localhost.localdomain>

Hugh Dickins <hugh@veritas.com> writes:

> On Wed, 21 Nov 2001, Rik van Riel wrote:
> > On Wed, 21 Nov 2001, Hugh Dickins wrote:
> > >
> > > fork and exec are well ordered in how they add to the mmlist,
> > > and that ordering (children after parent) suited swapoff nicely,
> > > to minimize duplication of a swapent while it's being unused;
> > > except swap_out randomized the order by cycling init_mm around it.
> > 
> > Urmmm, so the code was obfuscated in order to optimise
> > swapoff() ?
> 
> To speed swapoff, I changed the code back to how fork (see comment
> on "Add it to the mmlist" in fork.c old and new) and exec seemed to
> intend.  I don't see see that I _obfuscated_ the code:
> what's so difficult about swap_mm?

Practical test when I pointed out that something needed to be done
(and I didn't see the code in mmput) both David & Rik didn't even
see the problem much less where it was worked around.  And neither
of the saw the code in mmput.  If people can look at the code
and see what is going on that is hard to follow, by definition.

The primary problem with swap_mm is that swap_mm is used totally
unexpectedly in a different file.  Instead of it's usage being small
local and contained.

> > Exactly how bad was the "mmlist randomising" for swapoff() ?
> 
> It was unnecessary and counter-productive, I changed it.
> Exact number?  No, but small.

There is some sense in allowing swapoff not to check new processes
but...  The only optimization that really makes sense with swapoff is
to turn it inside out and traverse each process only once...  With
possibly a little of the current logic to handle the shared swap case.

Eric
--
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-mm.org/

       reply	other threads:[~2001-11-21 16:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.21.0111211558160.1394-100000@localhost.localdomain>
2001-11-21 16:26 ` Eric W. Biederman [this message]
     [not found] <Pine.LNX.4.21.0111211515210.1357-100000@localhost.localdomain>
2001-11-21 15:39 ` Rik van Riel
2001-11-21  6:01 Eric W. Biederman
2001-11-21  6:29 ` David S. Miller
2001-11-21  6:37   ` Eric W. Biederman
2001-11-21 12:17     ` Rik van Riel
2001-11-21 13:31       ` Eric W. Biederman
2001-11-21 14:20         ` Rik van Riel
2001-11-21 14:21           ` Eric W. Biederman
2001-11-21 12:13 ` Rik van Riel

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=m1y9l0ytsi.fsf@frodo.biederman.org \
    --to=ebiederm@xmission.com \
    --cc=davem@redhat.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@conectiva.com.br \
    /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