Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6913917yba; Thu, 2 May 2019 00:13:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjoj+mgogDXhrc73/QHSiP3CcCkV23a8dPWfPQhZifHTbXcAq6gz8AQ6XEstG2cELJwWg7 X-Received: by 2002:a63:550c:: with SMTP id j12mr2382632pgb.450.1556781235311; Thu, 02 May 2019 00:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556781235; cv=none; d=google.com; s=arc-20160816; b=BmV/lRdK4bnOElT9x8PUZkN7W2wmLoe6AkKrS+07tmfg99/W3OIBuSrOrZDbKq3DzB wSoz0ZdkJ4Fzx45Fu0q3/KNIskmGC1oZzUABuIaiAU/PqYQ51HWhDruNJKlRfrQ+Pl+a /FQuCi2CcLhNiLwZvWDC0Bk2hdkEvxntA7FJ31G+Fy7wDtz4juZEw0yoasx5+nOddK6M 3rJnmzd3DUkns8i6GId8OQa6/91+dWRUI+OZaRDWLgCopTARsYMVju9qrq+rF7PFDzom 3OB7ycf4sTCQCc+RvcA5G81Lif9s2neRb3dJGhWfCaPnd7r8ZOTjBlJzOQ07H8SaAIXv iVdg== 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=T5zzGU7rkqKqabRdTGdBNCQkm0jH6dpMGvRhTLzc/tM=; b=Nc4BCmaA1eDbXBa6NORObFtavMwxPofGJ1fPl8s9N3IqdBh3DUsGoAcjtzCuaveqhb qSBgHEMrPVCQK7oN1jKNT5Y+4/r3acxkPIqa5wtIxJBCl2d3TQ6XMshZOz8917KKxvoV y4+RtOW+zBn1YuC7Oav5mGGUyhgMfxUjPnWKUWfkyEB0a8Xp1gmbhr4Rnr0eGcZ44gjk UMf8e8leam8kUgfIyuWng+yZKpJ9Sb/aK53CvjzYvG7mKhoWN5nLdNID13h3ZXt8aK5O +sZoJ0vfXAJ6Wx7fcQEMZnj32QbiMBK3hk5pegRGaPqKmctnsSmGSvtcXqKZ/sA80rXU Hq3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="pmvS/53N"; 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 11si698875pfu.224.2019.05.02.00.13.40; Thu, 02 May 2019 00:13:55 -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="pmvS/53N"; 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 S1726883AbfEBHL6 (ORCPT + 99 others); Thu, 2 May 2019 03:11:58 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:38662 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbfEBHL5 (ORCPT ); Thu, 2 May 2019 03:11:57 -0400 Received: by mail-pf1-f193.google.com with SMTP id 10so684941pfo.5; Thu, 02 May 2019 00:11:57 -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=T5zzGU7rkqKqabRdTGdBNCQkm0jH6dpMGvRhTLzc/tM=; b=pmvS/53N0Segq831SAWXTbjtPWaCKskdZrcg6sAOFpTuDJhvmQxfAUbwVKmDHUawf0 ZilZfWpdAdXcNnCeNh4lvegmVt3IU2e8zh9wVozMDAeRueikafVQpzdbdyBN7HfZIhhn EGIKqGDbozGn1ymgQ6E8aWfm9kxk2VqSs+BSGcRfYMx9eETzIhCYXd5vdsgVwUcLQMur j1BhCxQxsXis3vgK3do4BaMHKAQ56BuwmRaI5dVQ1syoKSd//LDLBA5rpnrCi2vE/Kuh U8CBtCvqdYsx9Z34Huh5nJ4/6WgJ6H+1qyCXcT3dI2qm0tBzGEzux0j2xXR90LQc8jOE 3otw== 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=T5zzGU7rkqKqabRdTGdBNCQkm0jH6dpMGvRhTLzc/tM=; b=tYN32nE+QTjZPCo4a6ROKlZscYBVOxafF5S+f0AfIVS3anm0S3bnBBR26GrE108dI2 M22z3IhK0KFKSPYhWbBPlKy4KO1zyEYW6j+ckY8d62vD7Syjm4Co3QsXB3kiM5TlQz7R RqZGKY1tdM9IkbGcld2Wq8W5gVnRtc1buBt2baaRlQlIvVeFwY6sOVGfLpumMg6HrB6V hzOVjVmRFHnuWHLKyz/gznVqoT8qA5jKhRdCzP7wcpFqtuaLdFvpe1ODK4ngGnL5fPfd /IgU7od6hJxoaAXgDJWXPLCUx2m2DJ9yzneKPPvDxykM3wMaRlYg5rkIpaC61aTXcraP 9hPA== X-Gm-Message-State: APjAAAVisTOg9yZ5uBosO9BOuHtokVk1HzFnIcfiXyLp/mYys7R4BQKd pRo4T5PlggM7UBFRzUzRX68= X-Received: by 2002:a62:e101:: with SMTP id q1mr2517681pfh.160.1556781116826; Thu, 02 May 2019 00:11:56 -0700 (PDT) Received: from laptop.DHCP ([104.238.181.70]) by smtp.gmail.com with ESMTPSA id u24sm4686976pfh.91.2019.05.02.00.11.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2019 00:11:56 -0700 (PDT) From: Changbin Du To: corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Changbin Du , Mauro Carvalho Chehab Subject: [PATCH v2 25/27] Documentation: x86: convert x86_64/fake-numa-for-cpusets to reST Date: Thu, 2 May 2019 15:06:31 +0800 Message-Id: <20190502070633.9809-26-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190502070633.9809-1-changbin.du@gmail.com> References: <20190502070633.9809-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 Reviewed-by: Mauro Carvalho Chehab --- ...-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