From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932407AbdKFP3y (ORCPT ); Mon, 6 Nov 2017 10:29:54 -0500 Received: from resqmta-ch2-08v.sys.comcast.net ([69.252.207.40]:60988 "EHLO resqmta-ch2-08v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753334AbdKFP3w (ORCPT ); Mon, 6 Nov 2017 10:29:52 -0500 Date: Mon, 6 Nov 2017 09:29:49 -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: Message-ID: References: <1509099265-30868-1-git-send-email-xieyisheng1@huawei.com> <1509099265-30868-5-git-send-email-xieyisheng1@huawei.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfAhOm4s9r+QxcQ8adaC8w4rURXHMweNb3vQq1UKI9WrhCh0IYRNjedBb7Ir6s3ibpkansjRpynxgMaifKdAP2pYkWCVUBT/xpjh1KHrGz9k4CvP5jxt9 WVGVRisvUOXLwkJqYqjdItQxS9S70PFKMJFEnjqaO2hUHNeqtxyTtv/HRKcsOqZlpO5CNMQ1SFsvkv5mSd2Tb49C9VJVovh5EYw1WtFj8OA+WK3Ch/9Yo+4p xoMH5/9Dt4NleDnpm6XyO72MY5IIwaNVTxVLzrHcudBbXAB4WgmIyD1X0B27J2/N34UQisi0CWDoYjQPYNBoaJECwnr4f+1VBQYCwM8OfiVfyAwW6v4d4RKC YOffjmGD5QiFQ+tTgfsPO22t+jI0nl3c+8PpwffuYmPXGf+c6BaTY71ay4OR0RQ1kjK6qmXg6coqOJn5j0zOTK3GQmhLq3teEp7Cmm15PV8xVK/yy9rbPCr4 Z4REJ6mS6ZgqGADkTCaF8LxGGaKunl7ZQDoyUn/avhnlRxticSLnCVUECBz2oGqTMMYQ3vUv67h2y2d0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 6 Nov 2017, Vlastimil Babka wrote: > I'm not sure what exactly is the EPERM intention. Should really the > capability of THIS process override the cpuset restriction of the TARGET > process? Maybe yes. Then, does "insufficient privilege (CAP_SYS_NICE) to CAP_SYS_NICE never overrides cpuset restrictions. The cap can be used to migrate pages that are *also* mapped by other processes (and thus move pages of another process which may have different cpu set restrictions!). The cap should not allow migrating pages to nodes that are not allowed by the cpuset of the current process.