From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CBF240DFAB for ; Sat, 18 Apr 2026 00:06:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776470806; cv=none; b=JUIVj330EfhhAW3oEOO0vKodaxy2ylKNaAoUMUTlag60oCXUmhaWidLXuR3bQudm73Mm4ZGpmze6chnnTDD/KBaxAzDZD/I7P/c0knpt5fjhateB2VdEcDdaWtydRec3SvreNMY3ZV8prjB6iASDBIHeoGRwxW6ipSb6kFn6CTA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776470806; c=relaxed/simple; bh=PaUbviliQKYsn82vdSrXkLwCmA1WIliY8eE8FyWwR38=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LEZLX3kI+act6KbQ4PcKonR8SJpSolK7gO5QnbVWBI/TTWujO3+jgfdIWmCAmUEvcQVN+bl2DJmoM0CeEjkGrFHO05rHJ7REn7G+WPWcy0EjPUUxGbNN+t4LWw48lFOmBWg0SoAsBKS4iW0EjSMfRk/9camxSi/F4F/+KXC52jQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OBOSuUW0; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OBOSuUW0" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-82f943870baso325273b3a.1 for ; Fri, 17 Apr 2026 17:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776470805; x=1777075605; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XnzlPBGDUvWxUUnLdKcHZKjWamjXrlcano0vZQ/8+jc=; b=OBOSuUW0wgk82yEwF8Bt6NKi5xB41z4M7kOWXz1iUBbWS8pcXwDOI0Xo6bCzEe/Qcc wHphOw3DREMxRoQ2C5nP9s6MrmT5mv2n2i7Dtmkh5QX5ICcPgwbzdQW7WhKHw7lRK1JS MdLg7I0vXFF/nO3xp78hYS7893UDUZs80SUcNyydLX4ru6wwiMIXoK3r/QAbMpfvVBRr /hwxhXHTHh7xsTAP6/AtwIdJWVQC/sjD0IpTVhVzd1LrNtfYJpaZlnkcfmNHkA/wtavD D2GnXvknKz7d2Ay8FZ44wpn/+276Uqa4nIDKRD7ALorBkx2oyJPVR4bzvYPqJmr91u2I PwvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776470805; x=1777075605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XnzlPBGDUvWxUUnLdKcHZKjWamjXrlcano0vZQ/8+jc=; b=RwhQBGf5tJ6BuL5WenHVsKI4LC98hKCprgXITQIf8m8EmfWPvfaCocUTmLCIW3tIF5 YscuEqST5h8GvEMgrHUpXvZb0wtPUImtM6tWnW6OLPIiu9kqyKBvTnUZSypxRNxKD63c ilS5bZLUf5RBbFvosk98ySD+ljD+yvzSsAHMSmyi9If2db3CKlmztmMU3zj8ygZLZZK8 lqGyg8cMtJ8yODXgHkxprUU0HdIHAmgvYIYoCEsOSMuOrmwE69KTnON/IpquOmiVIIYE 88wyleYCv5lIHd6HsyWa5JTkLhzegWs6tiMF5oHuKqbzlpsew4InyLOuoYmPe6At7cc5 03Mg== X-Forwarded-Encrypted: i=1; AFNElJ/rol7j7T5hGdwpVBqrN34aMLrqsKKBCjmH65sJk6wZc5ZdX4uDowE4CrZ8GtRlrTDT00hRRH1rajlf4I8=@vger.kernel.org X-Gm-Message-State: AOJu0YxdRvZSvMkJEMZisokBDhXNr6CL6a0mV9pgbr89pm5VOs7E0T/b w81/KUCutXZojjnOmxNI0LiwhF1xDKrGeucF0M96POcU8fhOmMQeOVwY X-Gm-Gg: AeBDieu5rdYYirFaw2jVZArwyv0oKF7SFJQDH/bmJqizZD2WhiPWxHfk5nqdu5n2dkp o22FYq1jUGtYPiZYFq3Qk37mi8FW80kD8Pf6/Lsy4VuNNGbejKreKZzXPdJJ2Ji43ejINvQ9nDp xJX8Xw3PXjKJHT+EJgfy4MbBEH4jDGHA6sHDwHzyBcLh9jQijJWoywJaRGX8ilIbgDB59IMcj2f 78/cg+KHpAo1sXZaDr48xmxiVrJ0Scj5gnWC72ZhxGRC2jrkBXzYsfmOoPJRw/7BV74cWZD0MDV Os4he2z7IYIJXXJt93oDbf1DhHYPGRQgI6sMPxD954PTZaitwPeNU94Uw9pTRf8GGO6Jene29SR VPIoqUtgom5/ohi2UlHFLt4o41Y5ahn+QkMvEB4tAtam4eAaKGsWpq8JEQWI5IR7cpHf+8EPvni 4ex7RAm4H49B3Z9D1fUFcIRyIpj7NmlFfPj4EhKqTGvOZaRcjycsOn3zcHrhG2SknlrGUBp0+4B vducvbSVbty4mKBS0f5OCwUKzknSCbn X-Received: by 2002:a05:6a00:1c9e:b0:82f:6b6f:13ec with SMTP id d2e1a72fcca58-82f8c9427b4mr4686092b3a.34.1776470804566; Fri, 17 Apr 2026 17:06:44 -0700 (PDT) Received: from nickhuang.. (2001-b400-e28d-2380-bd61-3c44-585e-51bb.emome-ip6.hinet.net. [2001:b400:e28d:2380:bd61:3c44:585e:51bb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82f8e982fd3sm3840200b3a.10.2026.04.17.17.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2026 17:06:43 -0700 (PDT) From: Nick Huang To: Vlastimil Babka , Harry Yoo , Andrew Morton , David Hildenbrand , Jonathan Corbet Cc: Hao Li , Christoph Lameter , David Rientjes , Roman Gushchin , Lorenzo Stoakes , "Liam R . Howlett" , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Shuah Khan , linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Huang Subject: [PATCH] docs: Add overview and SLUB allocator sections to slab documentation Date: Sat, 18 Apr 2026 00:06:19 +0000 Message-ID: <20260418000635.17499-1-sef1548@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit - Add "Overview" section explaining the slab allocator's role and purpose - Document the three main slab allocator implementations (SLAB, SLUB, SLOB) - Highlight SLUB as the default allocator on modern systems - Add "SLUB Allocator" subsection with detailed information: - Explain SLUB's design goals and advantages over legacy SLAB - Document its focus on simplification and performance - Note support for both uniprocessor and SMP systems Signed-off-by: Nick Huang --- Documentation/mm/slab.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Documentation/mm/slab.rst b/Documentation/mm/slab.rst index 2bcc58ada302..2d1d093afb7b 100644 --- a/Documentation/mm/slab.rst +++ b/Documentation/mm/slab.rst @@ -4,6 +4,32 @@ Slab Allocation =============== +Overview +======== + +The slab allocator is responsible for efficient allocation and reuse of +small kernel objects. It reduces internal fragmentation and improves +performance by caching frequently used objects. + +The Linux kernel provides multiple slab allocator implementations, +including SLAB, SLUB, and SLOB. Among these, SLUB is the default +allocator on most modern systems. + +SLUB Allocator +============== + +Overview +-------- + +SLUB is a slab allocator designed to replace the legacy SLAB allocator +(mm/slab.c). It addresses the complexity, scalability limitations, and +memory overhead of the SLAB implementation. + +The primary goal of SLUB is to simplify slab allocation while improving +performance on both uniprocessor (UP) and symmetric multiprocessing (SMP) +systems. + + Functions and structures ======================== -- 2.43.0