Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp275157pxj; Wed, 9 Jun 2021 23:54:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykUsw32zLymaagR0BtA8+MV633PlE02gmbjOqNjKxiAmw24OkgXKBrLIDpzjkS9qstWYu2 X-Received: by 2002:a17:906:a850:: with SMTP id dx16mr3117052ejb.333.1623308072050; Wed, 09 Jun 2021 23:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623308072; cv=none; d=google.com; s=arc-20160816; b=n1oxpNIFjmpJZ3FWnqwQcRaeOzmogKV8WXoB+fwfF/Fsdqkws5oOw+acUKsQW8BiMr uSbaogMWiQDgsGD0JZtg7BKo3DSPUkSoGvoZEKydFh7kIHGFAltbBk5Z3+ul96IE12im 8UJoI3YH9uQHFcsyJ32Z6PU+6nHichlyGXv40OP5eur3oHYJVT1qGEkHV2Rf1RNXXdey WLC5hQ8n8mzHkQrnVRQ8gRdRN5p+q6kYZXw7WQVbR4AH/oSioY//aSXV8mCTVm3UjPE3 R5G+MB3rnVbAv/67SMAmEHn22T0bf+ntze/rLcYk2cgpR3Vjn4OAMts17xhqFADR6ns8 8bdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=67pgjCx8vmxJvqmbawagxHeBDG9F0WOXi380k50exuo=; b=RVRA4BCobMBd59awbgXFR9pq8T8TuvYCf948uecjhc0tMiiucuWd06/8KcXRgttz3w e6to8oDtiWvdQLaBI3sxFkgzA0mGsvOSt6M3WKMysVzNz3yrbm6XE6PE3RERM7xZwr5F ivESFPe4FCDgniBf1hBr+3aQCQrueqh2g9FroTWYSlY0kRIiBbLyfWG69hUIImcrdCUR ZjSskhTgFpYNYkEL27ovIF8ijFmzVg2tF+DwmAh/yObn8pB0xpQHy/nKGfZcXd2viIkz 6oQDEqs8lj+4zs23QjzTYuO8hFqZtaZYPXWVpP7RBQz/+eNqswWBPw6gm+NXehJWzEDR Riig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=po0rea81; 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 cw1si1581856ejb.544.2021.06.09.23.54.09; Wed, 09 Jun 2021 23:54:32 -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=po0rea81; 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 S230059AbhFJGws (ORCPT + 99 others); Thu, 10 Jun 2021 02:52:48 -0400 Received: from mail-lf1-f51.google.com ([209.85.167.51]:35609 "EHLO mail-lf1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbhFJGwr (ORCPT ); Thu, 10 Jun 2021 02:52:47 -0400 Received: by mail-lf1-f51.google.com with SMTP id i10so1450467lfj.2 for ; Wed, 09 Jun 2021 23:50:51 -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:content-transfer-encoding; bh=67pgjCx8vmxJvqmbawagxHeBDG9F0WOXi380k50exuo=; b=po0rea81p6koLdoj90+BpTqr297m34vqZiDHl35MFKN5HmBo/cINMskvg8Rj1AiXCD P/mX6NsU8ilK5hyP7AW2r0V1bwvN2iVAetVFInJHL3ulhputAR1fbbnR8g/j+kgSLQRN iXciNRcfQNWXmevrvU/V5C2Ds7I+9bLqYeVGkHSoUKiLnS7CZ/zFob00D4OF3VknComV +qQqQK4kXsp5qjvVU5KnImu/nnQ+tNK8McFDo2o+UIVNatGM0GWVemlGxwcDZQAGmctV Yi8SxUDNO9ks7NLikMTm/51IqsXk6A361yvzd5VwX3BuQ5o0Bb4YtgNKJRMi3H4g+gpU x25A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=67pgjCx8vmxJvqmbawagxHeBDG9F0WOXi380k50exuo=; b=OR+KsFU+Z+sJ9/i0Azm7XmweXMdcUWi6KA+WxWVleyAO5+tn48VUymtlI4sQkeG4SF jcw2AQMTDkTdmjy0YVcvMx7dT4WFY1XF7qEoUfMdvm3lk/waFIoyYeHDwVaeTGHaWsZM Wu6OTK7xCFN+32taMu/I30cP0HtOuvcU1tkJwamjpYPXFwKn5Y1P3GwvTvuEA7id61E9 cnN909+D27CexYO81x1NxpQPE6Z76C6cm8LpetaISb8zx3lGzvztkuQA+WuhqVftKu+5 +lY2XVxsMWzoejLM73TVnKiF+6+I1782vj1nR1HFaYzEj9D5o4LVqocUDLoCjiDMMfvL mK5A== X-Gm-Message-State: AOAM530PW0lfkam5WbM8EErGy0s6aXQO3NilC9+AO5CG65i7vYOHEinJ rV9R5xZtwjbinWfOI9kcRWPWbB3aQ4RoSf/4ZBcRQg== X-Received: by 2002:a05:6512:3b84:: with SMTP id g4mr969823lfv.277.1623307791024; Wed, 09 Jun 2021 23:49:51 -0700 (PDT) MIME-Version: 1.0 References: <20210604102314.697749-1-odin@uged.al> In-Reply-To: From: Vincent Guittot Date: Thu, 10 Jun 2021 08:49:39 +0200 Message-ID: Subject: Re: [PATCH v4] sched/fair: Correctly insert cfs_rq's to list on unthrottle To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Odin Ugedal , Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , "open list:CONTROL GROUP (CGROUP)" , linux-kernel , Giovanni Gherdovich Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 8 Jun 2021 at 18:39, Michal Koutn=C3=BD wrote: > > Hello. > > On Fri, Jun 04, 2021 at 12:23:14PM +0200, Odin Ugedal wrot= e: > > > @@ -4719,8 +4738,8 @@ static int tg_unthrottle_up(struct task_group *tg= , void *data) > > cfs_rq->throttled_clock_task_time +=3D rq_clock_task(rq) = - > > cfs_rq->throttled_clock_task= ; > > > > - /* Add cfs_rq with already running entity in the list */ > > - if (cfs_rq->nr_running >=3D 1) > > + /* Add cfs_rq with load or one or more already running en= tities to the list */ > > + if (!cfs_rq_is_decayed(cfs_rq) || cfs_rq->nr_running) > > list_add_leaf_cfs_rq(cfs_rq); > > } > > Can there be a decayed cfs_rq with positive nr_running? > I.e. can the condition be simplified to just the decayed check? Yes, nothing prevent a task with a null load to be enqueued on a throttle cfs as an example > > (I'm looking at account_entity_enqueue() but I don't know if an entity's > weight can be zero in some singular cases.) > > Thanks, > Michal