Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1992559rwd; Tue, 13 Jun 2023 18:06:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4L6iDj6Ba84L5zopyzUlEtcdFroJ9wcDx1V8w/RWvRMRx8hiue8TmiAP94FYKEf8Cb42L/ X-Received: by 2002:a05:6808:995:b0:398:1197:bbfb with SMTP id a21-20020a056808099500b003981197bbfbmr8064351oic.55.1686704761605; Tue, 13 Jun 2023 18:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686704761; cv=none; d=google.com; s=arc-20160816; b=dYkkH90hLAw3KNMVRDCqLx7oSvT/540Wmo1uRz2injRTDy+CcIAkw1sSnscOPIQs8j DyLqJPkPNx7JmjUICHrkjS6YwtMiQ3kt5PFW9lZyda3N9eG261LG/endmIAnmKz3t3bu E6ysZroPl6ipkrvUzu+mvLNjy2V2gaCuh4LzmiGlT1Ic+kpovQoMWhxQ3TV+uoKegNK5 afPvplSN3eOpzAnvYODRgcZKgFetzhsl+g0pX33YJcp8/CsFUHHL814qcJw5V+mMosEX DjrqEt7mlHkVaJezXYKLB22Y9w4hLjhEPoSBPWVnK2ebUqnzFLqloztfMfn9eTBThJQ5 /vrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Vo6kzlgTXaumdeezqrtI269Dr8w+eKp8gH1OsAhzpJ8=; b=xO0N/xS5swE/1hsEssYwi7plpPD7CTlOzkqDyvIRRpuAH2NqPQ8+tsuYfw8K7X/2yu Zqve62p3v0YGLH3AAnIltRy3MNXwx3AN97gl4XmZnD99VagmfbILlNfHYYARE/VTsGtz +KSCwYzvUfqiWpQ4EKx+LMEyy4Dw3bPPd61BEvcOZNo301ia150AIJFTfeiDskmvCGCV LSO7yv95te1XF2RGKPGa1P0eOn0v10UkCCC1+aQ8z4/b8enfT0+YYZ+immOGq1uv825w aLLCZSbcmSVykjBGQE3Sw+djK4H3Fqe3Q7kK7wcZCv3c1gjryAtGb3C67tmjw13PJOMu 9rTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="hImMA3Y/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi18-20020a17090b4b5200b0024e35ef410fsi10542693pjb.131.2023.06.13.18.05.43; Tue, 13 Jun 2023 18:06:01 -0700 (PDT) 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="hImMA3Y/"; 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 S241230AbjFNA0W (ORCPT + 99 others); Tue, 13 Jun 2023 20:26:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230496AbjFNA0U (ORCPT ); Tue, 13 Jun 2023 20:26:20 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9966E172A; Tue, 13 Jun 2023 17:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686702379; x=1718238379; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=b7UDhenxOy+WQBPj33/WSkU/4Hiv+kSwOlsYlkmSy7I=; b=hImMA3Y/teTwWYIz1ZOe5TG4ATkRAh7qPmDB2vrRGf8yI5eMwcTBWBDZ nFnLcWrdYJl/Vxqg4a4I85grHzLoziBfZ6a9Wi9jDgbsCmutm4PXiehDg aUvV0dSq43kLeS3FdjGV05bjAp6C0QJNWBG8L9kJj+4JaLvaQg97sHZ3f OtxFNu3cRVMjVDaYR9IE2aK6yu+RCuv2Ds5v0Lt+Y8dM1RfJloH2W+dvl 8DxyxWRxCLqXFofwB/DtVhENrNGHnOKBRzby3CqUv4ZzOygmLPj2N6g2V EG4lsRYpwlfjGaSICBzuTcDq0OBAtMXXU2Of5UKC+qJ5zjAEJYlWba1aA g==; X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="348139934" X-IronPort-AV: E=Sophos;i="6.00,241,1681196400"; d="scan'208";a="348139934" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 17:26:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="958603898" X-IronPort-AV: E=Sophos;i="6.00,241,1681196400"; d="scan'208";a="958603898" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga006.fm.intel.com with ESMTP; 13 Jun 2023 17:26:17 -0700 Date: Tue, 13 Jun 2023 17:29:08 -0700 From: Ricardo Neri To: "Peter Zijlstra (Intel)" , Juri Lelli , Vincent Guittot Cc: 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 , Valentin Schneider , Lukasz Luba , Ionela Voinescu , Zhao Liu , "Yuan, Perry" , x86@kernel.org, "Joel Fernandes (Google)" , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, "Tim C . Chen" , Zhao Liu Subject: Re: [PATCH v4 06/24] sched/fair: Collect load-balancing stats for IPC classes Message-ID: <20230614002908.GA7443@ranerica-svr.sc.intel.com> References: <20230613042422.5344-1-ricardo.neri-calderon@linux.intel.com> <20230613042422.5344-7-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230613042422.5344-7-ricardo.neri-calderon@linux.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Mon, Jun 12, 2023 at 09:24:04PM -0700, Ricardo Neri wrote: > +static int rq_last_task_ipcc(int dst_cpu, struct rq *rq, unsigned short *ipcc) > +{ > + struct list_head *tasks = &rq->cfs_tasks; > + struct task_struct *p; > + struct rq_flags rf; > + int ret = -EINVAL; > + > + rq_lock_irqsave(rq, &rf); > + if (list_empty(tasks)) > + goto out; > + > + p = list_last_entry(tasks, struct task_struct, se.group_node); > + if (p->flags & PF_EXITING || is_idle_task(p) || > + !cpumask_test_cpu(dst_cpu, p->cpus_ptr)) > + goto out; > + > + ret = 0; > + *ipcc = p->ipcc; > +out: > + rq_unlock(rq, &rf); This should be rq_unlock_irqrestore(). I will correct it in the next version.