From patchwork Sat Feb 11 10:22:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13136989 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 5B52FC61DA4 for ; Sat, 11 Feb 2023 10:22:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C4F866B0072; Sat, 11 Feb 2023 05:22:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BFF446B0073; Sat, 11 Feb 2023 05:22:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC6BD6B0074; Sat, 11 Feb 2023 05:22:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9CCCF6B0072 for ; Sat, 11 Feb 2023 05:22:24 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5AF58C1465 for ; Sat, 11 Feb 2023 10:22:24 +0000 (UTC) X-FDA: 80454621408.09.14A5305 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf26.hostedemail.com (Postfix) with ESMTP id CD90E140006 for ; Sat, 11 Feb 2023 10:22:22 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=WM04XY0X; spf=pass (imf26.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676110942; 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:references:dkim-signature; bh=HF39A+tlb3giJP3Fl+XJMt8aBay6Hmbn4tNnffJbMGY=; b=xI/DkSvlftKDEgGsEPOIadnc8j4+v6dgyZU8j6/7xSpY98S944KESpejKXnum605bLYepA ttKtV2q+DGRmchvz6TMglpvsfwNdRmWqI8SiN5Vn0XyiMDQGsnWpXRXvu8aChUxn+43Pma WsKv2+rtppVNsTSS2uA2JczRi2/kT+k= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=WM04XY0X; spf=pass (imf26.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676110942; a=rsa-sha256; cv=none; b=AZfbF4MIsPouSFGn7bRLyhlm7H2Wy7Hg/Cb1nquSnxY50ZPd00LotK5VKJTJsNK27GyUIF vqJRz4GdKDCeQtZHTrY+WqVO/XKh+UYlSzKiQ/4orOA04OvMePgpW60qtrtXIYjR7yUYMJ /90vSu0C31b+9DLpXuKhwCMeAHCeYMY= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CD1C260B63; Sat, 11 Feb 2023 10:22:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B07F6C433EF; Sat, 11 Feb 2023 10:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676110941; bh=wXl+v2cYHgUVOYrT8Nhyj05SgXbb90sDCK2do+1O72Q=; h=From:To:Cc:Subject:Date:From; b=WM04XY0XXQsO1ywofpTxfKKq89jA+kGnAq4tcROhzX22g6f0Yjs5U8EnRWSbn2Fti RdsT9zw/0eHyTYOBaQTPjlfe2WImhhFK+1AbeUKh6vux1yc/nFPpU79zdOwojCXdiA kgTU8m0vPpq20rvBFzNHzeFLmKETbdRV5RuCokBRuk+/shoL5xGsSoF+iAe/YQBVc5 3rUMb5YNF2fRM2SvkwvQ4b91ETFGgFK+xs8w+xutGzrpJdrWUIkS5Tt72UlQqRVx91 um9nL4Lj+lfPl7Lf5n1RpBh2gvadE2Sen3P6fHp6LDOTyQN7SjQU+JEQLx+uf23GRF AfjTO/9qv8SKQ== From: Mike Rapoport To: Jonathan Corbet Cc: Andrew Morton , Bagas Sanjaya , David Hildenbrand , Johannes Weiner , Lorenzo Stoakes , "Matthew Wilcox (Oracle)" , Mel Gorman , Michal Hocko , Mike Rapoport , Vlastimil Babka , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH] docs/mm: Physical Memory: add example of interleaving nodes Date: Sat, 11 Feb 2023 12:22:07 +0200 Message-Id: <20230211102207.1267058-1-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: CD90E140006 X-Rspam-User: X-Stat-Signature: weegms53gupp8zwj989ufh5s9oozctj9 X-HE-Tag: 1676110942-405554 X-HE-Meta: U2FsdGVkX1+ZL0j5Gdk68nv+HsLKsWcxflbzyZesE3ltib/oxKNqQrql2Uo24Pyw6rt/wJ3JjVzq1nu0S2pS2es+Kh+j3gMfntj/p+7F/ohEPIlkykIkZnEtLNBvx0yKMyaSjzJ/T3Mr5ysREre0NpFW0jvpCEPPYjS3u1Bc3uc3POIuvQUejH4Vv+xb6OO8Ylxcp7YWPyWyhcTAtN4ldvoyO3vblPYpUUUT2mQ5RS1gliw6uBqDxCxkJxoqvU9m8U9AR1rCLMWCoHg44No0v9p1fthvpgX52WvB70S+t2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ender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: "Mike Rapoport (IBM)" Add an example of memory layout with interleaving nodes where even memory banks belong to node 0 and odd memory banks belong to node 1 Signed-off-by: Mike Rapoport (IBM) --- As per Michal's request add an example of interleaving nodes. This is based on Jon's docs-next of Wednesday. Documentation/mm/physical_memory.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) base-commit: e076f253283c3e55a128fa9665c0e6cd8146948d diff --git a/Documentation/mm/physical_memory.rst b/Documentation/mm/physical_memory.rst index 3f3c02aa6e6e..eb9a7a6d3216 100644 --- a/Documentation/mm/physical_memory.rst +++ b/Documentation/mm/physical_memory.rst @@ -114,6 +114,25 @@ RAM equally split between two nodes, there will be ``ZONE_DMA32``, | DMA32 | NORMAL | MOVABLE | | NORMAL | MOVABLE | +---------+----------+-----------+ +------------+-------------+ + +Note, that memory banks may belong to interleaving nodes. In the example +below an x86 machine has 16Gbytes or RAM in 4 memory banks, even banks +belong to node 0 and odd banks belong to node 1:: + + + 0 4G 8G 12G 16G + +-------------+ +-------------+ +-------------+ +-------------+ + | node 0 | | node 1 | | node 0 | | node 1 | + +-------------+ +-------------+ +-------------+ +-------------+ + + 0 16M 4G + +-----+-------+ +-------------+ +-------------+ +-------------+ + | DMA | DMA32 | | NORMAL | | NORMAL | | NORMAL | + +-----+-------+ +-------------+ +-------------+ +-------------+ + +In such case node 0 will span from 0 to 12 Gbytes and node 1 will span from +4 Gbytes to 16 Gbytes. + .. _nodes: Nodes