Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4760419rwl; Wed, 28 Dec 2022 08:26:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXsvvva7HyEs3HUsSROFPa/hNwoRvsDc/BfjvC05jhXfB0yyDSUcj7iPimez1aUuhFP9cK5F X-Received: by 2002:a17:90a:1b82:b0:219:70f1:cef with SMTP id w2-20020a17090a1b8200b0021970f10cefmr28157863pjc.46.1672244784069; Wed, 28 Dec 2022 08:26:24 -0800 (PST) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me5-20020a17090b17c500b00218bca92794si18333109pjb.114.2022.12.28.08.26.14; Wed, 28 Dec 2022 08:26:24 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=SJYp7b2k; arc=fail (signature failed); 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233802AbiL1Pa0 (ORCPT + 65 others); Wed, 28 Dec 2022 10:30:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233791AbiL1PaV (ORCPT ); Wed, 28 Dec 2022 10:30:21 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C837D1581B for ; Wed, 28 Dec 2022 07:30:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672241420; x=1703777420; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=ToqJ4x3kb25XM6hJQS4w5aIZ/14eMTiZlFH18JEmhps=; b=SJYp7b2k9eOeNK7x0bprLlkaf6YzXum6FxRdqiRwq3RHhtFUC3M4SxZG rldlOo+7/TJ3L32AZjS+rEyijVZn4lxnKxK+4nt29/piH4QzrZ2zS1ROq as83j0cHpBvxKNenmhhOhEEotHAWFh8Z6mq8BZJPkTFEwssuScB8qDSl4 aKIxlkbX2MXUF8WDB1njTPU/Vc6974nPOBN1OyIf3rMuQadTSBrvegxPk AiVNE/WaIts8IF/QVHUqM6lP0ckpa574ZfOndes+YbzM4dur9It0Pwxm6 UtOQrd0g3MW5ChV+khlzBGuOFFKgKaHu2/wpOK2AadndFLuHT9ptrxCNo Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10574"; a="407153503" X-IronPort-AV: E=Sophos;i="5.96,281,1665471600"; d="scan'208";a="407153503" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2022 07:30:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10574"; a="777458395" X-IronPort-AV: E=Sophos;i="5.96,281,1665471600"; d="scan'208";a="777458395" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga004.jf.intel.com with ESMTP; 28 Dec 2022 07:30:19 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 28 Dec 2022 07:30:18 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Wed, 28 Dec 2022 07:30:18 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 28 Dec 2022 07:30:16 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=juFCgv+PHpYar1phrHtTBzFiBgantB8DRoBU65nmBm4wIcyS4X5LQqi+llzQXwulKRuF/59FIWY0BMHQoaPtiTEIySNHUyCn3qXP3b8QB2K97ypxH0P9Qn3prgrZ7w+Z3L2+JQ4YvAQ5GcEW3NIioK/zXB1IBTjrdX9rVdbMJm1vAFZUGEahVX2bVDuGNqt/5ZcNfLK/6cfzL1IHLnzY8wKAirfTCuOo8+MqNdtS2jfqs8dAS5t3fhpB8mOYFlIC+ZHcyGPmi6QDRPkabmNo2klTG8QpSjExBzKdbHwIXG7l7ikgJSsS0G0TpLFyxTEnf/7Sm3389RfotoRdSnBg/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yCnuPzags8wSFvdDopjzAsAVekSXk6NtpW1N1EsPwMY=; b=HmtZg/Gas0JFrlyRXhia5ICTb336R+cJB0aTZ5QjAm9ey4hsBq5Pr11Y8g1c+a54UkWJs2UV5dbsf5M1C27WgvTTzyg6nxbKuy8UWCaQz2v0ayMK8EUJuV7L2c9KrA9NM1CQYyLtk42LKTfcrrtF6ATEqp7WIxbOyta4SzoU7xZZZMZW3CiBoE24mMTEzzVzqqsRtL9pw8MKrPBOqoG6kNsicqDBkt6dNaJkD/7gWwu4nl/przCe6HX155X+tOXQJlOSxTUK7HXXGXFmtDQAu3D5ZLsbl+7P10DfyMMTvtkVz22kX5cfC511vff06GUUypI79Odl5meRbNSQoH5Y2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MN0PR11MB6206.namprd11.prod.outlook.com (2603:10b6:208:3c6::8) by DS0PR11MB7879.namprd11.prod.outlook.com (2603:10b6:8:f7::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.16; Wed, 28 Dec 2022 15:30:15 +0000 Received: from MN0PR11MB6206.namprd11.prod.outlook.com ([fe80::11d0:8d26:91be:68b2]) by MN0PR11MB6206.namprd11.prod.outlook.com ([fe80::11d0:8d26:91be:68b2%3]) with mapi id 15.20.5944.015; Wed, 28 Dec 2022 15:30:15 +0000 Date: Wed, 28 Dec 2022 23:29:52 +0800 From: Chen Yu To: Ricardo Neri CC: Valentin Schneider , "Peter Zijlstra (Intel)" , Juri Lelli , Vincent Guittot , Ricardo Neri , "Ravi V. Shankar" , Ben Segall , "Daniel Bristot de Oliveira" , Dietmar Eggemann , Len Brown , Mel Gorman , "Rafael J. Wysocki" , "Srinivas Pandruvada" , Steven Rostedt , Tim Chen , , , "Tim C . Chen" Subject: Re: [PATCH v2 4/7] sched/fair: Introduce sched_smt_siblings_idle() Message-ID: References: <20221122203532.15013-1-ricardo.neri-calderon@linux.intel.com> <20221122203532.15013-5-ricardo.neri-calderon@linux.intel.com> <20221224052850.GA8245@ranerica-svr.sc.intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20221224052850.GA8245@ranerica-svr.sc.intel.com> X-ClientProxiedBy: SG3P274CA0005.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::17) To MN0PR11MB6206.namprd11.prod.outlook.com (2603:10b6:208:3c6::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR11MB6206:EE_|DS0PR11MB7879:EE_ X-MS-Office365-Filtering-Correlation-Id: f8e46774-600f-406f-641a-08dae8e86ac2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Z9xdgYZkdehiOL5WwlzkoYsOKd7f+ctKJFas/dsHOXlgBGMLfQw0V8oD6suc1EsCEIlxEHHUIFvRCUWhT7IJmO0cPy15GtXoIkEfRm6bisBU5a/tjiTzyKEzs2wjxFVOWhsj/+KLcd1AH29472eFVR5B+mEhAKq6OiEV5MvcE2wJQdBC7RKO9hZYTgVs3aytsST+k0E99oa1D+8vLv5LbjImLPz3Vzc6WywIP0s1jH2rdaRE2G5s2B0dDguz9PZ5ryG6quU1QyxyBl70XG/414YVcuscZZcuskfs2kfI3O5BWldLqsniOXDUh5yOSuAJKQPC6Un25LUyDXweTc9cyVGEeHtr1ZmxB2eKm4hrNXP6h7kf59UKgVlf9ovcbJ3STS5P1GF/itKT6Qj1ypBt0C2nVj12IX+SFSiQrc1fLmgCTQ5xTQIzuBG1ZUCp/ORwAsJxwSr6kFCoGnhyvlOf5wfSgj75to/SUsbn9H1rTJeSyhKb0dBzbtw8MwlIic60DbJa2EYkegOg5Zd8kTukmbojH0cOa2hTmgBUqtFdvwdN57KWsC2aln4XaSNh+Ju5Nf/SDj1vsz/Kz/B1kgaP4Ot2OtTtiClWenrAvCFidu1XWknWnRChA+kxjkv/1+qwxZB51c5y8SAv6C+jI3SWg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR11MB6206.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(7916004)(396003)(346002)(136003)(376002)(366004)(39860400002)(451199015)(6486002)(478600001)(86362001)(6512007)(26005)(186003)(9686003)(53546011)(6506007)(38100700002)(41300700001)(6666004)(82960400001)(5660300002)(7416002)(4326008)(8676002)(66946007)(66476007)(66556008)(33716001)(4744005)(8936002)(2906002)(4001150100001)(6916009)(54906003)(316002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Z4uwRt69tVuljPiB/27uXXnimDEmuRLSNtNqeb9Kn/szgAFaLooVY+OCu8rS?= =?us-ascii?Q?Wib4kjnn9t3qc+yELiC6yY5TeQPehaHGUr6WLSAjjqRtSnsmEc+e2PCfiYT9?= =?us-ascii?Q?KrkYisPAFef/cfTLOzCsEb4g4/WGCSCGahX69TTCnG7I/YckBk473BH7zVZo?= =?us-ascii?Q?8rSHIzOfFnAwAbqkT+XF48fTrZRI2rGi8zs7NWXCEiN02krGzf5PyO9BUWy8?= =?us-ascii?Q?mVqlHPwWabIUfvzOwjJRjCHAl2ADrEynd/hxX2QRAKJbAzeQbNwAj29dhadH?= =?us-ascii?Q?fHcjdCxB9ZI93rEGhkRk6AU6V9J3Jde4VZ6B/dgG+NwJq02yDFOXQLpLnh+h?= =?us-ascii?Q?7bqKmoFfcTzginSQV38SiKL3TlXA+O4CNHHu8HtZRq5FcmPXxddtp3ero05+?= =?us-ascii?Q?0EtAwHqIvnY6r3bNKucKW3/LVncHZ0x4oE6c1NWRnYuJtv2TumtA3utIngve?= =?us-ascii?Q?2WeLf+qpUOwXIPpgmByqDpNDtmfmO04612R+8I9vowQG6Pay/bcZjsCd9IYx?= =?us-ascii?Q?wh5d2GYIBWhcN2gQScYwnCzG51DHDjDI64NoDfxiQcnaI5o2PSSjJEjJOktf?= =?us-ascii?Q?xYWApwF4CO90CbFjybmjsgKNUVtqZl3jNkQOvUvkqlM65OIpo7gPu1Py6ohH?= =?us-ascii?Q?4i3iykCVeqZqtQMD+7QO4kzOisStlqb0hErnJN5iKPUgUpdKmqn1eyx4HKeQ?=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yEtF5JtGmbGyQ9?= X-MS-Exchange-CrossTenant-Network-Message-Id: f8e46774-600f-406f-641a-08dae8e86ac2 X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6206.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2022 15:30:15.0183 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +U+vUw8oBu2sO425Dj/lW8vsC7b1bwf8Y5Bvyhg9WKOq9ui8RGkL8DK/CcpPb1TFb8T4KN6mMwJS4QKXynPQzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7879 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 2022-12-23 at 21:28:50 -0800, Ricardo Neri wrote: > On Thu, Dec 22, 2022 at 04:56:22PM +0000, Valentin Schneider wrote: > > On 22/11/22 12:35, Ricardo Neri wrote: > > > Architectures that implement arch_asym_cpu_priority() may need to know the > > > idle state of the SMT siblings of a CPU. The scheduler has this information > > > and functionality. Expose it. > > > > > > Move the existing functionality outside of the NUMA code. > > > > > > > test_idle_cores() does something similar without an iteration, did you > > consider using that instead? > > IIUC, test_idle_cores() returns true if there is at least one idle core in > the package. In my case, I need to know the idle state of only the SMT > siblings of a specific CPU. Am I missing something? > I guess a similar one is select_idle_core(), but it also consider the CPU with SCHED_IDLE task as idle. Is CPU with SCHED_IDLE task a candidate in your scenario? thanks, Chenyu > Thanks and BR, > Ricardo