lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 25 Jan 2023 20:56:52 +0200
From:   Mike Rapoport <rppt@...nel.org>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     Jonathan Corbet <corbet@....net>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Bagas Sanjaya <bagasdotme@...il.com>,
        David Hildenbrand <david@...hat.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Lorenzo Stoakes <lstoakes@...il.com>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        Mel Gorman <mgorman@...e.de>, Michal Hocko <mhocko@...nel.org>,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH v4 1/1] docs/mm: Physical Memory: add structure,
 introduction and nodes description

On Tue, Jan 24, 2023 at 02:40:54PM +0100, Vlastimil Babka wrote:
> 
> 
> On January 24, 2023 12:16:20 PM GMT+01:00, Mike Rapoport <rppt@...nel.org> wrote:
> >On Tue, Jan 24, 2023 at 12:00:07PM +0100, Vlastimil Babka wrote:
> >> On 1/15/23 19:42, Mike Rapoport wrote:
> >> > From: "Mike Rapoport (IBM)" <rppt@...nel.org>
> >> > 
> >> > Add structure, introduction and Nodes section to Physical Memory
> >> > chapter.
> >> > 
> >> > As the new documentation references core-api/dma-api and mm/page_reclaim,
> >> > add page labels to those documents.
> >> > 
> >> > Reviewed-by: Bagas Sanjaya <bagasdotme@...il.com>
> >> > Reviewed-by: Lorenzo Stoakes <lstoakes@...il.com>
> >> > Acked-by: Michal Hocko <mhocko@...e.com>
> >> > Signed-off-by: Mike Rapoport (IBM) <rppt@...nel.org>
> >> 
> >> Acked-by: Vlastimil Babka <vbabka@...e.cz>
> >> 
> >> A small bug to fix below?
> >> 
> >> <snip>
> >> 
> >> > +
> >> > +Along with the node structures, kernel maintains an array of ``nodemask_t``
> >> > +bitmasks called ``node_states``. Each bitmask in this array represents a set of
> >> > +nodes with particular properties as defined by ``enum node_states``:
> >> > +
> >> > +``N_POSSIBLE``
> >> > +  The node could become online at some point.
> >> > +``N_ONLINE``
> >> > +  The node is online.
> >> > +``N_NORMAL_MEMORY``
> >> > +  The node has regular memory.
> >> > +``N_HIGH_MEMORY``
> >> > +  The node has regular or high memory. When ``CONFIG_HIGHMEM`` is disabled
> >> > +  aliased to ``N_NORMAL_MEMORY``.
> >> 
> >> Noted.
> >> 
> >> > +``N_MEMORY``
> >> > +  The node has memory(regular, high, movable)
> >> > +``N_CPU``
> >> > +  The node has one or more CPUs
> >> > +
> >> > +For each node that has a property described above, the bit corresponding to the
> >> > +node ID in the ``node_states[<property>]`` bitmask is set.
> >> > +
> >> > +For example, for node 2 with normal memory and CPUs, bit 2 will be set in ::
> >> > +
> >> > +  node_states[N_POSSIBLE]
> >> > +  node_states[N_ONLINE]
> >> > +  node_states[N_NORMAL_MEMORY]
> >> > +  node_states[N_MEMORY]
> >> > +  node_states[N_CPU]
> >> 
> >> Should it be set also in node_states[N_HIGH_MEMORY]?
> > 
> >You mean because of the aliasing of N_NORMAL_MEMORY and N_HIGH_MEMORY?
> 
> No I meant due to "The node has regular or high memory." Or do I misunderstand?

I checked the code, node_states[N_HIGH_MEMORY] will be set indeed.
Will send v5 soon.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ