linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Andrew Morton <akpm@osdl.org>
Cc: clameter@sgi.com,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add __GFP_MOVABLE for callers to flag allocations that may be migrated
Date: Fri, 1 Dec 2006 09:54:11 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0612010948320.32594@skynet.skynet.ie> (raw)
In-Reply-To: <20061130173129.4ebccaa2.akpm@osdl.org>

On Thu, 30 Nov 2006, Andrew Morton wrote:

> On Thu, 30 Nov 2006 17:07:46 +0000
> mel@skynet.ie (Mel Gorman) wrote:
>
>> Am reporting this patch after there were no further comments on the last
>> version.
>
> Am not sure what to do with it - nothing actually uses __GFP_MOVABLE.
>

Nothing yet. To begin with, this is just a documentation mechanism. I'll 
be trying to push page clustering one piece at a time which will need 
this. The markings may also be of interest to containers and to pagesets 
because it will clearly flag what are allocations in use by userspace.

>> It is often known at allocation time when a page may be migrated or not.
>
> "often", yes.
>
>> This
>> page adds a flag called __GFP_MOVABLE and GFP_HIGH_MOVABLE. Allocations using
>> the __GFP_MOVABLE can be either migrated using the page migration mechanism
>> or reclaimed by syncing with backing storage and discarding.
>>
>> Additional credit goes to Christoph Lameter and Linus Torvalds for shaping
>> the concept. Credit to Hugh Dickens for catching issues with shmem swap
>> vector and ramfs allocations.
>>
>> ...
>>
>> @@ -65,7 +65,7 @@ static inline void clear_user_highpage(s
>>  static inline struct page *
>>  alloc_zeroed_user_highpage(struct vm_area_struct *vma, unsigned long vaddr)
>>  {
>> -	struct page *page = alloc_page_vma(GFP_HIGHUSER, vma, vaddr);
>> +	struct page *page = alloc_page_vma(GFP_HIGH_MOVABLE, vma, vaddr);
>>
>>  	if (page)
>>  		clear_user_highpage(page, vaddr);
>
> But this change is presumptuous.  alloc_zeroed_user_highpage() doesn't know
> that its caller is going to use the page for moveable purposes.  (Ditto lots
> of other places in this patch).
>

according to grep -r, alloc_zeroed_user_highpage() is only used in two 
places, do_wp_page() (when write faulting the zero page)[1] and 
do_anonymous_page() (when mapping the zero page for the first time and 
writing). In these cases, they are known to be movable. What am I missing?

[1] I missed a call to GFP_HIGHUSER in do_wp_page() that should have been 
GFP_HIGH_MOVABLE.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
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-12-01  9:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-30 17:07 Mel Gorman
2006-12-01  1:31 ` Andrew Morton
2006-12-01  9:54   ` Mel Gorman [this message]
2006-12-01 19:01     ` Andrew Morton
2006-12-04 14:07       ` Mel Gorman
2006-12-04 19:30         ` Andrew Morton
2006-12-04 19:41           ` Christoph Lameter
2006-12-04 20:06             ` Andrew Morton
2006-12-04 20:17               ` Christoph Lameter
2006-12-04 21:19                 ` Andrew Morton
2006-12-04 21:43                   ` Christoph Lameter
2006-12-04 22:22                     ` Andrew Morton
2006-12-05 16:00                       ` Christoph Lameter
2006-12-05 19:25                         ` Andrew Morton
2006-12-05 20:01                           ` Christoph Lameter
2006-12-05 21:47                             ` Mel Gorman
2006-12-05 23:33                               ` Christoph Lameter
2006-12-06  9:31                                 ` Mel Gorman
2006-12-06 17:31                                   ` Christoph Lameter
2006-12-08  1:21                                     ` Jeremy Fitzhardinge
2006-12-08  2:20                                       ` Christoph Lameter
2006-12-08  6:11                                         ` Jeremy Fitzhardinge
2006-12-05 18:10                       ` Mel Gorman
2006-12-04 20:34           ` Mel Gorman
2006-12-04 22:34             ` Andrew Morton
2006-12-04 23:45               ` Mel Gorman
2006-12-05  1:16                 ` KAMEZAWA Hiroyuki
2006-12-05 10:03                   ` Mel Gorman
2006-12-05 16:05                     ` Christoph Lameter
2006-12-05 18:26                       ` Andrew Morton
2006-12-05 19:59                         ` Christoph Lameter
2006-12-05 16:14                 ` Christoph Lameter
2006-12-05 17:17                   ` Mel Gorman
2006-12-05 19:54                     ` Christoph Lameter
2006-12-05 15:52               ` Andy Whitcroft
2006-12-05 15:48             ` Andy Whitcroft
2006-12-04 20:37           ` Peter Zijlstra
2006-12-06 14:18             ` Andy Whitcroft

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=Pine.LNX.4.64.0612010948320.32594@skynet.skynet.ie \
    --to=mel@csn.ul.ie \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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