All of lore.kernel.org
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: linux-mm@kvack.org, David Rientjes <rientjes@google.com>,
	Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Michal Hocko <mhocko@suse.cz>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: vmscam: check page order in isolating lru pages
Date: Thu, 29 Dec 2011 12:35:53 -0500	[thread overview]
Message-ID: <4EFCA4F9.7070703@gmail.com> (raw)
In-Reply-To: <CAJd=RBBJG+hLLc3mR-WzByU1gZEcdFUAoZzyir+1A4a0tVnSmg@mail.gmail.com>

(12/29/11 7:45 AM), Hillf Danton wrote:
> Before we try to isolate physically contiguous pages, check for page order is
> added, and if the reclaim order is no larger than page order, we should give up
> the attempt.
>
> Signed-off-by: Hillf Danton<dhillf@gmail.com>
> Cc: Michal Hocko<mhocko@suse.cz>
> Cc: KAMEZAWA Hiroyuki<kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Andrew Morton<akpm@linux-foundation.org>
> Cc: David Rientjes<rientjes@google.com>
> Cc: Hugh Dickins<hughd@google.com>
> ---
>
> --- a/mm/vmscan.c	Thu Dec 29 20:20:16 2011
> +++ b/mm/vmscan.c	Thu Dec 29 20:28:14 2011
> @@ -1162,6 +1162,7 @@ static unsigned long isolate_lru_pages(u
>   		unsigned long end_pfn;
>   		unsigned long page_pfn;
>   		int zone_id;
> +		unsigned int isolated_pages = 0;
>
>   		page = lru_to_page(src);
>   		prefetchw_prev_lru_page(page, src, flags);
> @@ -1172,7 +1173,7 @@ static unsigned long isolate_lru_pages(u
>   		case 0:
>   			mem_cgroup_lru_del(page);
>   			list_move(&page->lru, dst);
> -			nr_taken += hpage_nr_pages(page);
> +			isolated_pages = hpage_nr_pages(page);
>   			break;
>
>   		case -EBUSY:
> @@ -1184,8 +1185,11 @@ static unsigned long isolate_lru_pages(u
>   			BUG();
>   		}
>
> +		nr_taken += isolated_pages;
>   		if (!order)
>   			continue;
> +		if (isolated_pages != 1&&  isolated_pages>= (1<<  order))
> +			continue;

strange space alignment. and I don't think we need "isolated_pages != 1" 
check.

Otherwise, Looks good to me.

Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: linux-mm@kvack.org, David Rientjes <rientjes@google.com>,
	Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Michal Hocko <mhocko@suse.cz>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: vmscam: check page order in isolating lru pages
Date: Thu, 29 Dec 2011 12:35:53 -0500	[thread overview]
Message-ID: <4EFCA4F9.7070703@gmail.com> (raw)
In-Reply-To: <CAJd=RBBJG+hLLc3mR-WzByU1gZEcdFUAoZzyir+1A4a0tVnSmg@mail.gmail.com>

(12/29/11 7:45 AM), Hillf Danton wrote:
> Before we try to isolate physically contiguous pages, check for page order is
> added, and if the reclaim order is no larger than page order, we should give up
> the attempt.
>
> Signed-off-by: Hillf Danton<dhillf@gmail.com>
> Cc: Michal Hocko<mhocko@suse.cz>
> Cc: KAMEZAWA Hiroyuki<kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Andrew Morton<akpm@linux-foundation.org>
> Cc: David Rientjes<rientjes@google.com>
> Cc: Hugh Dickins<hughd@google.com>
> ---
>
> --- a/mm/vmscan.c	Thu Dec 29 20:20:16 2011
> +++ b/mm/vmscan.c	Thu Dec 29 20:28:14 2011
> @@ -1162,6 +1162,7 @@ static unsigned long isolate_lru_pages(u
>   		unsigned long end_pfn;
>   		unsigned long page_pfn;
>   		int zone_id;
> +		unsigned int isolated_pages = 0;
>
>   		page = lru_to_page(src);
>   		prefetchw_prev_lru_page(page, src, flags);
> @@ -1172,7 +1173,7 @@ static unsigned long isolate_lru_pages(u
>   		case 0:
>   			mem_cgroup_lru_del(page);
>   			list_move(&page->lru, dst);
> -			nr_taken += hpage_nr_pages(page);
> +			isolated_pages = hpage_nr_pages(page);
>   			break;
>
>   		case -EBUSY:
> @@ -1184,8 +1185,11 @@ static unsigned long isolate_lru_pages(u
>   			BUG();
>   		}
>
> +		nr_taken += isolated_pages;
>   		if (!order)
>   			continue;
> +		if (isolated_pages != 1&&  isolated_pages>= (1<<  order))
> +			continue;

strange space alignment. and I don't think we need "isolated_pages != 1" 
check.

Otherwise, Looks good to me.

Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>


  reply	other threads:[~2011-12-29 17:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-29 12:45 [PATCH] mm: vmscam: check page order in isolating lru pages Hillf Danton
2011-12-29 12:45 ` Hillf Danton
2011-12-29 17:35 ` KOSAKI Motohiro [this message]
2011-12-29 17:35   ` KOSAKI Motohiro
2011-12-31 14:55   ` Hillf Danton
2011-12-31 14:55     ` Hillf Danton
2012-01-04  0:05     ` Andrew Morton
2012-01-04  0:05       ` Andrew Morton
2012-01-05  6:20       ` KAMEZAWA Hiroyuki
2012-01-05  6:20         ` KAMEZAWA Hiroyuki
2012-01-05 13:32     ` Mel Gorman
2012-01-05 13:32       ` 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=4EFCA4F9.7070703@gmail.com \
    --to=kosaki.motohiro@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhillf@gmail.com \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=rientjes@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.