Received: by 10.192.165.156 with SMTP id m28csp958986imm; Wed, 18 Apr 2018 01:12:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+D6EDOsKNG4L3M+7vd+gwXWFJxO33uGXWmpQfXnzaPySzRQBPLk1FHGYHoMT3byVWBONGo X-Received: by 10.99.64.3 with SMTP id n3mr960181pga.13.1524039137776; Wed, 18 Apr 2018 01:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524039137; cv=none; d=google.com; s=arc-20160816; b=whMtrF2zql5MhhH2Kbis2uc/7nsLBr9gHPuGRul5W4qNbNvq4w+5htNCqHM+XbAUuu FByiY/EtS6gMbDuuSE/SNPuPa/0XNy9zfF0vylVXpgJdKsmG0tZIQu57ERlRUHOb9rau Zwv8q5qVy2XxWuBc53adOF/Z3pAbS6HY90Oy7qBOYl6GLJV4uLy0RejDW19VFYZ6+NsS KCiqrJu8/0N+ZlEDeKNqlIJJZVjEyUbsj1mvU5cEEe8U/6IHnctPGXr+9ejYuUcA43lC XIyCF1EloIR5F7FH2fbFGvrbyDInD93QmLgjSaWBMFIpWvteEreB6sp+qWqu9/OBFoXP WlHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=q59oLkTP3W26mzUJJFhSVpCYTWgM8w8CS7e25glKWd8=; b=CgB6Ixyr4cOrpkD8Yuo81J5G5EiJ5u0c6HFYSSFX2TEWJyGfBDbVa7PSHoDkvFt3uq XERbkberFZz3LhERjFxYjwzwMUTK6ycNxqQUqvPLvjB9rJdcwa0F91EeRE5cEHetIgDo /Q2QlUAUgNwXBDsIlvj5FxoVaMI2Mq2vH5FOFQpLTIWl+jjRlC9pJvZUzliORZKvk2L5 I/J/TwXaMAzS2Obmpo1gDKAv+LIXFdrm5fPOCpqBUim+VjGAS3Siyfzule5Z6Zn68jeF 60Lx5sOaOhqMJ+YEdF4cDxyvn1QZBe/60dXpWpNdWBgoCr5Pr9mJQtec3tb4L6Wpfgho 6Ucw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d128si654162pgc.445.2018.04.18.01.12.03; Wed, 18 Apr 2018 01:12:17 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753575AbeDRIK0 (ORCPT + 99 others); Wed, 18 Apr 2018 04:10:26 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55218 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753282AbeDRIKY (ORCPT ); Wed, 18 Apr 2018 04:10:24 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3I8AM70125872 for ; Wed, 18 Apr 2018 04:10:24 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2he24qrdam-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 18 Apr 2018 04:10:23 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Apr 2018 09:08:14 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Apr 2018 09:08:11 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3I88ABM17760540; Wed, 18 Apr 2018 08:08:10 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DDD6952052; Wed, 18 Apr 2018 07:58:58 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.205.155]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 1A28852041; Wed, 18 Apr 2018 07:58:57 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Wed, 18 Apr 2018 11:08:08 +0300 From: Mike Rapoport To: Jonathan Corbet Cc: Andrew Morton , Alexander Viro , Matthew Wilcox , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH 6/7] docs/admin-guide/mm: start moving here files from Documentation/vm Date: Wed, 18 Apr 2018 11:07:49 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524038870-413-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1524038870-413-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18041808-0012-0000-0000-000005CC1E2D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041808-0013-0000-0000-000019486DB7 Message-Id: <1524038870-413-7-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-18_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 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-1804180077 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Several documents in Documentation/vm fit quite well into the "admin/user guide" category. The documents that don't overload the reader with lots of implementation details and provide coherent description of certain feature can be moved to Documentation/admin-guide/mm. Signed-off-by: Mike Rapoport --- Documentation/ABI/stable/sysfs-devices-node | 2 +- Documentation/ABI/testing/sysfs-kernel-mm-hugepages | 2 +- Documentation/{vm => admin-guide/mm}/hugetlbpage.rst | 0 Documentation/{vm => admin-guide/mm}/idle_page_tracking.rst | 2 +- Documentation/admin-guide/mm/index.rst | 9 +++++++++ Documentation/{vm => admin-guide/mm}/pagemap.rst | 6 +++--- Documentation/{vm => admin-guide/mm}/soft-dirty.rst | 0 Documentation/{vm => admin-guide/mm}/userfaultfd.rst | 0 Documentation/filesystems/proc.txt | 6 ++++-- Documentation/sysctl/vm.txt | 4 ++-- Documentation/vm/00-INDEX | 10 ---------- Documentation/vm/hwpoison.rst | 2 +- Documentation/vm/index.rst | 5 ----- fs/Kconfig | 2 +- fs/proc/task_mmu.c | 4 ++-- mm/Kconfig | 5 +++-- 16 files changed, 28 insertions(+), 31 deletions(-) rename Documentation/{vm => admin-guide/mm}/hugetlbpage.rst (100%) rename Documentation/{vm => admin-guide/mm}/idle_page_tracking.rst (98%) rename Documentation/{vm => admin-guide/mm}/pagemap.rst (96%) rename Documentation/{vm => admin-guide/mm}/soft-dirty.rst (100%) rename Documentation/{vm => admin-guide/mm}/userfaultfd.rst (100%) diff --git a/Documentation/ABI/stable/sysfs-devices-node b/Documentation/ABI/stable/sysfs-devices-node index b38f4b7..3e90e1f 100644 --- a/Documentation/ABI/stable/sysfs-devices-node +++ b/Documentation/ABI/stable/sysfs-devices-node @@ -90,4 +90,4 @@ Date: December 2009 Contact: Lee Schermerhorn Description: The node's huge page size control/query attributes. - See Documentation/vm/hugetlbpage.rst \ No newline at end of file + See Documentation/admin-guide/mm/hugetlbpage.rst \ No newline at end of file diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-hugepages b/Documentation/ABI/testing/sysfs-kernel-mm-hugepages index 5140b23..fdaa216 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-hugepages +++ b/Documentation/ABI/testing/sysfs-kernel-mm-hugepages @@ -12,4 +12,4 @@ Description: free_hugepages surplus_hugepages resv_hugepages - See Documentation/vm/hugetlbpage.rst for details. + See Documentation/admin-guide/mm/hugetlbpage.rst for details. diff --git a/Documentation/vm/hugetlbpage.rst b/Documentation/admin-guide/mm/hugetlbpage.rst similarity index 100% rename from Documentation/vm/hugetlbpage.rst rename to Documentation/admin-guide/mm/hugetlbpage.rst diff --git a/Documentation/vm/idle_page_tracking.rst b/Documentation/admin-guide/mm/idle_page_tracking.rst similarity index 98% rename from Documentation/vm/idle_page_tracking.rst rename to Documentation/admin-guide/mm/idle_page_tracking.rst index d1c4609..92e3a25 100644 --- a/Documentation/vm/idle_page_tracking.rst +++ b/Documentation/admin-guide/mm/idle_page_tracking.rst @@ -65,7 +65,7 @@ workload one should: are not reclaimable, he or she can filter them out using ``/proc/kpageflags``. -See Documentation/vm/pagemap.rst for more information about +See Documentation/admin-guide/mm/pagemap.rst for more information about ``/proc/pid/pagemap``, ``/proc/kpageflags``, and ``/proc/kpagecgroup``. .. _impl_details: diff --git a/Documentation/admin-guide/mm/index.rst b/Documentation/admin-guide/mm/index.rst index c47c16e..6c8b554 100644 --- a/Documentation/admin-guide/mm/index.rst +++ b/Documentation/admin-guide/mm/index.rst @@ -17,3 +17,12 @@ are described in Documentation/sysctl/vm.txt and in `man 5 proc`_. Here we document in detail how to interact with various mechanisms in the Linux memory management. + +.. toctree:: + :maxdepth: 1 + + hugetlbpage + idle_page_tracking + pagemap + soft-dirty + userfaultfd diff --git a/Documentation/vm/pagemap.rst b/Documentation/admin-guide/mm/pagemap.rst similarity index 96% rename from Documentation/vm/pagemap.rst rename to Documentation/admin-guide/mm/pagemap.rst index 7ba8cbd..053ca64 100644 --- a/Documentation/vm/pagemap.rst +++ b/Documentation/admin-guide/mm/pagemap.rst @@ -18,7 +18,7 @@ There are four components to pagemap: * Bits 0-54 page frame number (PFN) if present * Bits 0-4 swap type if swapped * Bits 5-54 swap offset if swapped - * Bit 55 pte is soft-dirty (see Documentation/vm/soft-dirty.rst) + * Bit 55 pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst) * Bit 56 page exclusively mapped (since 4.2) * Bits 57-60 zero * Bit 61 page is file-page or shared-anon (since 3.5) @@ -97,7 +97,7 @@ Short descriptions to the page flags A compound page with order N consists of 2^N physically contiguous pages. A compound page with order 2 takes the form of "HTTT", where H donates its head page and T donates its tail page(s). The major consumers of compound - pages are hugeTLB pages (Documentation/vm/hugetlbpage.rst), the SLUB etc. + pages are hugeTLB pages (Documentation/admin-guide/mm/hugetlbpage.rst), the SLUB etc. memory allocators and various device drivers. However in this interface, only huge/giga pages are made visible to end users. 16 - COMPOUND_TAIL @@ -118,7 +118,7 @@ Short descriptions to the page flags zero page for pfn_zero or huge_zero page 25 - IDLE page has not been accessed since it was marked idle (see - Documentation/vm/idle_page_tracking.rst). Note that this flag may be + Documentation/admin-guide/mm/idle_page_tracking.rst). Note that this flag may be stale in case the page was accessed via a PTE. To make sure the flag is up-to-date one has to read ``/sys/kernel/mm/page_idle/bitmap`` first. diff --git a/Documentation/vm/soft-dirty.rst b/Documentation/admin-guide/mm/soft-dirty.rst similarity index 100% rename from Documentation/vm/soft-dirty.rst rename to Documentation/admin-guide/mm/soft-dirty.rst diff --git a/Documentation/vm/userfaultfd.rst b/Documentation/admin-guide/mm/userfaultfd.rst similarity index 100% rename from Documentation/vm/userfaultfd.rst rename to Documentation/admin-guide/mm/userfaultfd.rst diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 2d3984c..ef53f80 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -515,7 +515,8 @@ guarantees: The /proc/PID/clear_refs is used to reset the PG_Referenced and ACCESSED/YOUNG bits on both physical and virtual pages associated with a process, and the -soft-dirty bit on pte (see Documentation/vm/soft-dirty.rst for details). +soft-dirty bit on pte (see Documentation/admin-guide/mm/soft-dirty.rst +for details). To clear the bits for all the pages associated with the process > echo 1 > /proc/PID/clear_refs @@ -536,7 +537,8 @@ Any other value written to /proc/PID/clear_refs will have no effect. The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags using /proc/kpageflags and number of times a page is mapped using -/proc/kpagecount. For detailed explanation, see Documentation/vm/pagemap.rst. +/proc/kpagecount. For detailed explanation, see +Documentation/admin-guide/mm/pagemap.rst. The /proc/pid/numa_maps is an extension based on maps, showing the memory locality and binding policy, as well as the memory usage (in pages) of diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index c8e6d5b..697ef8c 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt @@ -515,7 +515,7 @@ nr_hugepages Change the minimum size of the hugepage pool. -See Documentation/vm/hugetlbpage.rst +See Documentation/admin-guide/mm/hugetlbpage.rst ============================================================== @@ -524,7 +524,7 @@ nr_overcommit_hugepages Change the maximum size of the hugepage pool. The maximum is nr_hugepages + nr_overcommit_hugepages. -See Documentation/vm/hugetlbpage.rst +See Documentation/admin-guide/mm/hugetlbpage.rst ============================================================== diff --git a/Documentation/vm/00-INDEX b/Documentation/vm/00-INDEX index cda564d..f8a96ca 100644 --- a/Documentation/vm/00-INDEX +++ b/Documentation/vm/00-INDEX @@ -12,14 +12,10 @@ highmem.rst - Outline of highmem and common issues. hmm.rst - Documentation of heterogeneous memory management -hugetlbpage.rst - - a brief summary of hugetlbpage support in the Linux kernel. hugetlbfs_reserv.rst - A brief overview of hugetlbfs reservation design/implementation. hwpoison.rst - explains what hwpoison is -idle_page_tracking.rst - - description of the idle page tracking feature. ksm.rst - how to use the Kernel Samepage Merging feature. mmu_notifier.rst @@ -34,16 +30,12 @@ page_frags.rst - description of page fragments allocator page_migration.rst - description of page migration in NUMA systems. -pagemap.rst - - pagemap, from the userspace perspective page_owner.rst - tracking about who allocated each page remap_file_pages.rst - a note about remap_file_pages() system call slub.rst - a short users guide for SLUB. -soft-dirty.rst - - short explanation for soft-dirty PTEs split_page_table_lock.rst - Separate per-table lock to improve scalability of the old page_table_lock. swap_numa.rst @@ -52,8 +44,6 @@ transhuge.rst - Transparent Hugepage Support, alternative way of using hugepages. unevictable-lru.rst - Unevictable LRU infrastructure -userfaultfd.rst - - description of userfaultfd system call z3fold.txt - outline of z3fold allocator for storing compressed pages zsmalloc.rst diff --git a/Documentation/vm/hwpoison.rst b/Documentation/vm/hwpoison.rst index 070aa1e..09bd24a 100644 --- a/Documentation/vm/hwpoison.rst +++ b/Documentation/vm/hwpoison.rst @@ -155,7 +155,7 @@ Testing value). This allows stress testing of many kinds of pages. The page_flags are the same as in /proc/kpageflags. The flag bits are defined in include/linux/kernel-page-flags.h and - documented in Documentation/vm/pagemap.rst + documented in Documentation/admin-guide/mm/pagemap.rst * Architecture specific MCE injector diff --git a/Documentation/vm/index.rst b/Documentation/vm/index.rst index 6c45142..ed58cb9 100644 --- a/Documentation/vm/index.rst +++ b/Documentation/vm/index.rst @@ -13,15 +13,10 @@ various features of the Linux memory management .. toctree:: :maxdepth: 1 - hugetlbpage - idle_page_tracking ksm numa_memory_policy - pagemap transhuge - soft-dirty swap_numa - userfaultfd zswap Kernel developers MM documentation diff --git a/fs/Kconfig b/fs/Kconfig index ba53dc2..ac4ac90 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -196,7 +196,7 @@ config HUGETLBFS help hugetlbfs is a filesystem backing for HugeTLB pages, based on ramfs. For architectures that support it, say Y here and read - for details. + for details. If unsure, say N. diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 333cda8..ed48b6e 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -937,7 +937,7 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma, /* * The soft-dirty tracker uses #PF-s to catch writes * to pages, so write-protect the pte as well. See the - * Documentation/vm/soft-dirty.rst for full description + * Documentation/admin-guide/mm/soft-dirty.rst for full description * of how soft-dirty works. */ pte_t ptent = *pte; @@ -1417,7 +1417,7 @@ static int pagemap_hugetlb_range(pte_t *ptep, unsigned long hmask, * Bits 0-54 page frame number (PFN) if present * Bits 0-4 swap type if swapped * Bits 5-54 swap offset if swapped - * Bit 55 pte is soft-dirty (see Documentation/vm/soft-dirty.rst) + * Bit 55 pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst) * Bit 56 page exclusively mapped * Bits 57-60 zero * Bit 61 page is file-page or shared-anon diff --git a/mm/Kconfig b/mm/Kconfig index 9bdb018..2d7ef62 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -530,7 +530,7 @@ config MEM_SOFT_DIRTY into a page just as regular dirty bit, but unlike the latter it can be cleared by hands. - See Documentation/vm/soft-dirty.rst for more details. + See Documentation/admin-guide/mm/soft-dirty.rst for more details. config ZSWAP bool "Compressed cache for swap pages (EXPERIMENTAL)" @@ -656,7 +656,8 @@ config IDLE_PAGE_TRACKING be useful to tune memory cgroup limits and/or for job placement within a compute cluster. - See Documentation/vm/idle_page_tracking.rst for more details. + See Documentation/admin-guide/mm/idle_page_tracking.rst for + more details. # arch_add_memory() comprehends device memory config ARCH_HAS_ZONE_DEVICE -- 2.7.4