mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Indan Zupancic" <indan@nul.nu>
To: "Arjan van de Ven" <arjan@infradead.org>
Cc: "Al Boldi" <a1426z@gawab.com>, linux-kernel@vger.kernel.org
Subject: Re: swap-prefetch:  A smart way to make good use of idle resources  (was: updatedb)
Date: Fri, 27 Jul 2007 23:51:43 +0200 (CEST)	[thread overview]
Message-ID: <52449.81.207.0.53.1185573103.squirrel@secure.samage.net> (raw)
In-Reply-To: <1185568498.2711.5.camel@laptopd505.fenrus.org>

On Fri, July 27, 2007 22:34, Arjan van de Ven wrote:
> On Fri, July 27, 2007 21:43, Al Boldi wrote:
>> IMHO, what everybody agrees on, is that swap-prefetch has a positive effect
>> in some cases, and nobody can prove an adverse effect (excluding power
>> consumption).  The reason for this positive effect is also crystal clear:
>> It prefetches from swap on idle into free memory, ie: it doesn't force
>
> the fact that there is free memory is ... strange. IN principle, Linux
> keeps almost no memory free (except some emergency buffers) so that
> things you swap in prematurely will BY DEFINITION go at the expense of
> other things that could be there....

It's not strange, the use case here is if something memory hungry process
is shut down it leaves behind a lot of free memory. Having things swapped
out while there's free memory is strange, so swap prefetch fills it up again.

> also, they take up seek time (5 to 10 msec), so if you were to read
> something else at the time you get additional latency.

If there's other disk activity swap prefetch shouldn't do much, so this isn't
really true.

>> Conclusion:  Either prove swap-prefetch is broken, or get this merged quick.

There are a whole lot of other requirements too than that it isn't broken (of
which most are fulfilled, but anyway). One reason could be that there's a
better solution out there for the problem swap prefetch tries to solve. That
said, as swap prefetch is here now for a while and that other solution not it's
not such a great argument.

Personally I think that a more generic solution would be better, one that
prefetches the lastly evicted pages back in, not favouring either of swap or
file data, like swap prefetch does now.

Greetings,

Indan



  reply	other threads:[~2007-07-27 21:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-27 19:43 Al Boldi
2007-07-27 20:34 ` Arjan van de Ven
2007-07-27 21:51   ` Indan Zupancic [this message]
2007-07-27 22:06     ` Arjan van de Ven
2007-07-27 22:20       ` Indan Zupancic
2007-07-27 23:34       ` grundig
2007-07-27 23:59         ` Arjan van de Ven
2007-07-28  0:03         ` Indan Zupancic
2007-07-28 15:42           ` grundig
2007-07-28  1:56 ` Chris Snook
2007-07-28  4:17   ` How can we make page replacement smarter (was: swap-prefetch) Al Boldi
2007-07-28  7:27     ` Chris Snook
2007-07-28 11:11       ` Al Boldi
2007-07-29  4:07         ` Rik van Riel
2007-07-29  1:46     ` How can we make page replacement smarter Rik van Riel
2007-07-29 13:09       ` Alan Cox
2007-07-29 15:01         ` Rik van Riel
2007-07-29 14:55       ` Al Boldi
2007-07-28  4:18   ` swap-prefetch: A smart way to make good use of idle resources (was: updatedb) Al Boldi

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=52449.81.207.0.53.1185573103.squirrel@secure.samage.net \
    --to=indan@nul.nu \
    --cc=a1426z@gawab.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®