linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Mel Gorman <mel@csn.ul.ie>, Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@osdl.org>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: Page allocator: Single Zone optimizations
Date: Fri, 03 Nov 2006 13:17:57 +0000	[thread overview]
Message-ID: <454B4185.3040302@shadowen.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0611030900480.9787@skynet.skynet.ie>

>> An intemediate step that would make sense is starting to
>> marking pages as unmovable and then reclaim movable pages. Then we can
>> add
>> more and more logic to make move pages movable on top. With marking
>> pages for reclaim we wont get there.
>>
> 
> Ok, I can make that renaming change now so. The renaming will look like
> 
> Movable - These are userspace pages that are easily moved. This
>         flag is set when it is known that the pages will be trivially
>     moved by using page migration or if under significant
>     memory pressure, writing the page out to swap or syncing with
>     backing storage
>     These allocations are marked with __GFP_MOVABLE
> 
> Reclaimable - These are kernel allocations for caches that are
>         reclaimable or allocations that are known to be very short-lived.
>     These allocations are marked __GFP_RECLAIMABLE
> 
> Non-Movable - These are pages that are allocated by the kernel that
>         are not trivially reclaimed. For example, the memory allocated
> for a
>         loaded module would be in this category. By default, allocations
> are
>         considered to be of this type
>     These are allocations that are not marked otherwise
> 
> So, right now, page tables would not be marked __GFP_MOVABLE, but they
> would be later when defrag was developed. Would that be any better?

Ok, as far as I can tell you are both describing the same basic thing
with different names.

The key problem here is we want to be able to allocate non-order zero
pages, where there are such pages available all is well.  When there are
not we need to look for a group of contiguous 'emptyable' pages; and
recycle them.  This is the key, we do not care what is in them, only
whether we can get whatever it is out to release a single contiguous
block.  We do not care what the mechanism for that is, release, move or
even swap them.  The attribute of the memory is whether its pinned or
not, whether the page is emptyable.  We want to make sure we keep
emptyable pages with other emptyable pages so that our chances of
finding a higher order block emptyable is likely.

We currently talk about the act of selecting pages for release as
reclaim.  We should not get too caught up in thinking of that as
removing things from memory.  Yes, right now the only time we use
reclaim is when we do not have any free memory, and so its only goal is
to remove things from memory -- that is a side effect of it only
supporting order 0 reclaim, moving a page there is mostly useless.
Supporting higher order reclaim we might start reclaim at order 1 with
50% of memory free.  In this case the reclaim strategy could and should
include the option to relocate the relocatable memory object.

Now perhaps 'EMPTYABLE', 'RELEASABLE' or 'RECYCLABLE' is more
appropriate than 'RECLAIMABLE', but its not at all clear that 'MOVABLE'
is better.  Moving pages is but one strategy 'reclaim' could use to
achieve its aim, getting us the memory block we asked for.

I do not see how any of what Mel is saying precludes the use of
migration as a reclaim mechanism allowing more things to be placed in
the 'emptyable' set rather than the 'pinned' set.

-apw

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-11-03 13:17 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-17  0:50 Christoph Lameter
2006-10-17  1:10 ` Andrew Morton
2006-10-17  1:13   ` Christoph Lameter
2006-10-17  1:27 ` KAMEZAWA Hiroyuki
2006-10-17  1:25   ` Christoph Lameter
2006-10-17  6:04     ` Nick Piggin
2006-10-17 17:54       ` Christoph Lameter
2006-10-18 11:15         ` Nick Piggin
2006-10-18 19:38           ` Andrew Morton
2006-10-23 23:08             ` Christoph Lameter
2006-10-24  1:07               ` Christoph Lameter
2006-10-26 22:09               ` Andrew Morton
2006-10-26 22:28                 ` Christoph Lameter
2006-10-28  1:00                 ` Christoph Lameter
2006-10-28  2:04                   ` Andrew Morton
2006-10-28  2:12                     ` Christoph Lameter
2006-10-28  2:24                       ` Andrew Morton
2006-10-28  2:31                         ` Christoph Lameter
2006-10-28  4:43                           ` Andrew Morton
2006-10-28  7:47                             ` KAMEZAWA Hiroyuki
2006-10-28 16:12                             ` Andi Kleen
2006-10-29  0:48                             ` Christoph Lameter
2006-10-29  1:04                               ` Andrew Morton
2006-10-29  1:29                                 ` Christoph Lameter
2006-10-29 11:32                                   ` Nick Piggin
2006-10-30 16:41                                     ` Christoph Lameter
2006-11-01 18:26                                     ` Mel Gorman
2006-11-01 20:34                                       ` Andrew Morton
2006-11-01 21:00                                         ` Christoph Lameter
2006-11-01 21:46                                           ` Andrew Morton
2006-11-01 21:50                                             ` Christoph Lameter
2006-11-01 22:13                                           ` Mel Gorman
2006-11-01 23:29                                             ` Christoph Lameter
2006-11-02  0:22                                               ` Andrew Morton
2006-11-02  0:27                                                 ` Christoph Lameter
2006-11-02 12:45                                               ` Mel Gorman
2006-11-01 22:10                                         ` Mel Gorman
2006-11-02 17:37                                           ` Andy Whitcroft
2006-11-02 18:08                                             ` Christoph Lameter
2006-11-02 20:58                                               ` Mel Gorman
2006-11-02 21:04                                                 ` Christoph Lameter
2006-11-02 21:16                                                   ` Mel Gorman
2006-11-02 21:52                                                 ` Christoph Lameter
2006-11-02 22:37                                                   ` Mel Gorman
2006-11-02 22:50                                                     ` Christoph Lameter
2006-11-03  9:14                                                       ` Mel Gorman
2006-11-03 13:17                                                         ` Andy Whitcroft [this message]
2006-11-03 18:11                                                         ` Christoph Lameter
2006-11-03 19:06                                                           ` Mel Gorman
2006-11-03 19:44                                                             ` Christoph Lameter
2006-11-03 21:11                                                               ` Mel Gorman
2006-11-03 21:42                                                                 ` Christoph Lameter
2006-11-03 21:50                                                                   ` Andrew Morton
2006-11-03 21:53                                                                     ` Christoph Lameter
2006-11-03 22:12                                                                       ` Andrew Morton
2006-11-03 22:15                                                                         ` Christoph Lameter
2006-11-03 22:19                                                                       ` Andi Kleen
2006-11-04  0:37                                                                         ` Christoph Lameter
2006-11-04  1:32                                                                           ` Andi Kleen
2006-11-06 16:40                                                                             ` Christoph Lameter
2006-11-06 16:56                                                                               ` Andi Kleen
2006-11-06 17:00                                                                                 ` Christoph Lameter
2006-11-06 17:07                                                                                   ` Andi Kleen
2006-11-06 17:12                                                                                     ` Hugh Dickins
2006-11-06 17:15                                                                                     ` Christoph Lameter
2006-11-06 17:20                                                                                       ` Andi Kleen
2006-11-06 17:26                                                                                         ` Christoph Lameter
2006-11-07 16:30                                                                   ` Mel Gorman
2006-11-07 17:54                                                                     ` Christoph Lameter
2006-11-07 18:14                                                                       ` Mel Gorman
2006-11-08  0:29                                                                         ` KAMEZAWA Hiroyuki
2006-11-08  2:08                                                                           ` Christoph Lameter
2006-11-13 21:08                                                                     ` Mel Gorman
2006-11-03 12:48                                                   ` Peter Zijlstra
2006-11-03 18:15                                                     ` Christoph Lameter
2006-11-03 18:53                                                       ` Peter Zijlstra
2006-11-03 19:23                                                         ` Christoph Lameter
2006-11-02 18:52                                           ` Andrew Morton
2006-11-02 21:51                                             ` Mel Gorman
2006-11-02 22:03                                             ` Andy Whitcroft
2006-11-02 22:11                                               ` Andrew Morton
2006-11-01 18:13                           ` Mel Gorman
2006-11-01 17:39                 ` Mel Gorman

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=454B4185.3040302@shadowen.org \
    --to=apw@shadowen.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=nickpiggin@yahoo.com.au \
    /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