Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp779175yba; Fri, 26 Apr 2019 08:36:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5rSY4Xi8xN6rQjESDUhmMZCvWIUD6BlV6DEg+CmrhaESM9MFcHICCr4QN2J3NmtVLnD5K X-Received: by 2002:a63:1364:: with SMTP id 36mr39487485pgt.436.1556292999514; Fri, 26 Apr 2019 08:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556292999; cv=none; d=google.com; s=arc-20160816; b=BWw9jNjqXBimTLnnH/LiZNeHRejgRubtP4UJjJjGwejDA91nAX9F3KFpAPqMM4IdJ/ B2+gOe/s+b1MtYSMi299KfmiR1KSPSJXGoWhSbTJRhGmBrp1KADGAnZHm6WfYbIckQi1 qzhJrH57J2nNfZAMK7nMOSHIBEvxnEWO28fsoaNK3xrhxGK/kZDiCMym+/VLuXsdF9KX P7o5VzygjeUa2k4IRPsAJW8zJ/BpKhRppgVf/42asjOmQ0YZHbqu/WSi/jKhlKMB6L7T WAFvwX9OaIo9hM/MVZ06aBwExS0qowpKTN9H+xioKmt7UQqwtEZZ0BZGE75FyiUIIDhh K3jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Kf9ixwlamGCo6rqFj9rx+UIAO8SMHMWm68PEXOw5I1k=; b=QWCDKejPAMuQVKZGgecscXELPVmhYhMqiHZYcJ4c+KbRYkULgHD0tSVNospGwsJt98 waMhIpmDgwL25pjRLm06yWm7zT3rhZSU8uEucP0oUGzAUiAOtupL1B7veKF6zb4XZdlT zq2Dcwx/eM7pl/GnpeZDhEH4CL3IZozVPlYPYXuR1hR5yxK86bRtVAFLoPuci8SVXp67 pPDg/bRyj4pjFdmG5Ycof605JAE4VrR+YWUmAB94tepKZQUGRd48MFMe6YadZ1Gqjbxl a2+p5eNzmenVVo5zlpeJkm5WUnpQuTYAKrg9uNF3PAXhVuyFE0Hfi9bXffGLZAOfpsSG UkKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rNzKym1l; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bf9si8403071plb.85.2019.04.26.08.36.23; Fri, 26 Apr 2019 08:36:39 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rNzKym1l; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727201AbfDZPer (ORCPT + 99 others); Fri, 26 Apr 2019 11:34:47 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:37323 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbfDZPeq (ORCPT ); Fri, 26 Apr 2019 11:34:46 -0400 Received: by mail-pg1-f196.google.com with SMTP id e6so1807998pgc.4; Fri, 26 Apr 2019 08:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Kf9ixwlamGCo6rqFj9rx+UIAO8SMHMWm68PEXOw5I1k=; b=rNzKym1lZ66ZW5lsGjGf/GohzG4Pkhhf9rdqdvuI/gtmLqKS67O28dKvYWK1zltHuf sLIWswFK6a6WoUBrLE4XSvMMkIK35Jrqlz+pjaEXOqdv0IAgLTrQSwuZa0uFXzOjec+K IrSdPAdZIwMEV37zfJfT+ITqAZOS/slTnzL6wmBLlZfsQ4w/TA1otmYyZ2Qn0Qk9ho9B tEMQ+bmkj1/FeMbPWJqmMIOhmMtmnPiGJmPqk0nB3z/vbIhDiFVmkqJL9nwIZSOe3+2T 8BVPcP/9quCa5NRtC80DEP2HQnu6UpK5B2/0xYsTkPKcYaGqlmLJZ97KzFj0sBm+gFcI HjaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kf9ixwlamGCo6rqFj9rx+UIAO8SMHMWm68PEXOw5I1k=; b=OPyxkY/tSU5EQrtlfjmD4b92ZfpybraexY3YzUiBSFXVpXGd13xfz3mYeucz7RsWfZ 5klm3JqpUV+c/5g2mhjf7tGLzmHwQDRhT889XuXpOZ0DuCYcLyCuRjUGl9JLz/HATwhB 3rjsJ96KWYT7Ir/V5bOWH19zohVGBUSEIb5hHpPpDG3SQ4x1JhAV0IJm/r2qtdPANC0c Mwf3HhqIeN5zhUAS1/S4CTT9D7iFXl+/CY9aexpWfdFa+fo544jNtIoU4igqo3lSXwL7 ugk0CmJ3sAwALryZbJ18pEHNNSk38RYkZiLQ4gg7q1hbFZjQPUnknx/OI5espYkKNwdU L1Kw== X-Gm-Message-State: APjAAAVudU2QHaAdH08N+vu6alNcTgzx8t/fv+MDXw+QYGadFOwqsbxK CbHVlFlXhKHgT9Pql2cKlzY= X-Received: by 2002:a63:fb4d:: with SMTP id w13mr44735497pgj.397.1556292885921; Fri, 26 Apr 2019 08:34:45 -0700 (PDT) Received: from localhost.localdomain ([104.238.181.70]) by smtp.gmail.com with ESMTPSA id b1sm29024833pgq.15.2019.04.26.08.34.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 08:34:44 -0700 (PDT) From: Changbin Du To: Jonathan Corbet Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, mchehab+samsung@kernel.org, Changbin Du Subject: [PATCH 25/27] Documentation: x86: convert x86_64/fake-numa-for-cpusets to reST Date: Fri, 26 Apr 2019 23:31:48 +0800 Message-Id: <20190426153150.21228-26-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190426153150.21228-1-changbin.du@gmail.com> References: <20190426153150.21228-1-changbin.du@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du --- ...-for-cpusets => fake-numa-for-cpusets.rst} | 25 +++++++++++++------ Documentation/x86/x86_64/index.rst | 1 + 2 files changed, 19 insertions(+), 7 deletions(-) rename Documentation/x86/x86_64/{fake-numa-for-cpusets => fake-numa-for-cpusets.rst} (85%) diff --git a/Documentation/x86/x86_64/fake-numa-for-cpusets b/Documentation/x86/x86_64/fake-numa-for-cpusets.rst similarity index 85% rename from Documentation/x86/x86_64/fake-numa-for-cpusets rename to Documentation/x86/x86_64/fake-numa-for-cpusets.rst index 4b09f18831f8..74fbb78b3c67 100644 --- a/Documentation/x86/x86_64/fake-numa-for-cpusets +++ b/Documentation/x86/x86_64/fake-numa-for-cpusets.rst @@ -1,5 +1,12 @@ +.. SPDX-License-Identifier: GPL-2.0 + +===================== +Fake NUMA For CPUSets +===================== + +:Author: David Rientjes + Using numa=fake and CPUSets for Resource Management -Written by David Rientjes This document describes how the numa=fake x86_64 command-line option can be used in conjunction with cpusets for coarse memory management. Using this feature, @@ -20,7 +27,7 @@ you become more familiar with using this combination for resource control, you'll determine a better setup to minimize the number of nodes you have to deal with. -A machine may be split as follows with "numa=fake=4*512," as reported by dmesg: +A machine may be split as follows with "numa=fake=4*512," as reported by dmesg:: Faking node 0 at 0000000000000000-0000000020000000 (512MB) Faking node 1 at 0000000020000000-0000000040000000 (512MB) @@ -34,7 +41,7 @@ A machine may be split as follows with "numa=fake=4*512," as reported by dmesg: Now following the instructions for mounting the cpusets filesystem from Documentation/cgroup-v1/cpusets.txt, you can assign fake nodes (i.e. contiguous memory -address spaces) to individual cpusets: +address spaces) to individual cpusets:: [root@xroads /]# mkdir exampleset [root@xroads /]# mount -t cpuset none exampleset @@ -47,7 +54,7 @@ Now this cpuset, 'ddset', will only allowed access to fake nodes 0 and 1 for memory allocations (1G). You can now assign tasks to these cpusets to limit the memory resources -available to them according to the fake nodes assigned as mems: +available to them according to the fake nodes assigned as mems:: [root@xroads /exampleset/ddset]# echo $$ > tasks [root@xroads /exampleset/ddset]# dd if=/dev/zero of=tmp bs=1024 count=1G @@ -57,9 +64,13 @@ Notice the difference between the system memory usage as reported by /proc/meminfo between the restricted cpuset case above and the unrestricted case (i.e. running the same 'dd' command without assigning it to a fake NUMA cpuset): - Unrestricted Restricted - MemTotal: 3091900 kB 3091900 kB - MemFree: 42113 kB 1513236 kB + + ======== ============ ========== + Name Unrestricted Restricted + ======== ============ ========== + MemTotal 3091900 kB 3091900 kB + MemFree 42113 kB 1513236 kB + ======== ============ ========== This allows for coarse memory management for the tasks you assign to particular cpusets. Since cpusets can form a hierarchy, you can create some pretty diff --git a/Documentation/x86/x86_64/index.rst b/Documentation/x86/x86_64/index.rst index 7b8c82151358..e2a324cde671 100644 --- a/Documentation/x86/x86_64/index.rst +++ b/Documentation/x86/x86_64/index.rst @@ -11,3 +11,4 @@ x86_64 Support uefi mm 5level-paging + fake-numa-for-cpusets -- 2.20.1