From patchwork Sun Feb 12 09:54:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 55891 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1842949wrn; Sun, 12 Feb 2023 02:07:59 -0800 (PST) X-Google-Smtp-Source: AK7set+37Pn5W3DWR9mgAiIftX1iO1ky06o+K3WGZRjtzPpSGQCFoULbBK5pFJ9wbDHr05XwMkgw X-Received: by 2002:a17:902:e205:b0:199:1cc9:fcf4 with SMTP id u5-20020a170902e20500b001991cc9fcf4mr17001988plb.21.1676196478744; Sun, 12 Feb 2023 02:07:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676196478; cv=none; d=google.com; s=arc-20160816; b=tmQWpijV8p1ztdPIQPle/+C3B5D5Zp7YsQyN8dl29PYRLGbfqLFaNEQoB97WLuZhPG 0qhXagOFkrWWaYjZdmb0a8UVPrhYQOxG5Oyj7sj1fYb+bt1Rp/AQjXPkAaP7gEjEOBPb DGU9xa+SMnlXa1KvrvzYQ7VqS/uXwbpG/D6MNnc1eYLJmYRenE/s2VGlzfAPqO+TYPYu Tjwxhh/mvnVhs52Ib+M/qjk0yEPccXBJVA6wc3uaJl/5WJbYNs29r45UdiT7f1fhgxLP gAHqtcwWxp8hQDHqWpfN1bQstSsI6c057uYGHsIXufW942J39//B3ZTd1VUd1qDxy7mV cOeg== 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=NxA1gE8b+DIt8PQRbZReORiqYIK7LUJqD00ZKfLfwN4=; b=NIketCo+nbXnGhvb3vVrAQ5wcg6wn2D7Zf+Egs1GKGoLV0yhdWgRNkVXQyJtNto2FW yZP0UFu7r30FHDX3KWWu3CDRyYMv/KOGj2MdtRLZaFmyDUoXer7fCH3U8Ap0A0Uq9ge/ ocAZexWZJwn4NfG1jKJG0xvf+t3yu+NcJeG0iAF5izYA7Ul/wsTT8lgq/BU54t1EESRX Xn1DUym4WPxI8W5/EokA8SZ/5XxJQKryd7KoXmruiALc8ed533Yq2KNmYGAZ/rLUz9Y7 iQmuB/UiDSJzsnyy879RAlaZHWKnaYG9k4YrPR0ZUGr6zAQHuFGcbUTeYDwkC01lGm9x kQsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dfK5ZC7v; 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 b6-20020a170902bd4600b001967d895ce0si8209502plx.213.2023.02.12.02.07.46; Sun, 12 Feb 2023 02:07:58 -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=dfK5ZC7v; 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 S229574AbjBLJzC (ORCPT + 99 others); Sun, 12 Feb 2023 04:55:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjBLJzB (ORCPT ); Sun, 12 Feb 2023 04:55:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFEB51024C; Sun, 12 Feb 2023 01:55:00 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E47D960B50; Sun, 12 Feb 2023 09:54:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78F95C433EF; Sun, 12 Feb 2023 09:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676195699; bh=VlJr4rZihpfcfqoU6zpWd33xnk4loe0lCeIMnSn8rvo=; h=From:To:Cc:Subject:Date:From; b=dfK5ZC7vMkNsPz+v77KRRdJ8E6ysa55bt2yVD1d5zP6J+QtDRXt47k6f59+HOUZKR fxKr3niqZzYzXQSByxqo6K7jnMJWyMbWVd0woLXmQdUIhXu6r5zmWadN1NOpNAr2P9 //5+wYaMMGHca8Hdsp717dUj/VnKnDd4wWBw1mtMSfVxPHwyQFdbKkPLVJeDextKO1 Cvb0tfqYmcFPuLgAIrgeWkN9wvdXaKRE9mwvTl6hPhqOpOUW8YoVKqETtp6qoaFv5+ uypxIUhJ1SnMK9xmRqtfmZ1S+a1vkQ5SJyc1PwlEycLTM1bwRfKkpYQzz3wbPQ9Jcg rn+N4y2MZ0tNA== 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 v2] docs/mm: Physical Memory: add example of interleaving nodes Date: Sun, 12 Feb 2023 11:54:45 +0200 Message-Id: <20230212095445.1311627-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?1757619398796835182?= X-GMAIL-MSGID: =?utf-8?q?1757619398796835182?= 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) --- v2: * 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..d14b785fd938 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 to 16 Gbytes. + .. _nodes: Nodes