From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BFDAC677C4 for ; Wed, 11 Jun 2025 15:59:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2D15C6B00B6; Wed, 11 Jun 2025 11:59:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 282016B00B7; Wed, 11 Jun 2025 11:59:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 123676B00B8; Wed, 11 Jun 2025 11:59:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E62516B00B6 for ; Wed, 11 Jun 2025 11:59:44 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 93F65BEAFC for ; Wed, 11 Jun 2025 15:59:44 +0000 (UTC) X-FDA: 83543580288.08.1A9D2C0 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf03.hostedemail.com (Postfix) with ESMTP id F26FF20005 for ; Wed, 11 Jun 2025 15:59:42 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=tiQZFyvR; dmarc=none; spf=none (imf03.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1749657583; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Kjl5P7q9J6nh1Oxlf1q4qAnvCj4ScgyQPU8x/jAw1Yo=; b=fBqSQAHcl+hGEjp5f7ykMG2SaEnRhVZ3YEiT9fac7yeqgQy3TShM9yqiHLrkQhMRTvFN8D xko64MSfSGDzlpbxPzjcAQ/lDSQHPqRVd9AyU0IdjWPwJZLsLA3mlMTKBdtJUDPw8tPyas AlFZ/I3Lu5ArjcDmoCoJaHeH+jpdHDg= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=tiQZFyvR; dmarc=none; spf=none (imf03.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749657583; a=rsa-sha256; cv=none; b=bGkNET47KMRqpf7OhrCoFI08muFYrXyzZgaO7KLdMYvyklknwLCfZW7hC0MVkow18BjZ4N P/D7jHH2BKgMVzCUlHYf5xZjpcOrSYj2wWbG3eYQOTyM8dkQIo16RaTxl4GLXYuRkK2PEV NaSDoHnZeYHi4swDKElk3pyqaHeHDLQ= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=Kjl5P7q9J6nh1Oxlf1q4qAnvCj4ScgyQPU8x/jAw1Yo=; b=tiQZFyvRvERuwPM5GHwLgUcF2M /KpIPH2CxJkhbsmt1TAPapDZBsm3uPmg5ziQhkiusobP/FUCP2tci1bMB4tGt7rJw/Pmxb9Q0wL+t RUCx44cCT4BXu1uGIQRO+eGtYvaLMhyCK6IdfIre4z3SeA3AuyOhSAmoaj1MplaV9Fzh36V5LMF5E vxnVjreZnOOkRQTKMAsJy+LnPkMZQiUokrlaiQ2+iu8ZRdvtLxq7txScZQoGy0Enl/Mam87QEeFV/ 547Gps3xIkwryi4fXFOr94vOKsOBcujRpbvxuWXeMJGU014TCfbweHe5oh5DU7kvFd97bzXc8L+Dt ydPOdtxw==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1uPNrC-0000000AoxZ-0jez; Wed, 11 Jun 2025 15:59:18 +0000 From: "Matthew Wilcox (Oracle)" To: Vlastimil Babka Cc: "Matthew Wilcox (Oracle)" , Christoph Lameter , David Rientjes , Roman Gushchin , Harry Yoo , linux-mm@kvack.org Subject: [PATCH v2 01/11] doc: Move SLUB documentation to the admin guide Date: Wed, 11 Jun 2025 16:59:04 +0100 Message-ID: <20250611155916.2579160-2-willy@infradead.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250611155916.2579160-1-willy@infradead.org> References: <20250611155916.2579160-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: F26FF20005 X-Stat-Signature: u4afh3s8i3mr8cq81esopozudm7hwxhk X-Rspam-User: X-HE-Tag: 1749657582-226138 X-HE-Meta: U2FsdGVkX192J6fLzcc0QiWH49SBJaHNN5nWKxdXmYrNyGg0zP9MJyqaGidKkBy4HXPlOLOCBHhPX+z2TQbKJjeUJ2O3OoWxm5lHQGEY8EOgvwmwplP8b14wplxsTVChVzEzmPdhON1FLF2EKaUkYOxCLZ5SuAH/6osjLw+Luxy/sDQxTXmPq2CjJzQUkW2QqAg1PZjuz/oiUagyvNzPiI5y1oiqbOfscijIwLpWsH7B9tA86BooOsV6UZ6nxPyRl5GdTsfoLlg6aD/C+vX8OzKjqngXOQrDu4DbUucHk8nxSJvFJdhlc/7VnVgmg5IBnnxCWEHocPCytNtvoPu3mynLhXTDWmy1gllM5KMZFUj3xqzxKblM1KMZYaXHIk1n1FB8oYiWxOXxC7/6Zy5rB8z3L2kC2/8RNIZTNzI//EfdgkuUSNNVvTNEMGF5Lrc6U1ehRjwhOLxfO7FlXH5zbeGIvHbwXTuLPFTcYmlW8W6qPPMlSuZF79CK5FpS7/PVALMvQCjOFmhZKW43bZewxPHcI9Oz/rELgHCssVbThTigAtAQefrYMkkB/vLVNttQto9S3rRRLK9/MXlU4r93LfDcBNVAoXgVmXJoFEI47/tfgU0RR8iDKesyj0g7TAWWQga4XlpyIZ3lwISMp4zTH5Pbbycc9kIq8rJ+dWkPgddF1e9HY4dGunodSwImyfpptdHoLxj2aZ9J+DNxd03FsZQ7F8hy6ia8Tnt10nYgkRWfgmUlBMxuQQu+5hcY0t7YNfjzhrzf27n+TNoIbygfG4sDEZaJ/rQvIERZLdeStNjX88jr8HjeRx0iqw1+hWlHDDbNF12alqC2Rc82c6C8THXfYTb5/iC7GgpkR4IwAt0UTnBgt9l2Gif8SIDYVoNrEgvswAdsEviY9YhbNzWsnzSSWqY4zbexaqO1npKGc9eRsbWQ2ViugSGHBDvwBrdWzh7J53T8riUdaa88JGR LDACHWX3 3iwgVtEJHs84VltJJkzRxG90X/e0H+voZ50GvmR7X/OFLmcYiBhzO3ge22ab0tPNmO7DImGLFjJPRIQlLrQIuUcn47+LIAf/8TY1YfftyuXwDamraHYThNDZssA8rRH9CpQSBAfAu2f1tviP3JiAgbSMgeCu5ysLyHxRqBSB4xNu3JI4nvcxXKiDGGQdKoxK7WQoc9FaOjezvSNlFu7+z2SmwLvUtIrftBVlENQr+bFq/sFTPpR/oqh31vkZXBHgoIFzK 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: List-Subscribe: List-Unsubscribe: This section is supposed to be for internal documentation, while the document is advice for sysadmins. Move it to the appropriate place. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Harry Yoo --- Documentation/ABI/testing/sysfs-kernel-slab | 5 +++-- .../admin-guide/kernel-parameters.txt | 12 +++++++----- Documentation/admin-guide/mm/index.rst | 1 + .../{mm/slub.rst => admin-guide/mm/slab.rst} | 19 +++++++++---------- Documentation/mm/index.rst | 1 - 5 files changed, 20 insertions(+), 18 deletions(-) rename Documentation/{mm/slub.rst => admin-guide/mm/slab.rst} (97%) diff --git a/Documentation/ABI/testing/sysfs-kernel-slab b/Documentation/ABI/testing/sysfs-kernel-slab index 658999be5164..b26e4299f822 100644 --- a/Documentation/ABI/testing/sysfs-kernel-slab +++ b/Documentation/ABI/testing/sysfs-kernel-slab @@ -37,7 +37,8 @@ Description: The alloc_calls file is read-only and lists the kernel code locations from which allocations for this cache were performed. The alloc_calls file only contains information if debugging is - enabled for that cache (see Documentation/mm/slub.rst). + enabled for that cache (see + Documentation/admin-guide/mm/slab.rst). What: /sys/kernel/slab//alloc_fastpath Date: February 2008 @@ -219,7 +220,7 @@ Contact: Pekka Enberg , Description: The free_calls file is read-only and lists the locations of object frees if slab debugging is enabled (see - Documentation/mm/slub.rst). + Documentation/admin-guide/mm/slab.rst). What: /sys/kernel/slab//free_fastpath Date: February 2008 diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 5c5b8ceafd45..f6b45d444e63 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -6568,7 +6568,7 @@ slab_debug can create guard zones around objects and may poison objects when not in use. Also tracks the last alloc / free. For more information see - Documentation/mm/slub.rst. + Documentation/admin-guide/mm/slab.rst. (slub_debug legacy name also accepted for now) Using this option implies the "no_hash_pointers" @@ -6579,7 +6579,7 @@ Determines the maximum allowed order for slabs. A high setting may cause OOMs due to memory fragmentation. For more information see - Documentation/mm/slub.rst. + Documentation/admin-guide/mm/slab.rst. (slub_max_order legacy name also accepted for now) slab_merge [MM] @@ -6594,13 +6594,14 @@ the number of objects indicated. The higher the number of objects the smaller the overhead of tracking slabs and the less frequently locks need to be acquired. - For more information see Documentation/mm/slub.rst. + For more information see + Documentation/admin-guide/mm/slab.rst. (slub_min_objects legacy name also accepted for now) slab_min_order= [MM] Determines the minimum page order for slabs. Must be lower or equal to slab_max_order. For more information see - Documentation/mm/slub.rst. + Documentation/admin-guide/mm/slab.rst. (slub_min_order legacy name also accepted for now) slab_nomerge [MM] @@ -6614,7 +6615,8 @@ cache (risks via metadata attacks are mostly unchanged). Debug options disable merging on their own. - For more information see Documentation/mm/slub.rst. + For more information see + Documentation/admin-guide/mm/slab.rst. (slub_nomerge legacy name also accepted for now) slab_strict_numa [MM] diff --git a/Documentation/admin-guide/mm/index.rst b/Documentation/admin-guide/mm/index.rst index 2d2f6c222308..ebc83ca20fdc 100644 --- a/Documentation/admin-guide/mm/index.rst +++ b/Documentation/admin-guide/mm/index.rst @@ -37,6 +37,7 @@ the Linux memory management. numaperf pagemap shrinker_debugfs + slab soft-dirty swap_numa transhuge diff --git a/Documentation/mm/slub.rst b/Documentation/admin-guide/mm/slab.rst similarity index 97% rename from Documentation/mm/slub.rst rename to Documentation/admin-guide/mm/slab.rst index 84ca1dc94e5e..14429ab90611 100644 --- a/Documentation/mm/slub.rst +++ b/Documentation/admin-guide/mm/slab.rst @@ -1,13 +1,12 @@ -========================== -Short users guide for SLUB -========================== - -The basic philosophy of SLUB is very different from SLAB. SLAB -requires rebuilding the kernel to activate debug options for all -slab caches. SLUB always includes full debugging but it is off by default. -SLUB can enable debugging only for selected slabs in order to avoid -an impact on overall system performance which may make a bug more -difficult to find. +======================================== +Short users guide for the slab allocator +======================================== + +The slab allocator includes full debugging support (when built with +CONFIG_SLUB_DEBUG=y) but it is off by default (unless built with +CONFIG_SLUB_DEBUG_ON=y). You can enable debugging only for selected +slabs in order to avoid an impact on overall system performance which +may make a bug more difficult to find. In order to switch debugging on one can add an option ``slab_debug`` to the kernel command line. That will enable full debugging for diff --git a/Documentation/mm/index.rst b/Documentation/mm/index.rst index d3ada3e45e10..fb45acba16ac 100644 --- a/Documentation/mm/index.rst +++ b/Documentation/mm/index.rst @@ -56,7 +56,6 @@ documentation, or deleted if it has served its purpose. page_owner page_table_check remap_file_pages - slub split_page_table_lock transhuge unevictable-lru -- 2.47.2