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: 55773 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1431910wrn; Sat, 11 Feb 2023 02:36:37 -0800 (PST) X-Google-Smtp-Source: AK7set+bgUSBnAofBwknZJrwW3MS8/xvkm6ealA9x1wS3uUJSeGTwyjC2vCUzXERrpHXBibxFHdh X-Received: by 2002:aa7:9ad5:0:b0:5a8:2008:d1eb with SMTP id x21-20020aa79ad5000000b005a82008d1ebmr12201989pfp.17.1676111797651; Sat, 11 Feb 2023 02:36:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676111797; cv=none; d=google.com; s=arc-20160816; b=LVbeoKLE6qvO1XZs11iM9vdnMi7nP7fomVcZmBCv2GngBwCWVeMAALM30Gf8MHDXl5 gyVfKox5X4jGSiMTb+SEhTK8S6gyIJ+2BGtMqswUNEXv4OU71FPTzfStgnH2rA5s4+q9 gdpp2ifvHgJZo2u4ZtFEHzIvXdOu2zga7BpJEHzj81p7hwhWF8dSTjJjD8i0jBYve76T RTA6JsbZhlSl6//HwnqLyxZaERsp7UFY8fmBBLevI3IAfvkxmMBy7fJI3slh8sQbNDRA M7UDtKIJx3wzbuM0LBEkecm1wv3xBhA63BokFZc7Vnz0ak9m6KaOx+pTyChC6F063GRC 2sXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HF39A+tlb3giJP3Fl+XJMt8aBay6Hmbn4tNnffJbMGY=; b=VOL7C1XWQTYw94huCmm4407UTxWrIYb1DWnbtKevZRnhxSJO6PHZ5FKh7bS5L27jZK GO8cHxK0+nlc4Lpe265AH18ZcpLzUAZ24o0yqJJ43E4eqNx6VCbobty4VDlzU5BYjbTy 2BVIWEN0jc05xyowjl+BoOsDNhiGB4mcZRJvkpyXf5j2TkzUyvY1LuE3ryAH1OokyaVZ adDdBcqOy40CuE5HG77ea/46D+Wz8ChHRJPR6EuH/6GtkDamxBxPuv+B/TnpzwWQabZ8 k4FuIiGId1LjCPMI0/MHMjwe3kwje9pNg/rBpwvrnqcskd7GplcutP4zC4N/80XL2fmn GLDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WM04XY0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s68-20020a625e47000000b005a86c304ae3si3830153pfb.270.2023.02.11.02.36.24; Sat, 11 Feb 2023 02:36:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WM04XY0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229448AbjBKKW0 (ORCPT + 99 others); Sat, 11 Feb 2023 05:22:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbjBKKWY (ORCPT ); Sat, 11 Feb 2023 05:22:24 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D76093C7AC; Sat, 11 Feb 2023 02:22:23 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 88877B80C9D; Sat, 11 Feb 2023 10:22:22 +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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757530604284079647?= X-GMAIL-MSGID: =?utf-8?q?1757530604284079647?= 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