Received: by 10.223.164.202 with SMTP id h10csp911127wrb; Tue, 7 Nov 2017 17:24:18 -0800 (PST) X-Google-Smtp-Source: ABhQp+SYs9DgVOJanNLMO0y3YOMBmtJK6j8PtJ32bX1DrMEvFBkzo7C/oxgk2Oyy/TLfUT6TnazH X-Received: by 10.98.204.157 with SMTP id j29mr650731pfk.236.1510104258873; Tue, 07 Nov 2017 17:24:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510104258; cv=none; d=google.com; s=arc-20160816; b=CnCzbpOq9+y28qvIncEGAbUaQmtMWTJ+fBgdxxssVrzUa6HrOUlGL4IK9phxTmX57N kVp2Z0wqx82kZXar+0rYK+Wc8Xbe2gQuy/LkriNBZ9NfqhKJKF+Z6RaZiogZUiqNwKNU p4/3kAj3k1lkYlULCAAPqOKNuNwB6Micp6AJytbI3tiSyQqBZ7fNcN3XlNVaFSjF8L/l FkDaTHQdPVxgnmei9ZZp7jGw3mAdPEUXLQP1uJL6rEgRFTEpK2KIuaNvMjiJyjT2UpNC ghnIlq6qO9OzileWSnHUjO6GGil0zUPLIY0PhwRudtCoM7BsUq2pI4sQz3pCCkfX3uzZ AIMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=6gFLDtucCJCpArJ7akK+gPgXRw8gNMqMQeO3afV10m8=; b=sOfGJbCKQ+ibzliBI45yvPFSVwk9eCx796F3VzdP2eMU4na9zSn2a0onykbWhgtaNM dxCmQJHxBHqwALClIIB1K9VScu366th+bRpU25QdfBVAAY9gmR4M1X2yNfdPl6MA64tp iq8enZSc1c3YRY/OT2/rN8xS5EAhfmZ/LzA5pfKk/pQrsxE17nP8xveF0w4pfWEescRH HFIvlY3I7XiH8eudY/VVZkZMO/KeQI6zVv7I+eIKRRJY50lwqed6rI6ECTMeqPu2FltO HrJYINIj8nCI6a2iHdix/SVAw2GPsyLEU/ORKafrB8qdLgLECJqIZHZyY4cSRxnXvxNj R3aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y69si2606346pfb.303.2017.11.07.17.24.05; Tue, 07 Nov 2017 17:24:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757492AbdKGPzv (ORCPT + 92 others); Tue, 7 Nov 2017 10:55:51 -0500 Received: from resqmta-ch2-09v.sys.comcast.net ([69.252.207.41]:34978 "EHLO resqmta-ch2-09v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752092AbdKGPzu (ORCPT ); Tue, 7 Nov 2017 10:55:50 -0500 Received: from resomta-ch2-03v.sys.comcast.net ([69.252.207.99]) by resqmta-ch2-09v.sys.comcast.net with ESMTP id C6E8eZudDmDQOC6E8eID48; Tue, 07 Nov 2017 15:55:48 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-03v.sys.comcast.net with SMTP id C6E7eicUy0v3OC6E8eciaF; Tue, 07 Nov 2017 15:55:48 +0000 Received: by gentwo.org (Postfix, from userid 1001) id A589C11602C5; Tue, 7 Nov 2017 09:55:47 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id A21D91160140; Tue, 7 Nov 2017 09:55:47 -0600 (CST) Date: Tue, 7 Nov 2017 09:55:47 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Vlastimil Babka cc: Yisheng Xie , akpm@linux-foundation.org, mhocko@suse.com, mingo@kernel.org, rientjes@google.com, n-horiguchi@ah.jp.nec.com, salls@cs.ucsb.edu, linux-mm@kvack.org, linux-kernel@vger.kernel.org, tanxiaojun@huawei.com, linux-api@vger.kernel.org, Andi Kleen Subject: Re: [PATCH RFC v2 4/4] mm/mempolicy: add nodes_empty check in SYSC_migrate_pages In-Reply-To: <04e4cb50-8cba-58af-1a5e-61e818cffa70@suse.cz> Message-ID: References: <1509099265-30868-1-git-send-email-xieyisheng1@huawei.com> <1509099265-30868-5-git-send-email-xieyisheng1@huawei.com> <04e4cb50-8cba-58af-1a5e-61e818cffa70@suse.cz> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfEFCjAz/2O6lUbpbxCS+sO6hkhle243PC0zdJr6XzDGZnsPH+dpQkrsnAPx4QVml01AFWjbPYDvwNNVHFqQGgjK/MnlSr6yIjOxPrXm3WxiYah5ZCbKM LGq8YZec+/4Enxd1R+z+h8lvEipmK6AqZiLS7qTtmtiNpdaGBnoW4zc/vWGkDIm8NKwCDOa8+7lf/jAJC5xseRHOfcF/fswiMyGY8uP5vIAuYzqYQl9Y19Ur 5rZrwboAK5IVtb9CT2fucBDOkNIo8KDS28vLoJF3Q17GePZOlk1XTLvpZ/niUB83wHEFyJOKLKDKHA2jMvZNDw8G388zoE+VMXkUExOh4v/RkLaqH81KWJIN UTHEmXRKsxQuEVCjdzpaPgPLyzLdb9RJ46LOjcWC+hrbU7x1+vf+HJ/doBy4U+AtBXHJzSlguTD/xBnDeGir29UKpwTg2+m22BFwgwL1kvWU0sNgZU4Rxrsh lBMGG+eRjFN9UDvCtwdIKWjTsOS8gPm4OrG1okwbN3FXZrmHou1fdYSmse2dmPBfFbf14mGUH5UCLpQB Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Nov 2017, Vlastimil Babka wrote: > > Migrate pages moves the pages of a single process there is no TARGET > > process. > > migrate_pages(2) takes a pid argument > > "migrate_pages() attempts to move all pages of the process pid that > are in memory nodes old_nodes to the memory nodes in new_nodes. " Ok missed that. Most use cases here are on the current process. Fundamentally a process can have shared pages outside of the cpuset that a process is restricted to. Thus I would think that migration to any of the allowed nodes of the current process that is calling migrate pages is ok. The caller wants this and the caller has a right to allocate on these nodes. It would be strange if migrate_pages would allow allocation outside of the current cpuset. > > Thus thehe *target* nodes need to be a subset of the current cpu set. And therefore the above still holds. From 1583420191937199233@xxx Tue Nov 07 15:06:09 +0000 2017 X-GM-THRID: 1582405894727115875 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread