Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp8594rwj; Thu, 22 Dec 2022 04:17:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXv4z2TX2XCEfpzXoTCYGUVv6dlB8gowJaBl4TO6hjZn7uknNPjRz0zwfuXxe2cEGy79OMKs X-Received: by 2002:a17:903:2692:b0:189:feee:4926 with SMTP id jf18-20020a170903269200b00189feee4926mr5759091plb.16.1671711424921; Thu, 22 Dec 2022 04:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671711424; cv=none; d=google.com; s=arc-20160816; b=OVTWVT3jQ6+eK85LRTds/qtKrV6PGgZzvuBImB+k1wynQMT96bCezyo1K72qGD6No6 xVbKK4NRssl2wLVS640aAlQ7tP7ylPygp5iWyibm4ZVfAl9cCC0+N5rAPP2ykyogpfv6 bSU9fjP67hml70mceP5nQzfSoo4iDm7yzVXpaT0CbiptICm6klRXJP/GbC6ZKuW0VhYx pUfyGSMSKIwb/ARtdqLbQydF2ivLqOPusCrlBQxDLyA2A4k0rRsj9m625iapjOnuz6nm Q/Jo/cbxCKNssspPdMDdn7m4wHm7RjUq0IdktIbT9vjuGX2Zb4acODG2sHH2RgdBz1kA yxkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=LzzDHh0e8JeTOGkUsdBzRqOQ15jrrBIiytuGmsjepic=; b=LmQmfLNe2EqdYe8f6actJEzjachWSDKyecGakymNdRUkw0tRgyLU34ELMJ0h5Sx0NI YTP5Za7vdQNk7grgX90P06mGI6Bqjvg/XAHoTQHQEjqru4/ydpikoFtFgZwoQDXCzNU+ dEA6/aaK0LgwiQs/nSt7E4CUtcjfmOpI+zrNkc/mMvVLRvwCz41Jd2Jk4OYJ3lZ8jumg 8L5DsHGzcxnEML72CFpWidquoHwQHMwhjzZNseLYCxJVM5x+a07ckCxQyB+X9tBM83LI i540wf5IVBu87EcmisFA7EoavvxM+JXllqjU2agcXroShq16iYn8uKwP9AiQ4QXF1MWI NVYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e9-20020a170902f10900b001869fd74e0csi330721plb.311.2022.12.22.04.16.56; Thu, 22 Dec 2022 04:17:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235386AbiLVLMn (ORCPT + 67 others); Thu, 22 Dec 2022 06:12:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235364AbiLVLMl (ORCPT ); Thu, 22 Dec 2022 06:12:41 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C9A9C2AC8 for ; Thu, 22 Dec 2022 03:12:39 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A0C49AD7; Thu, 22 Dec 2022 03:13:20 -0800 (PST) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AF1953F71E; Thu, 22 Dec 2022 03:12:36 -0800 (PST) Message-ID: Date: Thu, 22 Dec 2022 12:12:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2 4/7] sched/fair: Introduce sched_smt_siblings_idle() Content-Language: en-US To: Ricardo Neri Cc: "Peter Zijlstra (Intel)" , Juri Lelli , Vincent Guittot , Ricardo Neri , "Ravi V. Shankar" , Ben Segall , Daniel Bristot de Oliveira , Len Brown , Mel Gorman , "Rafael J. Wysocki" , Srinivas Pandruvada , Steven Rostedt , Tim Chen , Valentin Schneider , x86@kernel.org, linux-kernel@vger.kernel.org, "Tim C . Chen" References: <20221122203532.15013-1-ricardo.neri-calderon@linux.intel.com> <20221122203532.15013-5-ricardo.neri-calderon@linux.intel.com> <75ba5884-63c0-5180-00b8-e9764306a83e@arm.com> <20221212175458.GC27353@ranerica-svr.sc.intel.com> From: Dietmar Eggemann In-Reply-To: <20221212175458.GC27353@ranerica-svr.sc.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/12/2022 18:54, Ricardo Neri wrote: > On Tue, Dec 06, 2022 at 07:03:37PM +0100, Dietmar Eggemann wrote: >> On 22/11/2022 21:35, Ricardo Neri wrote: [...] >>> +bool sched_smt_siblings_idle(int cpu) >>> +{ >>> + return is_core_idle(cpu); >>> +} >> >> Nitpick: Can we not just have one exported function for both use-cases: >> NUMA and x86 ITMT? > > By adding a new function I intend to preserve the inlinig of is_core_idle() > in update_numa_stats() (via numa_idle_core(), which is also inline). Do you > think there is no value? OK. It's only used in NUMA balancing (task_numa_fault() -> ... -> update_numa_stats()). I can't see that this will have a noticeable perf impact but only benchmark can really tell. A `static inline bool sched_is_core_idle(int cpu)` via include/linux/sched/topology.h might work? We have similar functions (like sched_core_cookie_match()` but in the private scheduler header file kernel/sched/sched.h though. > A downside of having the new function is that now the code is duplicated > in update_numa_stats() and sched_smt_siblings_idle(). > > I can take your suggestion if losing the inline is OK. I doubt that it will have an impact but can't be sure. [...]