Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BED2C38142 for ; Tue, 24 Jan 2023 13:41:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233542AbjAXNlC (ORCPT ); Tue, 24 Jan 2023 08:41:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbjAXNlA (ORCPT ); Tue, 24 Jan 2023 08:41:00 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76DC31BE5; Tue, 24 Jan 2023 05:40:59 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2A47E1FDAB; Tue, 24 Jan 2023 13:40:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1674567658; h=from:from:reply-to: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=abri0zFA+xjooP9Ux7FyiMJ1tEcfHRQmA6ycin20OiU=; b=2bZMNHzl2etHCSdbjIvf9JPvQRmje+DRWoIA59q9l0qb3e/pSIkNnMbbogxfeua2Nq4jNN q9sU+KwAAx8V8s143WDCb1EkL7EYCBQyf6QKspa8kd138NZjC1dRhfKltiuLj0mYjaQYOe W29fte9MKLw0VUqbZtITDa13cTbvM7Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1674567658; h=from:from:reply-to: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=abri0zFA+xjooP9Ux7FyiMJ1tEcfHRQmA6ycin20OiU=; b=z42iM2O16v7RZ9l2xP6I7NGba8aNNuxfmNysErxOtpoz7jZfs1W8OgwfHV+g/Swc0HwL38 VZQcFpFxo+JYpcCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E6C9513487; Tue, 24 Jan 2023 13:40:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id m9xBNunfz2NHZwAAMHmgww (envelope-from ); Tue, 24 Jan 2023 13:40:57 +0000 Date: Tue, 24 Jan 2023 14:40:54 +0100 From: Vlastimil Babka To: Mike Rapoport CC: Jonathan Corbet , Andrew Morton , Bagas Sanjaya , David Hildenbrand , Johannes Weiner , Lorenzo Stoakes , "Matthew Wilcox (Oracle)" , Mel Gorman , Michal Hocko , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_v4_1/1=5D_docs/mm=3A_Physical_Memory=3A_ad?= =?US-ASCII?Q?d_structure=2C_introduction_and_nodes_description?= User-Agent: K-9 Mail for Android In-Reply-To: References: <20230115184212.996298-1-rppt@kernel.org> <20230115184212.996298-2-rppt@kernel.org> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On January 24, 2023 12:16:20 PM GMT+01:00, Mike Rapoport 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)" >> >=20 >> > Add structure, introduction and Nodes section to Physical Memory >> > chapter=2E >> >=20 >> > As the new documentation references core-api/dma-api and mm/page_recl= aim, >> > add page labels to those documents=2E >> >=20 >> > Reviewed-by: Bagas Sanjaya >> > Reviewed-by: Lorenzo Stoakes >> > Acked-by: Michal Hocko >> > Signed-off-by: Mike Rapoport (IBM) >>=20 >> Acked-by: Vlastimil Babka >>=20 >> A small bug to fix below? >>=20 >> >>=20 >> > + >> > +Along with the node structures, kernel maintains an array of ``nodem= ask_t`` >> > +bitmasks called ``node_states``=2E Each bitmask in this array repres= ents a set of >> > +nodes with particular properties as defined by ``enum node_states``: >> > + >> > +``N_POSSIBLE`` >> > + The node could become online at some point=2E >> > +``N_ONLINE`` >> > + The node is online=2E >> > +``N_NORMAL_MEMORY`` >> > + The node has regular memory=2E >> > +``N_HIGH_MEMORY`` >> > + The node has regular or high memory=2E When ``CONFIG_HIGHMEM`` is = disabled >> > + aliased to ``N_NORMAL_MEMORY``=2E >>=20 >> Noted=2E >>=20 >> > +``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 correspon= ding to the >> > +node ID in the ``node_states[]`` bitmask is set=2E >> > + >> > +For example, for node 2 with normal memory and CPUs, bit 2 will be s= et in :: >> > + >> > + node_states[N_POSSIBLE] >> > + node_states[N_ONLINE] >> > + node_states[N_NORMAL_MEMORY] >> > + node_states[N_MEMORY] >> > + node_states[N_CPU] >>=20 >> Should it be set also in node_states[N_HIGH_MEMORY]? >=20 >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=2E" Or do I misunde= rstand?