From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753970AbbB0GVW (ORCPT ); Fri, 27 Feb 2015 01:21:22 -0500 Received: from TYO201.gate.nec.co.jp ([210.143.35.51]:47573 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752798AbbB0GVV convert rfc822-to-8bit (ORCPT ); Fri, 27 Feb 2015 01:21:21 -0500 From: Naoya Horiguchi To: David Rientjes CC: Andrew Morton , Mel Gorman , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [patch] mm, mempolicy: migrate_to_node should only migrate to node Thread-Topic: [patch] mm, mempolicy: migrate_to_node should only migrate to node Thread-Index: AQHQUIgn9gQmte2xhEmU7s7gxyikhp0DcTQA Date: Fri, 27 Feb 2015 06:13:58 +0000 Message-ID: <20150227061358.GA7469@hori1.linux.bs1.fc.nec.co.jp> References: In-Reply-To: Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.14] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <931A2F01C617E848B30D3349A514E9A4@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 24, 2015 at 03:18:06PM -0800, David Rientjes wrote: > migrate_to_node() is intended to migrate a page from one source node to a > target node. > > Today, migrate_to_node() could end up migrating to any node, not only the > target node. This is because the page migration allocator, > new_node_page() does not pass __GFP_THISNODE to alloc_pages_exact_node(). > This causes the target node to be preferred but allows fallback to any > other node in order of affinity. > > Prevent this by allocating with __GFP_THISNODE. If memory is not > available, -ENOMEM will be returned as appropriate. > > Signed-off-by: David Rientjes Make sense to me. Reviewed-by: Naoya Horiguchi