From patchwork Tue May 8 07:02:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10385445 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DDD256037F for ; Tue, 8 May 2018 07:02:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD18B28CD3 for ; Tue, 8 May 2018 07:02:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1C8F28CD5; Tue, 8 May 2018 07:02:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8ABE628CD3 for ; Tue, 8 May 2018 07:02:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BE6F16B000D; Tue, 8 May 2018 03:02:25 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B95C46B0010; Tue, 8 May 2018 03:02:25 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AADF56B0266; Tue, 8 May 2018 03:02:25 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id 525F86B000D for ; Tue, 8 May 2018 03:02:25 -0400 (EDT) Received: by mail-wm0-f72.google.com with SMTP id b83so3065844wme.7 for ; Tue, 08 May 2018 00:02:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:in-reply-to:references:message-id; bh=SUmW12e9bTdHRZeHrWgYl8KRYvqYeIt0T7Dvm2luJrU=; b=ZQTROOT4jLah+Nkqg9Gu7NvfXzvLZF0o59+eD9AWzHnQdMITcNUsZa6uik0wjj4qaf RUlc6QgM4Co0VFDhG+MojcoJ7alv6hM/eyAF0PwlUOwp+EvO9QW12HKS5GQJZCDeZn4X JjqZSUvw99g4HAjLLwu9I8L8IJJNWJxqfcrB4BLrlvQddqUYxTRQQaq/dR/72dKFv0Pe 1f88QqXz5VDbeM7pTkuNYYxHbs2sKSYbs+oGKNOWFJeCqNeJQqki+Rcup+fAmfDWPp8F odmyaQ/101zVoWqfa6hmqj/u3exXshDaRLu2IbYCY/gN6Wv7Mn8GlD9NYK3xl0sLcmTK wpBQ== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: ALKqPwcZPW2UZXah0YUiStmjz8/Fg3CaG4pYgvCla23wAAyLYEq9v/rC KCvtcRP1++rQZRI7hKVLL2UGraDY+EopVrAzxJ5oZe5oL3gDY93JiLR2XzM1KQsMSwaCGce5g2y U/WZmBvtsCnN+2QN6B8rafAokIxrUGHzKZmY/YqQSQp69eMsNb/6Za63+LOIMhCY= X-Received: by 2002:aa7:d1ce:: with SMTP id g14-v6mr29567edp.120.1525762944878; Tue, 08 May 2018 00:02:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpD1f7JY9uC5ioW234IJPCfRC++3GLEDRvIquwv+LtgKdjdewzj7NL8tDL5/m5VPbkKfYoD X-Received: by 2002:aa7:d1ce:: with SMTP id g14-v6mr29514edp.120.1525762944032; Tue, 08 May 2018 00:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525762944; cv=none; d=google.com; s=arc-20160816; b=N1Yb4noM3gb8jC9S2j599mnt8i2Al4Wc30a0lP/fIQpttB1MklK0GMGIAi60LNOc0H OfYOgsm7A5x1pYIj8haR17sv+O988cx9zGqC2shzK5vFU093GDdCx00d222bek726I3C RLlGk1UyPs70pX1nKdFTVTNfRDcfnnkszVMlO6tM/kLa+NviMtnDT4LO+2W24/I7XtCd njwx4QZ0ZXKMfo3seFHtE7BmDcXMyWJo2+b+MTfYay1Kx3D5Va+GseVMTCQenuaYibEY GSw1KilvlGmB+5lT0Fg1S7XVpc/uvpti3Yq18D1wuqbMArUup8QUOHMeyGHjSRZMrTYm y2Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:references:in-reply-to:date:subject:cc:to:from :arc-authentication-results; bh=SUmW12e9bTdHRZeHrWgYl8KRYvqYeIt0T7Dvm2luJrU=; b=Ir4pr2E//PjAXbO3DCqOBv/ltYPeLZN8lWDHz/BpDWQsPD1FUhNgISwRSoPg01gok8 9EkbN0CvTbxROVnDr7KnXT+tyYqopK5gqGCyFUqIRdf6+ao5KEa6BrdnwoD+xT4/jXDq 3rzXOPRROocXpiPkFZyiQiUOShi+I9meIOYaZCRkCBjx90rC8udMPBEsg2fDPeB61cCG T7BRUX2P7Kt6xfCAUcyrv3WtxcJdmoZEpS32yWYQxfzLbNJ7325hN4EKGVRStmD09RjO pS3Gt+pE3hq+j8JdCfQ0s2xa0o5QeW2rxjpWqE/8hmThhxrsF435RNBMm2kxVIm+WrHz wi7A== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id s3-v6si3519017edc.383.2018.05.08.00.02.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 May 2018 00:02:23 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.158.5; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w486wlDf014782 for ; Tue, 8 May 2018 03:02:22 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hu6kwsf0t-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 08 May 2018 03:02:22 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 May 2018 08:02:20 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 8 May 2018 08:02:17 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4872HaB33620070; Tue, 8 May 2018 07:02:17 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 623695204C; Tue, 8 May 2018 06:52:37 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.166]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id E25DC52043; Tue, 8 May 2018 06:52:35 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Tue, 08 May 2018 10:02:15 +0300 From: Mike Rapoport To: Jonathan Corbet Cc: Andrew Morton , linux-doc , linux-mm , lkml , Mike Rapoport Subject: [PATCH 1/3] docs/vm: numa_memory_policy: formatting and spelling updates Date: Tue, 8 May 2018 10:02:08 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525762930-28163-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1525762930-28163-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050807-0044-0000-0000-000005503AB1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050807-0045-0000-0000-000028917A0A Message-Id: <1525762930-28163-2-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-08_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805080069 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mike Rapoport --- Documentation/vm/numa_memory_policy.rst | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Documentation/vm/numa_memory_policy.rst b/Documentation/vm/numa_memory_policy.rst index 8cd942c..ac0b396 100644 --- a/Documentation/vm/numa_memory_policy.rst +++ b/Documentation/vm/numa_memory_policy.rst @@ -44,14 +44,20 @@ System Default Policy allocations. Task/Process Policy - this is an optional, per-task policy. When defined for a specific task, this policy controls all page allocations made by or on behalf of the task that aren't controlled by a more specific scope. If a task does not define a task policy, then all page allocations that would have been controlled by the task policy "fall back" to the System Default Policy. + this is an optional, per-task policy. When defined for a + specific task, this policy controls all page allocations made + by or on behalf of the task that aren't controlled by a more + specific scope. If a task does not define a task policy, then + all page allocations that would have been controlled by the + task policy "fall back" to the System Default Policy. The task policy applies to the entire address space of a task. Thus, it is inheritable, and indeed is inherited, across both fork() [clone() w/o the CLONE_VM flag] and exec*(). This allows a parent task to establish the task policy for a child task exec()'d from an executable image that has no awareness of memory policy. See the - MEMORY POLICY APIS section, below, for an overview of the system call + :ref:`Memory Policy APIs ` section, + below, for an overview of the system call that a task may use to set/change its task/process policy. In a multi-threaded task, task policies apply only to the thread @@ -70,12 +76,13 @@ Task/Process Policy VMA Policy A "VMA" or "Virtual Memory Area" refers to a range of a task's virtual address space. A task may define a specific policy for a range - of its virtual address space. See the MEMORY POLICIES APIS section, + of its virtual address space. See the + :ref:`Memory Policy APIs ` section, below, for an overview of the mbind() system call used to set a VMA policy. A VMA policy will govern the allocation of pages that back - this region ofthe address space. Any regions of the task's + this region of the address space. Any regions of the task's address space that don't have an explicit VMA policy will fall back to the task policy, which may itself fall back to the System Default Policy. @@ -117,7 +124,7 @@ VMA Policy Shared Policy Conceptually, shared policies apply to "memory objects" mapped shared into one or more tasks' distinct address spaces. An - application installs a shared policies the same way as VMA + application installs shared policies the same way as VMA policies--using the mbind() system call specifying a range of virtual addresses that map the shared object. However, unlike VMA policies, which can be considered to be an attribute of a @@ -135,7 +142,7 @@ Shared Policy Although hugetlbfs segments now support lazy allocation, their support for shared policy has not been completed. - As mentioned above :ref:`VMA policies `, + As mentioned above in :ref:`VMA policies ` section, allocations of page cache pages for regular files mmap()ed with MAP_SHARED ignore any VMA policy installed on the virtual address range backed by the shared file mapping. Rather, @@ -245,7 +252,7 @@ MPOL_F_STATIC_NODES the user should not be remapped if the task or VMA's set of allowed nodes changes after the memory policy has been defined. - Without this flag, anytime a mempolicy is rebound because of a + Without this flag, any time a mempolicy is rebound because of a change in the set of allowed nodes, the node (Preferred) or nodemask (Bind, Interleave) is remapped to the new set of allowed nodes. This may result in nodes being used that were @@ -389,7 +396,10 @@ follows: or by prefaulting the entire shared memory region into memory and locking it down. However, this might not be appropriate for all applications. +.. _memory_policy_apis: + Memory Policy APIs +================== Linux supports 3 system calls for controlling memory policy. These APIS always affect only the calling task, the calling task's address space, or