From patchwork Mon Feb 13 15:44:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13138619 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 BAF6CC6379F for ; Mon, 13 Feb 2023 15:45:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4227F6B0072; Mon, 13 Feb 2023 10:45:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D2B4280001; Mon, 13 Feb 2023 10:45:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 29B216B0075; Mon, 13 Feb 2023 10:45:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 1944B6B0072 for ; Mon, 13 Feb 2023 10:45:05 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id DFADA806B3 for ; Mon, 13 Feb 2023 15:45:04 +0000 (UTC) X-FDA: 80462692128.06.1EF1B2F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id 0D742140015 for ; Mon, 13 Feb 2023 15:45:02 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oYFoV1C5; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676303103; 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=3yfmU7w5WnXxIdKc8qwF5EZ6QHfPvsINd0zcYQdkJRk=; b=Z78M3tUyXla6YXz0j+5yA9c8O28glRYvOSOqEzg9/cTCxUXAoW/3zwOTWbisbZkW9aw1z+ LiWdhl0arFSgtFtXQXIx6xXOarciFvma3Zpza1/ZlBn2LtsHMDypWrfj7ANfKLSynQEXFk 7aMxDhNdswh7n2GHTGoG8II3UJyv/eI= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oYFoV1C5; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676303103; a=rsa-sha256; cv=none; b=jcRXoKncaA58Isxbd3u7bWOn/w4aGDzlHi3MFW5a7SSMbhnZN0NmFmfDNO9gmlkQAC/Mxf jTgHpaVvlfkI719sqDIwGT6/kB3oPWL/52c3xUx1ZxhcqdvKAEtpn6q1U1RCqicDuU/XQX I3hYIQ836h2UDR+CkzeBe7FN2EN1a+o= 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 0866C6119B; Mon, 13 Feb 2023 15:45:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B4F9C433EF; Mon, 13 Feb 2023 15:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676303101; bh=3TCnaksRiCFT0Z0YvJMH4En9wOOliKkX6mIfVxch1/U=; h=From:To:Cc:Subject:Date:From; b=oYFoV1C5N4+99kOQgjte+Mu1C4C1loYygKcOeGLooD+7IDAvMRWOffEe4OTZYtGYX PzZnFN6/AMPLYvxYrnkkazkkqLSskGo7Xl0mSO1FNKJBPdlUiTRfGSVf3v+nWoOtk6 U8Oxds2TR89PHDtjOqGDuNyYVD0oQmmEAHBlRT9NdcEIePxQgazWKnu8H2qZSODwKp qFYxSU8p3IXWX1Jok49Y+3glLsUuIunphcHLOe1nGWgJn9d3bhCQcmrf1SWhHIV1tw sqW5rA9NWOHKgiKYunURqRH8yq0cCpQ7ryVTEQAxzekI3XXNKXQilk2Tqb+SkUtbvG IwoAiICoybG2g== 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 v3] docs/mm: Physical Memory: add example of interleaving nodes Date: Mon, 13 Feb 2023 17:44:47 +0200 Message-Id: <20230213154447.1631847-1-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 0D742140015 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: qizwegpgqk999nq6trn47pjdkbasknd3 X-HE-Tag: 1676303102-493694 X-HE-Meta: U2FsdGVkX19MOuIpBRilKykPSotpqouDMUnegmQUmHphZfIapevXW+1Zva4/uWfDnORTBnrrLOPmRsXBTF9pK8M1TR4Ly3HommeU6uQcs7i8QXEZKAWMRtcRzr2yRjo2Av+cm/Y/4YMe7Q82DlvvVgeeuRIructMjJ08oZ6SVqhgtDfmIVnaOD7hYJUt8NP98umppVO6Jir6euioN+1FD2gYTXMqJkikwkGlNJ8YnK90LAeT9dfqcvsG7LTRCe8MyRSxHP4GzR7DInGFqPEUZpg7GeEegAhfWDYx/HWOU8mU+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amicity=0.000000, version=1.2.4 Sender: 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 Suggested-by: Michal Hocko Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand --- v3: * Fix typos and wording (Matthew) v2: https://lore.kernel.org/all/20230212095445.1311627-1-rppt@kernel.org * Wording update (Bagas) * Add forgotten Suggested-by v1: https://lore.kernel.org/all/20230211102207.1267058-1-rppt@kernel.org 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..863ddcd0b291 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 | +---------+----------+-----------+ +------------+-------------+ + +Memory banks may belong to interleaving nodes. In the example below an x86 +machine has 16 Gbytes of 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 this case node 0 will span from 0 to 12 Gbytes and node 1 will span from +4 to 16 Gbytes. + .. _nodes: Nodes