linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: lwoodman@redhat.com
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org, Rik van Riel <riel@redhat.com>,
	Christoph Lameter <cl@linux.com>,
	Motohiro Kosaki <mkosaki@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH -mm V3] do_migrate_pages() calls migrate_to_node() even if task is already on a correct node
Date: Thu, 26 Apr 2012 21:14:16 -0400	[thread overview]
Message-ID: <CAHGf_=qLX7gofwHoSKpHLp7nvD6qJtHbmYzAR0UQ42JbfnYerw@mail.gmail.com> (raw)
In-Reply-To: <4F998FDE.5020104@redhat.com>

> @@ -1012,6 +1012,26 @@ int do_migrate_pages(struct mm_struct *mm,
>                int dest = 0;
>
>                for_each_node_mask(s, tmp) {
> +
> +                       /*
> +                        * do_migrate_pages() tries to maintain the
> +                        * relative node relationship of the pages
> +                        * established between threads and memory areas.
> +                        *
> +                        * However if the number of source nodes is not
> +                        * equal to the number of destination nodes we
> +                        * can not preserve this node relative relationship.
> +                        * In that case, skip copying memory from a node
> that
> +                        * is in the destination mask.
> +                        *
> +                        * Example: [2,3,4] -> [3,4,5] moves everything.
> +                        *                 [0-7] - > [3,4,5] moves only
> 0,1,2,6,7.
> +                        */
> +
> +                       if ((nodes_weight(*from_nodes) !=
> nodes_weight(*to_nodes)) &&
> +                                               (node_isset(s, *to_nodes)))
> +                               continue;
> +
>                        d = node_remap(s, *from_nodes, *to_nodes);
>                        if (s == d)
>                                continue;

Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
N‹§²æìr¸›zǧu©ž²Æ {\b­†éì¹»\x1c®&Þ–)îÆi¢žØ^n‡r¶‰šŽŠÝ¢j$½§$¢¸\x05¢¹¨­è§~Š'.)îÄÃ,yèm¶ŸÿÃ\f%Š{±šj+ƒñb‚^[nö¢®×¥yÊ&Š{^®w­r\x16«ë"œ&§iÖ¬Š	á¶Ú\x7fþËh¦Ø^™ë^­Æ¿\x0e‰ízf¢•¨ky

  parent reply	other threads:[~2012-04-27  1:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 18:11 Larry Woodman
2012-04-26 18:15 ` Rik van Riel
2012-04-27  1:14 ` KOSAKI Motohiro [this message]
2012-04-27 23:09   ` Andrew Morton
2012-04-28 13:05     ` KOSAKI Motohiro

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='CAHGf_=qLX7gofwHoSKpHLp7nvD6qJtHbmYzAR0UQ42JbfnYerw@mail.gmail.com' \
    --to=kosaki.motohiro@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lwoodman@redhat.com \
    --cc=mkosaki@redhat.com \
    --cc=riel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox