From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753388AbcITA5b (ORCPT ); Mon, 19 Sep 2016 20:57:31 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36239 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752611AbcITA53 (ORCPT ); Mon, 19 Sep 2016 20:57:29 -0400 Date: Mon, 19 Sep 2016 17:57:17 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Piotr Kwapulinski cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, vbabka@suse.cz, mhocko@kernel.org, mgorman@techsingularity.net, liangchen.linux@gmail.com, nzimmer@sgi.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/mempolicy.c: forbid static or relative flags for local NUMA mode In-Reply-To: <20160918112943.1645-1-kwapulinski.piotr@gmail.com> Message-ID: References: <20160918112943.1645-1-kwapulinski.piotr@gmail.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 18 Sep 2016, Piotr Kwapulinski wrote: > The MPOL_F_STATIC_NODES and MPOL_F_RELATIVE_NODES flags are irrelevant > when setting them for MPOL_LOCAL NUMA memory policy via set_mempolicy. > Return the "invalid argument" from set_mempolicy whenever > any of these flags is passed along with MPOL_LOCAL. > It is consistent with MPOL_PREFERRED passed with empty nodemask. > It also slightly shortens the execution time in paths where these flags > are used e.g. when trying to rebind the NUMA nodes for changes in > cgroups cpuset mems (mpol_rebind_preferred()) or when just printing > the mempolicy structure (/proc/PID/numa_maps). > Isolated tests done. > > Signed-off-by: Piotr Kwapulinski Acked-by: David Rientjes There wasn't an MPOL_LOCAL when I introduced either of these flags, it's an oversight to allow them to be passed. Want to try to update set_mempolicy(2) with the procedure outlined in https://www.kernel.org/doc/man-pages/patches.html as well?