lkml.org 
[lkml]   [2023]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/1] docs/mm: Physical Memory: ad d structure, introduction and nodes description


On January 24, 2023 12:16:20 PM GMT+01:00, Mike Rapoport <rppt@kernel.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@kernel.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@gmail.com>
>> > Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com>
>> > Acked-by: Michal Hocko <mhocko@suse.com>
>> > Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
>>
>> Acked-by: Vlastimil Babka <vbabka@suse.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?

\
 
 \ /
  Last update: 2023-03-26 23:54    [W:0.044 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site