Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1057706rwd; Thu, 18 May 2023 07:26:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Sfvt9Vc3UAZ1WgQJ6YzJeFoNi54jN68jYmzyxqVknx1j2bCZEHxqq6SFw4YH4SKsXzZ6T X-Received: by 2002:a05:6a21:3998:b0:101:5743:fd01 with SMTP id ad24-20020a056a21399800b001015743fd01mr2737864pzc.25.1684420013443; Thu, 18 May 2023 07:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684420013; cv=none; d=google.com; s=arc-20160816; b=axJweXRdISVGjHMHqiBWGXFypAN0Ob9yYtMnstbungsfqlzhEhMW0F+16qnGTWN5Nq XjP1fO552VZqF8e+bil3/f7tDwVL6UmcmpyD/krXNGTIeXjD1LqNbtlB6CDv67ED152Y 9jgZREqgw/e18G7tCH5L7jypTKrDnIZdnmaXD0i0i/h9cZY0HRFut8L1syCgSpw4yvFy lsdH6+4G6FW2jMnjcDWjduAv9Iy+uVtDbIcp8htQNnavJQ9d/kWIOVW9tegQFBVitsqR wn1jJ1N09PD0otgNRktnp22xogMTblBplj3LBwrVVv8g/1If+iVXgOMikY1hcBN3mLJJ 7ktQ== 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=278tUrwM0ypNiOb8pgGS7TOvecJeprbi5y1J+57X7ug=; b=g7Ch+2prU2MRMsncADpOL6GWqrGUlgO7qEAyXihXdiNY5wnAbluEzYAZt87DobAOrc ziqp9rq6ZLFw43TSASFRffx1cuLWXcljiQsvY4M//OUn+pBY2rOUsDZfd2XOJii3QEAn jWHVPSYgeHuKIPS6f76JWmOpLuKa2vGdC4OH4KeOD21iK98hMv7WZW21bhDvxl1tFrDQ kDkTsFXP7C1o8xY+4/2xehxUzXtmlHeBwgCQAyIEDc3djoBbK+roKGtXQhH9snDhneS/ z4i/QiCiqB8OJRZS2M7isBuZvIeFgRLSctevb7NkPr4KlnsO2nd2UpeVz7Z8b2LiNKco 5GZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=ZQiC5mwO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z186-20020a6333c3000000b0051b48085aaasi1493288pgz.858.2023.05.18.07.26.40; Thu, 18 May 2023 07:26:53 -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=@infradead.org header.s=desiato.20200630 header.b=ZQiC5mwO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231154AbjERNsX (ORCPT + 99 others); Thu, 18 May 2023 09:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231604AbjERNsJ (ORCPT ); Thu, 18 May 2023 09:48:09 -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 115E5E75 for ; Thu, 18 May 2023 06:48:00 -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=278tUrwM0ypNiOb8pgGS7TOvecJeprbi5y1J+57X7ug=; b=ZQiC5mwOK9iFCQYNYCs/K5vZVS zKL9z/6wIqg5DKcatooe/vWTvS4/eqdD7tHBHhCZRkggqsvLkm7bSVscr95ke5+nxi1Q9JGOAd5IC nNHkG5X0hoAikRoTugWtACi+jATSvJ3DsSp6qoYdTROT4KyEds9TmqMpnGd5m/2OhpXADXk3XgTat noy6L2fvRvnmxbmOYgX+HgpF/dV5vGUVRHDoKSxVCKlpYrKnHzjA/zwd5ruO2KRcDXswM357M35EA YfA68qw293k18QZlbenpx3SD9axi6Ebz7POVQGxuz9BRSxisPa/0SucYc8jOlcnc4IxxjBSMV7QYd JOLmrZRQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pzdyu-00EplW-1C; Thu, 18 May 2023 13:47:48 +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 (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id BA85D30072F; Thu, 18 May 2023 15:47:46 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 772C0241C9363; Thu, 18 May 2023 15:47:46 +0200 (CEST) Date: Thu, 18 May 2023 15:47:46 +0200 From: Peter Zijlstra To: Phil Auld Cc: linux-kernel@vger.kernel.org, Juri Lelli , Ingo Molnar , Daniel Bristot de Oliveira , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Ben Segall , Steven Rostedt , Mel Gorman Subject: Re: [PATCH RESEND] sched/nohz: Add HRTICK_BW for using cfs bandwidth with nohz_full Message-ID: <20230518134746.GB2860939@hirez.programming.kicks-ass.net> References: <20230518132038.3534728-1-pauld@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230518132038.3534728-1-pauld@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Thu, May 18, 2023 at 09:20:38AM -0400, Phil Auld wrote: > CFS bandwidth limits and NOHZ full don't play well together. Tasks > can easily run well past their quotas before a remote tick does > accounting. This leads to long, multi-period stalls before such > tasks can run again. Use the hrtick mechanism to set a sched > tick to fire at remaining_runtime in the future if we are on > a nohz full cpu, if the task has quota and if we are likely to > disable the tick (nr_running == 1). This allows for bandwidth > accounting before tasks go too far over quota. > > A number of container workloads use a dynamic number of real > nohz tasks but also have other work that is limited which ends > up running on the "spare" nohz cpus. This is an artifact of > having to specify nohz_full cpus at boot. Adding this hrtick > resolves the issue of long stalls on these tasks. > > Add the sched_feat HRTICK_BW off by default to allow users to > enable this only when needed. OMG; so because NOHZ_FULL configuration sucks, we add hacks on?