linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "William J. Earl" <wje@cthulhu.engr.sgi.com>
To: Kanoj Sarcar <kanoj@google.engr.sgi.com>
Cc: Jeff Garzik <jgarzik@mandrakesoft.com>,
	mingo@chiara.csoma.elte.hu, alan@lxorguk.ukuu.org.uk,
	linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: Re: Getting big areas of memory, in 2.3.x?
Date: Thu, 9 Dec 1999 12:50:26 -0800 (PST)	[thread overview]
Message-ID: <14416.5650.168893.38145@liveoak.engr.sgi.com> (raw)
In-Reply-To: <199912092031.MAA40950@google.engr.sgi.com>

Kanoj Sarcar writes:
 > > 
 > > Ingo Molnar wrote:
 > > > hm, does anyone have any conceptual problem with a new
 > > > allocate_largemem(pages) interface in page_alloc.c? It's not terribly hard
 > > > to scan all bitmaps for available RAM and mark the large memory area
 > > > allocated and remove all pages from the freelists. Such areas can only be
 > > > freed via free_largemem(pages). Both calls will be slow, so should be only
 > > > used at driver initialization time and such.
 > > 
 > > Would this interface swap out user pages if necessary?  That sort of
 > > interface would be great, and kill a number of hacks floating around out
 > > there.
 > >
 > 
 > Swapping out user pages is not a sure shot thing unless Linux implements
 > reverse maps, so that we can track which page is being used by which pte. 
 > 
 > Without rmaps, any possible solution will be quite costly, if not an 
 > outright hack, IMO. 

      With rmaps, one can simply move the page, instead of swapping it out.

      Also, even with rmaps, we will also have to have placement control
for "long term" unmoveable allocations.  That is, whenever a page is allocated
for some use where it cannot be moved by the large page assembly routine,
such as certain kernel data structures, it must be placed in an area of
memory devoted to such pages, where that area of memory can grow, by adding
large-page-sized chunks of space ot it, but can be expected to never
shrink.  If a page is converted to such a use, it must be moved to the
"unmoveable" area.  Pages in the "unmoveable" area can be used for "moveable"
purposes, but will sometimes need to be moved to the "moveable" area to make
room for allocations of "unmoveable" pages, to minimize the need to grow
the "unmoveable" area.  Without placement control, memory gradually becomes
fragmented with unmoveable pages, so, after the system has been running
a while, it becomes impossible to allocate any large pages, even with rmaps.

     The SGI O2 implements this model (in IRIX, and successfully
allocates large pages on demand, occupying in total a large percentage
of main memory, even after the system has been running for weeks.

     The main change required to interfaces is a flag to page allocation
specifying "unmoveable allocation" and a pair of "make page unmoveable"
and "make page moveable" functions, to be called when, for example,
an application locks some memory in place, in order to point hardware
control blocks at it.  The "make page unmoveable" routine has to handle
relocating the page, if necessary, including possibly moving some "moveable" 
page out of the way.  The overhead is pretty small, except when memory
is highly congested.  The page cleaner should do a little extra work,
to try to keep some pages in the "unmoveable" area available, to reduce
the likelihood of needing to move pages when allocating an unmoveble
page or when making a moveable page unmoveable.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

  parent reply	other threads:[~1999-12-09 20:50 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-09  1:03 Jeff Garzik
1999-12-09  2:28 ` Alan Cox
1999-12-09  2:45   ` Jeff Garzik
1999-12-09  5:22     ` Oliver Xymoron
1999-12-09 12:25     ` Ingo Molnar
1999-12-09 20:24       ` Jeff Garzik
1999-12-09 20:31         ` Kanoj Sarcar
1999-12-09 20:39           ` Rik van Riel
1999-12-09 20:54             ` Kanoj Sarcar
1999-12-09 23:21               ` Ingo Molnar
1999-12-09 22:27                 ` Kanoj Sarcar
1999-12-09 23:16             ` Ingo Molnar
1999-12-09 23:09               ` Benjamin C.R. LaHaise
1999-12-10  0:44                 ` Ingo Molnar
1999-12-10  0:18                   ` William J. Earl
1999-12-11 19:56                   ` Stephen C. Tweedie
1999-12-10 12:21               ` Rik van Riel
1999-12-10 13:42                 ` Ingo Molnar
1999-12-10 18:04                   ` William J. Earl
1999-12-09 20:50           ` William J. Earl [this message]
1999-12-09 23:15         ` Ingo Molnar
1999-12-09 22:13           ` William J. Earl
1999-12-09 22:26             ` Alan Cox
1999-12-09 23:42               ` William J. Earl
1999-12-09 23:50                 ` Alan Cox
1999-12-10  0:30                   ` William J. Earl
1999-12-10  0:37                     ` Alan Cox
1999-12-10  4:19                   ` Oliver Xymoron
1999-12-10 10:14                   ` Thomas Sailer
1999-12-09 23:24             ` Ingo Molnar
1999-12-09 22:33               ` Jeff Garzik
1999-12-09 23:32               ` Rogier Wolff
1999-12-09 23:44                 ` JF Martinez
1999-12-10  0:52                   ` Ingo Molnar
1999-12-09 23:46                 ` Andi Kleen
1999-12-10 13:52       ` Stephen C. Tweedie

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=14416.5650.168893.38145@liveoak.engr.sgi.com \
    --to=wje@cthulhu.engr.sgi.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jgarzik@mandrakesoft.com \
    --cc=kanoj@google.engr.sgi.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=mingo@chiara.csoma.elte.hu \
    /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