Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1397964pxj; Fri, 21 May 2021 13:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAy9r45ldX+jVeRG4BiY7Z+2/E8iOjC4VZONtorUKq7oC8rpUcFYUWuCL/5nNxkvIeSMuc X-Received: by 2002:a92:2a0a:: with SMTP id r10mr612309ile.274.1621628135108; Fri, 21 May 2021 13:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628135; cv=none; d=google.com; s=arc-20160816; b=A1VmqXIejDYevmbe49QBC3ovEOOu5c70r9lOwfXp5cUprtJcMd/HgRbzTp4AcxIUFx RXitp7iu42e3V5WIad362shuGsUnsoEFJ/L5h9Lb6w8JPgvLeCJ+3PTdislm9MSKPuig MqWeQF1fs49wab4Urz6TP55p8Tbje/xWeN3TxAn+XALG/UeSNzUVMQfezrUoAVwH6y2C MJP4DxygNeMDFDSH5fcjWP/39cNulGg61TV2cz4VDRVqZJViQkFJ6rGmtQRfu1/QQPUS CZXCQfoTnixw9cb3MuuFb0kZ+C9zZqa4wjsB7/JrxYkQoA05Be+LAOZewh/MwZfWECzI OqwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=YqswwnIs4LLcY/Ga2AhvG9K1xWCRKozQ9x/2bs/j93c=; b=g40XeJRMiSoLzlXJ21V3bwuyT/ieXV+5e2IzeEReqyfkbvI/eOYcQ10BFtbj6hYHE/ /+bgNFyOH9zkHP8oEmospD96gYASu9iBRtgO17+AdjHY7LF5fQ9lVKCUyzqEZO7xRG12 2XAGZgaOh8BJ9HBmcQvv/TPxEk/i9L4ALzEXyLHMf0oUGT6UMGAVwg9i5zny5ZToKpBI ugfLJQ5JmZfIGN6DuJrHYrYvj06RjCjaCf75mmh6VSHc0G05Ivr/iqnCrN/GEler/H7X ZpuuwPtpaglnMBBNZZzTsHkUTJEel2MS8qSb0aQMwH3HrtXBsFSlgwVhmomUDkLwm2FP M6MA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s19si6825420ilt.149.2021.05.21.13.15.22; Fri, 21 May 2021 13:15:35 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233846AbhEUMmZ convert rfc822-to-8bit (ORCPT + 99 others); Fri, 21 May 2021 08:42:25 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:48522 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231584AbhEUMmO (ORCPT ); Fri, 21 May 2021 08:42:14 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=changhuaixin@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0UZbu5W2_1621600848; Received: from 30.240.99.2(mailfrom:changhuaixin@linux.alibaba.com fp:SMTPD_---0UZbu5W2_1621600848) by smtp.aliyun-inc.com(127.0.0.1); Fri, 21 May 2021 20:40:49 +0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH v5 2/3] sched/fair: Add cfs bandwidth burst statistics From: changhuaixin In-Reply-To: Date: Fri, 21 May 2021 20:42:27 +0800 Cc: changhuaixin , Benjamin Segall , Dietmar Eggemann , dtcccc@linux.alibaba.com, Juri Lelli , khlebnikov@yandex-team.ru, open list , Mel Gorman , Ingo Molnar , pauld@redhead.com, Peter Zijlstra , Paul Turner , Steven Rostedt , shanpeic@linux.alibaba.com, Tejun Heo , Vincent Guittot , xiyou.wangcong@gmail.com Content-Transfer-Encoding: 8BIT Message-Id: References: <20210520123419.8039-1-changhuaixin@linux.alibaba.com> <20210520123419.8039-3-changhuaixin@linux.alibaba.com> To: Odin Ugedal X-Mailer: Apple Mail (2.3445.104.11) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 20, 2021, at 10:11 PM, Odin Ugedal wrote: > > I am a bit sceptical about both the nr_burst and burst_time as they are now. > > As an example; a control group using "99.9%" of the quota each period > and that is never throttled. Such group would with this patch with a burst of X > still get nr_throttled = 0 (as before), but it would get a nr_burst > and burst_time that > will keep increasing. > Agreed, there are false positive and false negetive cases, as the current implementation uses cfs_b->runtime to judge instead of the actual runtime used. > I think there is a big difference between runtime moved/taken from > cfs_b->runtime to cfs_rq->runtime_remaining and the actual runtime used > in the period. Currently, cfs bw can only supply info the first one, and > not the latter. > > I think that if people see nr_burst increasing, that they think they _have_ > to use cfs burst in order to avoid being throttled, even though that might > not be the case. It is probably fine as is, as long as it is explicitly stated It can't be seeing nr_burst incresing first, and using cfs burst feature afterwards. Do you mean people see nr_throttled increasing and use cfs burst, while the actual usage is below quota? In that case, tasks get throttled because there are runtime to be returned from cfs_rq, and get unthrottled shortly. That is a false positive for nr_throttled. When users see that, using burst can help improve. > what the values mean and imply, and what they do not. I cannot see another > way to calculate it as it is now, but maybe someone else has some thoughts. > > Thanks > Odin