Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp168298pxb; Fri, 17 Sep 2021 22:39:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxYsxGlL8Q+/pkSEHzk8l4yJFNlGrJ5lU4WWcP6IPdqyC0oyb4KUUEDx5Lk8wUbGvIVaGx X-Received: by 2002:aa7:d598:: with SMTP id r24mr16653003edq.285.1631943574673; Fri, 17 Sep 2021 22:39:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631943574; cv=none; d=google.com; s=arc-20160816; b=h2rCVTnvgX8G9h6hTUm3fJFPZeWa6vTihdiUETMBXn0s42OCRya9bD15CYyBpkNw3E E+oDkWKySDgkfwTgSy0Aj0k9hF6rbEljtvzXx9SC80O6gNTWkAfEZ7BxB7F09AjDtcT1 psvyJyS+Uj6aThZEXfiOSLiVVtXSZXWb87QBpizEVsFOFyDpCnfp35KNfD3xuPMhnVEK 43kwU2bYV5fTVeHjeJHzzRaSs3CrARTquTv1qAJ0s1cEb9tbZjqjMMbZmwCdJrS6b04T 4ch6yiN7t/ILKTBd2+fietYmj1ZpquLeyVjzQ7HJWGmMqXNwqGDkZ8yf2rk2Q8nrZsyp Aecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=b3XLvp+C7BZKXW25qtQnmeavwVREq13mF2t8TnFg7h8=; b=Il++iSM5daBY6RdFRjP6Vt3VEyJ7ABKt67GQYC24c/BVmODQ/k1UiEL34n5HFsrVzi LthfJuS/KnAfdzre5fXapphGdgcxGHO0psW+yAGEhSBG3E6sNsRvNIg4t01yg7QN3dGU UONBw6I+sPjhAxMGZ4lefLN9YAqSbbVk6WYqzWsuMsnsBB7jfXzClgzwcDBzcFWf2D9S uP0l1Ai69h37h2ZNNG2oMRP04jsoe5ETFG4BW5TCCjbA+KWAWRxBykcKz+OPsk1zg4RI bPJyBeZ5Ds7vAUkICHFs93iISn/AIcr/93Bw4qMRSeFupti66jQCL1+s6JJihfs5NM8O rudA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ma9ysC6d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e13si12705182edm.248.2021.09.17.22.39.11; Fri, 17 Sep 2021 22:39:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ma9ysC6d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234738AbhIQP2g (ORCPT + 99 others); Fri, 17 Sep 2021 11:28:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233835AbhIQP2d (ORCPT ); Fri, 17 Sep 2021 11:28:33 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C256FC061574 for ; Fri, 17 Sep 2021 08:27:11 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id 72so6833648qkk.7 for ; Fri, 17 Sep 2021 08:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b3XLvp+C7BZKXW25qtQnmeavwVREq13mF2t8TnFg7h8=; b=ma9ysC6dZG9BsfBsHogzoGydNfFrVUn1as1xUYntDMccIRrlY99NeyBPhwHd/PxK8J W69EHqcxgp3u7OemM6zJuAPYq5W+lwHJLdmVR0GemDUBsm01UzXg9R1/2Bl8IOjL2IWl vzfe89aY5HuipfX4n9ZSRCUol7TEreaMJP2kBHfRhgMDfzZSDnXEIo958Wvt/zeknR6/ 9+4vWnBOKIjYmXJLd/CV282S1I8LTMVYoBl1fKyT+YiKUB2sivgvB7Wu9/5nx2KbCS0/ 1HXoDsygGoSUYBALVwdn48h6o7ecIf4Gts3LN+RChZySPk3xzrEJfG+nJT2kEH7JDWKm hGkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b3XLvp+C7BZKXW25qtQnmeavwVREq13mF2t8TnFg7h8=; b=24Ur/Vk62ivhhw3saoNsBHi6ZBJ3OSRM6CtWVV0drkwEIpxmbhbOYt5LLcHHMXuk6+ YynY0I7O3aY7KUJFY+zcVJsXvp6+uXsK5FH5ejb5FLHpz7BBZKmr/qCEjmaecxhcdYvV T/zusA9pyAov/1JcQdDSKqyKGIUriIZOpClrjtHZUcuQsj3ehLZelVc+NZTt/0lvEM56 9X35k46h95rlNjFwFhpVrFBeDQ+W+J4w+aJEtEwURVNJe9BE+XH+ZcsYGL5Nt52VulO7 ePDW7/mRQwbyql70vbKPvSKXaCs4Q25iAlEhj9FIoOSN9j7uI5q0p6GRatBhd6qVpB5G 1Tzw== X-Gm-Message-State: AOAM533UFgBwvGQnyZOvHqj1alYf9dns0bCiUlPKS+t4FJUkHdA8gmsf 83u+DjUMIRAIlIX/8rZBUZM4VZXREOYhIaBufQzD8w== X-Received: by 2002:a5b:142:: with SMTP id c2mr14709743ybp.425.1631892430927; Fri, 17 Sep 2021 08:27:10 -0700 (PDT) MIME-Version: 1.0 References: <20210911011819.12184-1-ricardo.neri-calderon@linux.intel.com> <20210911011819.12184-5-ricardo.neri-calderon@linux.intel.com> In-Reply-To: <20210911011819.12184-5-ricardo.neri-calderon@linux.intel.com> From: Vincent Guittot Date: Fri, 17 Sep 2021 17:27:00 +0200 Message-ID: Subject: Re: [PATCH v5 4/6] sched/fair: Provide update_sg_lb_stats() with sched domain statistics To: Ricardo Neri Cc: "Peter Zijlstra (Intel)" , Ingo Molnar , Juri Lelli , Srikar Dronamraju , Nicholas Piggin , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Len Brown , Srinivas Pandruvada , Tim Chen , Aubrey Li , "Ravi V. Shankar" , Ricardo Neri , Quentin Perret , "Joel Fernandes (Google)" , linuxppc-dev@lists.ozlabs.org, linux-kernel , Aubrey Li , Daniel Bristot de Oliveira , "Rafael J . Wysocki" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 11 Sept 2021 at 03:19, Ricardo Neri wrote: > > Before deciding to pull tasks when using asymmetric packing of tasks, > on some architectures (e.g., x86) it is necessary to know not only the > state of dst_cpu but also of its SMT siblings. The decision to classify > a candidate busiest group as group_asym_packing is done in > update_sg_lb_stats(). Give this function access to the scheduling domain > statistics, which contains the statistics of the local group. > > Cc: Aubrey Li > Cc: Ben Segall > Cc: Daniel Bristot de Oliveira > Cc: Dietmar Eggemann > Cc: Mel Gorman > Cc: Quentin Perret > Cc: Rafael J. Wysocki > Cc: Srinivas Pandruvada > Cc: Steven Rostedt > Cc: Tim Chen > Reviewed-by: Joel Fernandes (Google) > Reviewed-by: Len Brown > Originally-by: Peter Zijlstra (Intel) > Signed-off-by: Peter Zijlstra (Intel) > Signed-off-by: Ricardo Neri Reviewed-by: Vincent Guittot > --- > Changes since v4: > * None > > Changes since v3: > * None > > Changes since v2: > * Introduced this patch. > > Changes since v1: > * N/A > --- > kernel/sched/fair.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 7a054f528bcc..c5851260b4d8 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -8605,6 +8605,7 @@ group_type group_classify(unsigned int imbalance_pct, > * @sg_status: Holds flag indicating the status of the sched_group > */ > static inline void update_sg_lb_stats(struct lb_env *env, > + struct sd_lb_stats *sds, > struct sched_group *group, > struct sg_lb_stats *sgs, > int *sg_status) > @@ -8613,7 +8614,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, > > memset(sgs, 0, sizeof(*sgs)); > > - local_group = cpumask_test_cpu(env->dst_cpu, sched_group_span(group)); > + local_group = group == sds->local; > > for_each_cpu_and(i, sched_group_span(group), env->cpus) { > struct rq *rq = cpu_rq(i); > @@ -9176,7 +9177,7 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd > update_group_capacity(env->sd, env->dst_cpu); > } > > - update_sg_lb_stats(env, sg, sgs, &sg_status); > + update_sg_lb_stats(env, sds, sg, sgs, &sg_status); > > if (local_group) > goto next_group; > -- > 2.17.1 >