Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2740658pxj; Mon, 14 Jun 2021 06:12:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJB89xAtfbhDrWrno/QW0YKb+uOsvGzzbfot2+VTip2CWnyVlNUrjtRelJlFBrTOj2MACN X-Received: by 2002:aa7:c913:: with SMTP id b19mr16548867edt.323.1623676359528; Mon, 14 Jun 2021 06:12:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623676359; cv=none; d=google.com; s=arc-20160816; b=uSM77wS2IEohzher7YXL5aIlk6MOZR1FX0rjtWQXylPuhtO5iGm1ChbvOkFTzKcJ1d 2u65k5dexXf3ydMmgX01/hBp9ZPkQxrCm4I53D96hraJiTZzhl+Hef0huSzRWQqrx0Sr Ycb+4b5fmlJpm1GozZAJj2HeCM41WoZZ62veiecKqW55mPEF1zy4p4v7mrJROmc0miP1 MpQotl7ezH36sKh9l3+nnLbddhVkCFmq7KOTZQgYoE8EtxyV4TgyGMyYBYbrZXm0AjpE 20u1H4OjiyVbTdfOJO6umf4fcI7sEFrFklwXdagA4Cw6Ij9Clw9jhytule2AdiE2WBdJ Mr8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yYnDg3XToeuw/icgLCU3YUeHSV1eO6Orp2u9I1YQxLs=; b=wgIlyY7RraHd6EFgq3zI4bX8twv1IJ2GJbwZQRuTw2jgJHxtfRFoPfxrmWn+VAcAbW WGLjy4QRWvQbVEKZx+nisrf7Golk91wO2GnLfdLTRzuYk/YFojRElR7lv6HBCJ87aMHu tVtDHf6ZAcH8LiWIKpiX+jq5NjjCWFJIwC8s5c6GZafjFDFuNVByVW4ZfgINHAdt9gwz KDGM1yoNrTSANCykjqonDAgRiM1ecFunqpTFds+1CbUdYhIcPxONvwSqbf9PYgHBTCFl XC1PEBcOU+Grb7EgG/msHGhT+M+SFIUl7PeSL85ABknsEsJlzDJaAiQ2SnDs/I7MPsui Ybjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=L7QQyEqU; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si11078736eds.229.2021.06.14.06.12.16; Mon, 14 Jun 2021 06:12:39 -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=@infradead.org header.s=desiato.20200630 header.b=L7QQyEqU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233628AbhFNNMl (ORCPT + 99 others); Mon, 14 Jun 2021 09:12:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233218AbhFNNMk (ORCPT ); Mon, 14 Jun 2021 09:12:40 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BB3BC061574; Mon, 14 Jun 2021 06:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=yYnDg3XToeuw/icgLCU3YUeHSV1eO6Orp2u9I1YQxLs=; b=L7QQyEqUDnpT2CTnWsfdUKnPOb UMJRkNXbgGIfiJcsKyywlJBymn+sxZ3HEfKWmlCuDltILhkt+ClJyX7MThKpn7+gCfubqLnKuqf47 FER5eFzqEN8SiDqXpTGZuq/fAjtJHKwkOmcySBz0gaAXWXbZYuzknI+seEnPFh2G/gFzNKoOOCwx/ TjH/a3dhLJ48zCIwadnjBcaEspyHnf5wNNQcVzJGuK39FBDeZe5D/BoWD6Svmx+aJbMdy6pvv+c2Q W9ro17JNLHq7fJM3TuVq+t8o4+k8jFti4sd7002OXI0JUZnLOl+wQmT3O2goZFZUJj2cjnGbcAAZj 5JDQgg+A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsmM4-0072Dk-Oo; Mon, 14 Jun 2021 13:10:23 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0D08D3002FB; Mon, 14 Jun 2021 15:10:22 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E3E542CB7A561; Mon, 14 Jun 2021 15:10:21 +0200 (CEST) Date: Mon, 14 Jun 2021 15:10:21 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: Odin Ugedal , Ingo Molnar , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , "open list:CONTROL GROUP (CGROUP)" , linux-kernel Subject: Re: [PATCH v5] sched/fair: Correctly insert cfs_rq's to list on unthrottle Message-ID: References: <20210612112815.61678-1-odin@uged.al> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 14, 2021 at 02:01:55PM +0200, Vincent Guittot wrote: > On Sat, 12 Jun 2021 at 13:31, Odin Ugedal wrote: > > > > This fixes an issue where fairness is decreased since cfs_rq's can > > end up not being decayed properly. For two sibling control groups with > > the same priority, this can often lead to a load ratio of 99/1 (!!). > > > > This happen because when a cfs_rq is throttled, all the descendant cfs_rq's > > s/happen/happens/ > > > will be removed from the leaf list. When they initial cfs_rq is > > unthrottled, it will currently only re add descendant cfs_rq's if they > > have one or more entities enqueued. This is not a perfect heuristic. > > > > Instead, we insert all cfs_rq's that contain one or more enqueued > > entities, or it its load is not completely decayed. > > > > Can often lead to situations like this for equally weighted control > > groups: > > > > $ ps u -C stress > > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND > > root 10009 88.8 0.0 3676 100 pts/1 R+ 11:04 0:13 stress --cpu 1 > > root 10023 3.0 0.0 3676 104 pts/1 R+ 11:04 0:00 stress --cpu 1 > > > > Fixes: 31bc6aeaab1d ("sched/fair: Optimize update_blocked_averages()") > > Signed-off-by: Odin Ugedal > > minor typo in the commit message otherwise > > Reviewed-by: Vincent Guittot Thanks!