public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <landley@webofficenow.com>
To: Daniel Phillips <phillips@bonn-fries.net>,
	Marcelo Tosatti <marcelo@conectiva.com.br>,
	Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org, Ben LaHaise <bcrl@redhat.com>,
	Mike Galbraith <mikeg@wen-online.de>
Subject: Re: [RFC] Optimization for use-once pages
Date: Tue, 24 Jul 2001 15:35:21 -0400	[thread overview]
Message-ID: <01072415352102.00631@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.21.0107241750090.2263-100000@freak.distro.conectiva> <01072501092707.00520@starship>
In-Reply-To: <01072501092707.00520@starship>

On Tuesday 24 July 2001 19:09, Daniel Phillips wrote:
> On Tuesday 24 July 2001 22:53, Marcelo Tosatti wrote:
> > On Tue, 24 Jul 2001, Rik van Riel wrote:
> > > On Tue, 24 Jul 2001, Marcelo Tosatti wrote:
> > > > On Tue, 24 Jul 2001, Daniel Phillips wrote:
> > > > > Today's patch tackles the use-once problem, that is, the
> > > > > problem of
> > > >
> > > > Well, as I see the patch should remove the problem where
> > > > drop_behind() deactivates pages of a readahead window even if
> > > > some of those pages are not "used-once" pages, right ?
> > > >
> > > > I just want to make sure the performance improvements you're
> > > > seeing caused by the fix of this _particular_ problem.
> > >
> > > Fully agreed.
> > >
> > > Especially since it was a one-liner change from worse
> > > performance to better performance (IIRC) it would be
> > > nice to see exactly WHY the system behaves the way it
> > > does.  ;)
> >
> > Yes.
> >
> > Daniel's patch adds "drop behind" (that is, adding swapcache
> > pages to the inactive dirty) behaviour to swapcache pages.
> >
> > This is a _new_ thing, and I would like to know how that is changing
> > the whole VM behaviour..
>
> Yes, absolutely.  I knew I was doing that but I also thought it wouldn't
> hurt.  Rather it's part of a transition towards a full unification of
> the file and swap paths.

Stupid question time:

So basically (lemme get this straight):

All VM allocation in 2.4 has become some variant of mmap.  Either we're 
mmaping in the executable and libraries when we exec, we're mmaping in a 
file, or we're mmaping in the swap file/block device which is how we do 
anonymous page allocations.

And this is why 2.4 keeps wanting to allocate swap space for pages that are 
still in core.  And why the 2.4 VM keeps going ballistic on boxes that have 
more physical DRAM than they have swap space.  (I.E. the 2X swap actually 
being NECESSARY now, and 256 megs of "overflow" swap files for a 2 gig ram 
box actually hurting matters by confusing the VM if swap is enabled AT ALL, 
since it clashes conceptually.)

So getting swap to exclude in-core pages (so they don't take up space in the 
swap file) would therefore be conceptually similar to implementing "files 
with holes in them" support like EXT2 has for these swap file mmaps.

And the argument that doing so might "fragment the swap file", while true, is 
actually a bit of a red herriing because the real objection is that it 
unnecessarily complicates an otherwise clean and straightforward concept.

Am I even close here?  (That was the stupid question I mentioned earlier, 
knew I'd get around to it...)  Reading the code's a bit harder when you don't 
have any sort of conceptual understanding of what the heck it's actually 
trying to do.

> Basically, I just left that part of it hanging.  If you check my
> detailed timings you'll see all my test runs have swaps=0, basically
> because I didn't really want to hear about it just then ;-)
>
> I was pretty sure it could be fixed if it broke.

Just thought I'd say that personally, I think your greatest contribution in 
this whole thread is that somebody finally clearly explained how the new VM 
works, using small words.  The actual improvements are just gravy.  Yes I'm 
biased.  :)

I don't suppose we could get some variant of your initial post into 
/Documentation/vm/HowItActuallyWorks.txt?  (I take it the biggest "detail" 
you glossed over was the seperation of memory into zones?)

> --
> Daniel

Rob

  reply	other threads:[~2001-07-25  4:38 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-24  3:47 [RFC] Optimization for use-once pages Daniel Phillips
2001-07-24 12:38 ` jlnance
2001-07-24 16:56   ` Rik van Riel
2001-07-25  0:04     ` Daniel Phillips
2001-07-25  0:43     ` Anton Altaparmakov
2001-07-25  1:30       ` Daniel Phillips
2001-07-25 21:18         ` Steve Lord
2001-07-24 16:48 ` Linus Torvalds
2001-07-24 17:04   ` Rik van Riel
2001-07-24 18:14     ` Daniel Phillips
2001-07-24 18:15       ` Rik van Riel
2001-07-24 19:41         ` Is /dev/epoll scheduled for official inclusion anytime soon? David E. Weekly
2001-07-24 20:05           ` Rik van Riel
2001-07-24 20:26           ` linux partitioning in IA64 hiufungeric.tse
2001-07-25  9:29             ` Mike A. Harris
2001-07-24 20:24   ` [RFC] Optimization for use-once pages Patrick Dreker
2001-07-24 20:32     ` Rik van Riel
2001-07-24 22:16       ` Patrick Dreker
2001-07-24 22:25         ` Rik van Riel
2001-07-25  0:27           ` Linus Torvalds
2001-07-25  8:20             ` Patrick Dreker
2001-07-25 12:57               ` Martin Devera
2001-07-25 14:16               ` Daniel Phillips
2001-07-24 20:33     ` Linus Torvalds
2001-07-25  1:25       ` Daniel Phillips
2001-07-25  0:18     ` Daniel Phillips
2001-07-24 20:27 ` Marcelo Tosatti
2001-07-24 22:05   ` Rik van Riel
2001-07-24 20:53     ` Marcelo Tosatti
2001-07-24 22:27       ` Rik van Riel
2001-07-24 23:09       ` Daniel Phillips
2001-07-24 19:35         ` Rob Landley [this message]
2001-07-25  6:10           ` Marcelo Tosatti
2001-07-25  8:32           ` Eric W. Biederman
2001-07-25 12:53             ` Daniel Phillips
2001-07-25 16:05               ` Eric W. Biederman
2001-07-25 12:57           ` Daniel Phillips
2001-07-25  5:12       ` Andrew Morton
2001-07-25  6:33         ` Marcelo Tosatti
2001-07-30 18:09         ` Marcelo Tosatti
2001-07-24 22:41     ` Daniel Phillips
2001-07-24 22:22   ` Daniel Phillips
2001-07-25  2:31 ` Marcelo Tosatti
     [not found] <010301c11463$1ee00440$294b82ce@connecttech.com>
2001-07-24 17:07 ` Rik van Riel
2001-07-24 17:42   ` Stuart MacDonald
2001-07-24 17:51     ` Rik van Riel
2001-07-24 18:09       ` Stuart MacDonald
2001-07-24 18:15       ` Mike Castle
2001-07-24 18:21         ` Rik van Riel
2001-07-24 17:44   ` Mike Castle
2001-07-24 17:52     ` Rik van Riel
     [not found] <0107251802300B.00907@starship>
2001-07-25 16:41 ` Rik van Riel
2001-07-25 17:46   ` Daniel Phillips
2001-07-26  8:36   ` Eric W. Biederman
2001-07-26 12:06     ` Daniel Phillips
2001-07-26 10:38       ` Marcelo Tosatti
2001-07-26 12:17         ` Daniel Phillips
  -- strict thread matches above, loose matches on Subject: below --
2001-07-26  3:27 Ed Tomlinson

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=01072415352102.00631@localhost.localdomain \
    --to=landley@webofficenow.com \
    --cc=bcrl@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=mikeg@wen-online.de \
    --cc=phillips@bonn-fries.net \
    --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