From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A30CC48BCF for ; Wed, 9 Jun 2021 10:56:50 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF1846136D for ; Wed, 9 Jun 2021 10:56:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF1846136D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4G0PDx0TZNz3byq for ; Wed, 9 Jun 2021 20:56:49 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XhbkTzLI; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=T0DFVhrb; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=216.205.24.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=david@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XhbkTzLI; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=T0DFVhrb; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4G0PD80N6Hz3c2M for ; Wed, 9 Jun 2021 20:56:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623236164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1eqcq/7KVFIFfww4JdqqnK/TUbif/qCxlnaAkIZ26tg=; b=XhbkTzLIxP/kCPYbdPkz2lNjcWWrTTwywSkuukPJX/ZGLAYCdC1RPoHuQWS0UbqoDw+MHH zHDpk7smthFA9q0TfeDrDNVCaxlhFEUKjKiwLCRw6HYWaBAwW6ECJIbHwP6wu40yxFzrK1 x3ggkJKDQZ3GflUqR9fny9V7F4193AU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623236165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1eqcq/7KVFIFfww4JdqqnK/TUbif/qCxlnaAkIZ26tg=; b=T0DFVhrbKQFJmoqe6CYQgaTvp7+7IjYx5sgpMvqyqxUmPlOd8QW3fRagvLMX8tyoMCUBCy elFRsWu/qG1IvNMJxxVNAohoqUsQIBPC0SVjbGhwIbJUzqy2FwpAJK+SOA/cFwNk1AZzSn +a7u9D/2sF8/WH0UqAK891oBGl5mMz8= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-UCVrHiqpM9-c7ChZzrvX-A-1; Wed, 09 Jun 2021 06:56:03 -0400 X-MC-Unique: UCVrHiqpM9-c7ChZzrvX-A-1 Received: by mail-wr1-f69.google.com with SMTP id n2-20020adfb7420000b029010e47b59f31so10511440wre.9 for ; Wed, 09 Jun 2021 03:56:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=1eqcq/7KVFIFfww4JdqqnK/TUbif/qCxlnaAkIZ26tg=; b=ETb5xOIUlF2Fglw+Df/1PL7sMhUT3Qg6kbvuxJvVugCAHDICKRDZEqrXNWmvqAGqQe m2mtBW7yEPXzbiVFos2qCEQWenDsuLS/jTAtY17+rmIjzv362e4yqsMjtAMP23bLLX2m jl3zAAij2WFITWGKHc7w4dyymVP57sNsKRig1g4JhAPM32z/Z8EA67X0BUNx4A7etGI/ tRYTf6EI0lk4tWAemOXegCAAQmIKJzaYywsJIGn2qT9aoMG13sN+VyJ3ynjgIEBX+cKk NfHjBM/jCzzNubyktrPh1EFsSbnHkMk+n3zXHhFIcgv5Nxc0S8u06S9g/X++QsvJh95K +1PQ== X-Gm-Message-State: AOAM532zve5M6rTg5UZRVl/sT1JrcRuK1qBRTKj9vcDLbnmX5qpXr9/9 w2yZlKUmmjgfxOQ5W4/3GAXJ7g0aCLh0q8F6/2R/VNJg+ynY5Y+MlYaKOJ1p9nRC0cTisKXpxro YrnaatgfUa9V5zplL4CMidEXJCA== X-Received: by 2002:adf:ee46:: with SMTP id w6mr28365904wro.345.1623236162280; Wed, 09 Jun 2021 03:56:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ49r+tRbGd1wOHU0mXbY7urMjvAihHVmP4oVaZtHRm+k2OFRov+Lj+Vo8CLpAoo+a81y7uQ== X-Received: by 2002:adf:ee46:: with SMTP id w6mr28365871wro.345.1623236162032; Wed, 09 Jun 2021 03:56:02 -0700 (PDT) Received: from [192.168.3.132] (p5b0c611d.dip0.t-ipconnect.de. [91.12.97.29]) by smtp.gmail.com with ESMTPSA id a4sm21295711wme.45.2021.06.09.03.56.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 03:56:01 -0700 (PDT) Subject: Re: [PATCH 7/9] docs: remove description of DISCONTIGMEM To: Mike Rapoport , Andrew Morton References: <20210602105348.13387-1-rppt@kernel.org> <20210602105348.13387-8-rppt@kernel.org> From: David Hildenbrand Organization: Red Hat Message-ID: <6b92d273-dd0b-d67f-c2f6-cce13a33afd1@redhat.com> Date: Wed, 9 Jun 2021 12:56:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602105348.13387-8-rppt@kernel.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Mike Rapoport , Geert Uytterhoeven , Matt Turner , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Arnd Bergmann , linux-m68k@lists.linux-m68k.org, Ivan Kokshaysky , linux-arm-kernel@lists.infradead.org, Richard Henderson , Vineet Gupta , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 02.06.21 12:53, Mike Rapoport wrote: > From: Mike Rapoport > > Remove description of DISCONTIGMEM from the "Memory Models" document and > update VM sysctl description so that it won't mention DISCONIGMEM. > > Signed-off-by: Mike Rapoport > --- > Documentation/admin-guide/sysctl/vm.rst | 12 +++---- > Documentation/vm/memory-model.rst | 45 ++----------------------- > 2 files changed, 8 insertions(+), 49 deletions(-) > > diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-guide/sysctl/vm.rst > index 586cd4b86428..ddbd71d592e0 100644 > --- a/Documentation/admin-guide/sysctl/vm.rst > +++ b/Documentation/admin-guide/sysctl/vm.rst > @@ -936,12 +936,12 @@ allocations, THP and hugetlbfs pages. > > To make it sensible with respect to the watermark_scale_factor > parameter, the unit is in fractions of 10,000. The default value of > -15,000 on !DISCONTIGMEM configurations means that up to 150% of the high > -watermark will be reclaimed in the event of a pageblock being mixed due > -to fragmentation. The level of reclaim is determined by the number of > -fragmentation events that occurred in the recent past. If this value is > -smaller than a pageblock then a pageblocks worth of pages will be reclaimed > -(e.g. 2MB on 64-bit x86). A boost factor of 0 will disable the feature. > +15,000 means that up to 150% of the high watermark will be reclaimed in the > +event of a pageblock being mixed due to fragmentation. The level of reclaim > +is determined by the number of fragmentation events that occurred in the > +recent past. If this value is smaller than a pageblock then a pageblocks > +worth of pages will be reclaimed (e.g. 2MB on 64-bit x86). A boost factor > +of 0 will disable the feature. > > > watermark_scale_factor > diff --git a/Documentation/vm/memory-model.rst b/Documentation/vm/memory-model.rst > index ce398a7dc6cd..30e8fbed6914 100644 > --- a/Documentation/vm/memory-model.rst > +++ b/Documentation/vm/memory-model.rst > @@ -14,15 +14,11 @@ for the CPU. Then there could be several contiguous ranges at > completely distinct addresses. And, don't forget about NUMA, where > different memory banks are attached to different CPUs. > > -Linux abstracts this diversity using one of the three memory models: > -FLATMEM, DISCONTIGMEM and SPARSEMEM. Each architecture defines what > +Linux abstracts this diversity using one of the two memory models: > +FLATMEM and SPARSEMEM. Each architecture defines what > memory models it supports, what the default memory model is and > whether it is possible to manually override that default. > > -.. note:: > - At time of this writing, DISCONTIGMEM is considered deprecated, > - although it is still in use by several architectures. > - > All the memory models track the status of physical page frames using > struct page arranged in one or more arrays. > > @@ -63,43 +59,6 @@ straightforward: `PFN - ARCH_PFN_OFFSET` is an index to the > The `ARCH_PFN_OFFSET` defines the first page frame number for > systems with physical memory starting at address different from 0. > > -DISCONTIGMEM > -============ > - > -The DISCONTIGMEM model treats the physical memory as a collection of > -`nodes` similarly to how Linux NUMA support does. For each node Linux > -constructs an independent memory management subsystem represented by > -`struct pglist_data` (or `pg_data_t` for short). Among other > -things, `pg_data_t` holds the `node_mem_map` array that maps > -physical pages belonging to that node. The `node_start_pfn` field of > -`pg_data_t` is the number of the first page frame belonging to that > -node. > - > -The architecture setup code should call :c:func:`free_area_init_node` for > -each node in the system to initialize the `pg_data_t` object and its > -`node_mem_map`. > - > -Every `node_mem_map` behaves exactly as FLATMEM's `mem_map` - > -every physical page frame in a node has a `struct page` entry in the > -`node_mem_map` array. When DISCONTIGMEM is enabled, a portion of the > -`flags` field of the `struct page` encodes the node number of the > -node hosting that page. > - > -The conversion between a PFN and the `struct page` in the > -DISCONTIGMEM model became slightly more complex as it has to determine > -which node hosts the physical page and which `pg_data_t` object > -holds the `struct page`. > - > -Architectures that support DISCONTIGMEM provide :c:func:`pfn_to_nid` > -to convert PFN to the node number. The opposite conversion helper > -:c:func:`page_to_nid` is generic as it uses the node number encoded in > -page->flags. > - > -Once the node number is known, the PFN can be used to index > -appropriate `node_mem_map` array to access the `struct page` and > -the offset of the `struct page` from the `node_mem_map` plus > -`node_start_pfn` is the PFN of that page. > - > SPARSEMEM > ========= > > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb