mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Malcolm Beattie <mbeattie@clueful.co.uk>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Dike <jdike@karaya.com>,
	David Woodhouse <dwmw2@infradead.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Benjamin LaHaise <bcrl@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] Arch option to touch newly allocated pages
Date: Wed, 6 Mar 2002 21:27:00 +0000	[thread overview]
Message-ID: <20020306212700.A16144@clueful.co.uk> (raw)
In-Reply-To: <200203062025.PAA03727@ccure.karaya.com> <E16iiQQ-00087K-00@the-village.bc.nu>
In-Reply-To: <E16iiQQ-00087K-00@the-village.bc.nu>; from alan@lxorguk.ukuu.org.uk on Wed, Mar 06, 2002 at 08:54:14PM +0000

Alan Cox writes:
> > Yeah, MADV_DONTNEED looks right.  UML and Linux/s390 (assuming VM has the
> > equivalent of MADV_DONTNEED) would need a hook in free_pages to make that
> > happen.
> 
> VM allows you to give it back a page and if you use it again you get a
> clean copy.

Yep, clean as in a page of zeroes when you touch it. (DIAGNOSE X'10' as
documented in the "CP Programming Services" manual, to be precise).

>             What it seems to lack is the more ideal "here have this page
> and if I reuse it trap if you did throw it out" semantic.

We're looking at ways of having fancier memory management information
pass between Linux and CP (it's safer to say CP (the "kernel" part of
VM/ESA and z/VM) than VM, given the ambiguous and confusing dual
meaning of "VM" otherwise :-).

> > > That BTW is an issue for more than UML - it has a bearing on running
> > > lots of Linux instances on any supervisor/virtualising system like S/390
> > 
> > On a side note, the "unused memory is wasted memory" behavior that UML and 
> > Linux/s390 inherit is also less than optimal for the host.
> 
> Yes. I believe IBM folks are studying that

Indeed. A "quich hack" that turns out to have rather useful, fun
properties is to have a little device driver (can be a module) which
stores "negative pages" in the page cache by allocating page cache
pages for the device's inode and then invoking the CP "release page"
call mentioned above. Linux thinks the page is "useful" and so keeps
it around until memory pressure kicks it out whereas the underlying
CP knows it's a hole making the resident size and working set of the
Linux image reduce. Add in a bit of feedback to get Linux re-reading
the "device" into cache proportionally to how much CP wants to kick
*out* resident pages from the image. Fun... However, closer
integration with the main mm system is the "proper" way to do it
(but depends on stuff like the latency, overheads and information
shared with CP so is a little more than an afternoon hack.)

--Malcolm

-- 
Malcolm Beattie <mbeattie@clueful.co.uk>
Linux Technical Consultant
IBM EMEA Enterprise Server Group...
...from home, speaking only for myself

  reply	other threads:[~2002-03-06 21:24 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-03 21:12 Jeff Dike
2002-03-03 22:01 ` Alan Cox
2002-03-03 23:27   ` Jeff Dike
2002-03-03 23:48     ` Alan Cox
2002-03-04  3:16       ` Jeff Dike
2002-03-04  3:35         ` Alan Cox
2002-03-04  5:04           ` Jeff Dike
2002-03-04 15:09             ` Alan Cox
2002-03-04 17:42               ` Jeff Dike
2002-03-04 18:29                 ` Alan Cox
2002-03-04 18:36                   ` Jeff Dike
2002-03-04 18:49                     ` Alan Cox
2002-03-04 20:46                       ` Jeff Dike
2002-03-04 22:49                         ` Alan Cox
2002-03-04 17:46             ` H. Peter Anvin
2002-03-04 18:34               ` Jeff Dike
2002-03-04 18:33                 ` H. Peter Anvin
2002-03-04 20:36                   ` Jeff Dike
2002-03-04 22:51                     ` Alan Cox
2002-03-05  4:15                       ` Jeff Dike
2002-03-05  4:28                         ` Benjamin LaHaise
2002-03-05  4:40                           ` Jeff Dike
2002-03-05  5:34                             ` H. Peter Anvin
2002-03-05 14:43                               ` Jeff Dike
2002-03-05 16:37                                 ` H. Peter Anvin
2002-03-05 18:12                                   ` Jeff Dike
2002-03-05 18:30                                     ` Benjamin LaHaise
2002-03-06 14:59                                       ` Daniel Phillips
2002-03-06 15:24                                         ` Benjamin LaHaise
2002-03-06 15:24                                           ` Daniel Phillips
2002-03-06 16:36                                             ` Benjamin LaHaise
2002-03-06 23:14                                               ` Daniel Phillips
2002-03-06 23:20                                                 ` Benjamin LaHaise
2002-03-06 23:26                                                   ` Daniel Phillips
2002-03-06 23:33                                                     ` H. Peter Anvin
2002-03-07  0:08                                                       ` Daniel Phillips
2002-03-07  1:27                                                   ` Jeff Dike
2002-03-07  1:52                                                     ` Benjamin LaHaise
2002-03-08 19:17                                                       ` Jeff Dike
2002-03-08 21:22                                                         ` Benjamin LaHaise
2002-03-07 13:49                                                     ` Alan Cox
2002-03-07 13:36                                                       ` Daniel Phillips
2002-03-07 14:04                                                         ` yodaiken
2002-03-07 14:21                                                           ` Daniel Phillips
2002-03-07 14:38                                                             ` yodaiken
2002-03-07 15:31                                                               ` Daniel Phillips
2002-03-07 16:50                                                                 ` yodaiken
2002-03-07 18:07                                                                   ` Daniel Phillips
2002-03-07 18:15                                                                     ` yodaiken
2002-03-07 19:22                                                                     ` Alan Cox
2002-03-07 22:43                                                                       ` David Woodhouse
2002-03-07 23:09                                                                         ` Alan Cox
2002-03-07 22:57                                                                           ` David Woodhouse
2002-03-07 14:43                                                             ` Alan Cox
2002-03-07 15:32                                                               ` Daniel Phillips
2002-03-07 16:19                                                                 ` Alan Cox
2002-03-07 17:54                                                                   ` Daniel Phillips
2002-03-07 15:34                                                               ` Daniel Phillips
2002-03-07 19:18                                                                 ` Andrew Morton
2002-03-07 20:10                                                                   ` Rik van Riel
2002-03-07 20:56                                                                     ` Andrew Morton
2002-03-07 21:23                                                                       ` Rik van Riel
2002-03-07 22:02                                                                         ` Andrew Morton
2002-03-07 22:10                                                                           ` Rik van Riel
2002-03-07 22:23                                                                             ` Andrew Morton
2002-03-07 22:27                                                                               ` Rik van Riel
2002-03-07 22:41                                                                                 ` Andrew Morton
2002-03-07 22:42                                                                                 ` David Lang
2002-03-06 16:03                                         ` Jesse Pollard
2002-03-06 17:08                                           ` Jeff Dike
2002-03-06 17:33                                             ` Alan Cox
2002-03-07  0:28                                               ` Jeff Dike
2002-03-07  0:44                                                 ` Alan Cox
2002-03-05 18:46                                     ` H. Peter Anvin
2002-03-06  1:30                                     ` Alan Cox
2002-03-06 10:49                                     ` David Woodhouse
2002-03-06 14:26                                       ` Jeff Dike
2002-03-06 16:50                                       ` Alan Cox
2002-03-06 20:25                                         ` Jeff Dike
2002-03-06 20:54                                           ` Alan Cox
2002-03-06 21:27                                             ` Malcolm Beattie [this message]
2002-03-06 23:26                                               ` Jeff Dike
2002-03-06 21:27                                           ` David Woodhouse
2002-03-06 22:25                                             ` Joseph Malicki
2002-03-07  0:28                                             ` Jeff Dike
2002-03-07  0:44                                               ` Alan Cox
2002-03-07  0:04                                           ` Richard Gooch
2002-03-06 22:21                                         ` Pavel Machek
2002-03-07 11:30                                           ` Dave Jones
2002-03-07 18:21                                           ` H. Peter Anvin
2002-03-05 16:56                                 ` Wayne Whitney
2002-03-05 14:43                           ` Jeff Dike
2002-03-05 16:57                             ` H. Peter Anvin
2002-03-05 18:14                               ` Jeff Dike
2002-03-05 18:45                                 ` H. Peter Anvin
2002-03-05 17:30                             ` Jan Harkes

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=20020306212700.A16144@clueful.co.uk \
    --to=mbeattie@clueful.co.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bcrl@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=hpa@zytor.com \
    --cc=jdike@karaya.com \
    --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®