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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 56CD0C4727D for ; Fri, 25 Sep 2020 16:08:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BBCF8235FD for ; Fri, 25 Sep 2020 16:08:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="CRXaAJ/l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BBCF8235FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 39A30900004; Fri, 25 Sep 2020 12:08:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 322BA6B007B; Fri, 25 Sep 2020 12:08:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1EBFA900004; Fri, 25 Sep 2020 12:08:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 02D7B6B0078 for ; Fri, 25 Sep 2020 12:08:27 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C2D96181AC212 for ; Fri, 25 Sep 2020 16:08:27 +0000 (UTC) X-FDA: 77302066254.14.class95_1f106d727169 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id A1F8918229835 for ; Fri, 25 Sep 2020 16:08:27 +0000 (UTC) X-HE-Tag: class95_1f106d727169 X-Filterd-Recvd-Size: 4165 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Fri, 25 Sep 2020 16:08:26 +0000 (UTC) Received: from zn.tnic (p200300ec2f0b3a00329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:3a00:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id C49621EC0284; Fri, 25 Sep 2020 18:08:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1601050104; 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:in-reply-to:in-reply-to: references:references; bh=eqBo++0bLNLcrE7VXscLCEz7howWeoc6lAOi3PzLORk=; b=CRXaAJ/lHqqbjXX2EAfkl4LJ5fcoibyKjIKgvZyIkMi5tDvJcPiYVH4BR4J8TIS5r++kSI 00rKHSFQJ9i1M1sBEDC3bErbdmdbKqII/es2WtrnoNvfYPOrqlRC4gfCkBiBGmH/cM8VKm U8lDy27jIA6cZrQNNLxRAfDl0XzDYQ0= Date: Fri, 25 Sep 2020 18:08:17 +0200 From: Borislav Petkov To: Jonathan Cameron Cc: linux-mm@kvack.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, Lorenzo Pieralisi , rafael@kernel.org, Ingo Molnar , Bjorn Helgaas , linux-kernel@vger.kernel.org, Thomas Gleixner , linuxarm@huawei.com, Dan Williams , Brice Goglin , Sean V Kelley , linux-api@vger.kernel.org, Hanjun Guo Subject: Re: [PATCH v10 2/6] x86: Support Generic Initiator only proximity domains Message-ID: <20200925160817.GJ16872@zn.tnic> References: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> <20200907140307.571932-3-Jonathan.Cameron@huawei.com> <20200923160609.GO28545@zn.tnic> <20200925123226.0000636a@Huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200925123226.0000636a@Huawei.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Sep 25, 2020 at 12:32:26PM +0100, Jonathan Cameron wrote: > I don't think we can. This is doing the same operation as > is done for memoryless cpu nodes in the init_cpu_to_node() call above > so it would make little sense from a code flow point of view, even if > it were possible. However it isn't possible as far as I can see. > > It is called after init_cpu_to_node() because... > * A GI node may also be a CPU node and / or a Memory Node, but we only > have to do anything extra if it has neither of these. > Easiest way to do that is use the same logic init_cpu_to_node() > does and rely on ordering wrt to the other two types of nodes that > have already been handled. We could have could just call it at the > end of init_cpu_to_node() but I'd not be happy doing so without renaming > that function and then we'd end up with a horrible name like > init_cpu_to_node_and_gi() as they are rather different things. > > It needs to happen before use is made of the node_data which is allocated > in init_gi_nodes() / init_memoryless_node() / alloc_node_data() Let's put the gist of this requirement in the comment above init_gi_nodes() for future reference. ... > It might be possible to allocate the zonelists for this special case later > in the boot flow, but it seems like we would be adding a lot of complexity > to avoid a single function call. Nah, probably not worth the hassle. > How about this? > > +/* > + * A node may exist which has one or more Generic Initiators but no > + * CPUs and no memory. > + * When this function is called, any nodes containing either memory > + * and/or CPUs will already be online and there is no need to do > + * anything extra, even if they also contain one or more Generic > + * Initiators. > + */ Yes, along with the above gist. Thx! -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette