Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp5320912rwb; Wed, 17 Aug 2022 15:34:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR7WIyQKqhKNl6XcqdTSEEiHi8+Nmf4itzG67G8Xa9S0hmP9lXeq15HFNExwURg+VsBmK24C X-Received: by 2002:a17:907:720b:b0:731:6e49:dc93 with SMTP id dr11-20020a170907720b00b007316e49dc93mr92122ejc.421.1660775698234; Wed, 17 Aug 2022 15:34:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660775698; cv=none; d=google.com; s=arc-20160816; b=ZIZ4B294/iNJ3il/dPipXMpib9Zv/D4S0QkhwiX+D+UTT4xIsPLj7aCpa0ChAXOxh1 O3ZCAdHnCnMUnd3YdcXoqQugtROQ5izBluUPoxIkXE7ZowfY4tVOYuG3gT8Yhvzc+3SP 3MJJOpo1WDrJewSDnxAF9Gh+oZ6lXK0HuFvqDZx49UVlINn2lOof1TorxadwDCn11v8h dPJLs9cpb4/GVc4iaGqcbHod/uzWVLOh5IjVyVtRf9PcML8EqSj6kVE02sACbmv4Xhhg NWfrITwvTs+GQ6MnwLc9u2RsC97QlsvZIW406r7W7MOQUYR2k9hKnGQsfirWez4GYKyB G23Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=Cl0VOxXiBJ9aDBIZ9VHzAPQnD5rzvmvW0CSWEKzvNbQ=; b=F7ESYnSSvWnWReVJhxlKOJMEioFkly67lOts/CIRQZ0yNvVnGNnRW42XYdXfpqEzJ/ Y82UAm5Y0lJimSCR6lhKAAsbzmm9GfXdSW8FVxF1eZtMgyjmsR0KFlFE9i2gGFfZ//oj RLGgH/MpEEYoJ/TLA8x+DDyFh4b8c78z51UrPLeqyjTCDLg5//8littFv533f9i13B7A ZG2NjNH5LMf/59oRQMz2h5LIe2VOZZydVT8/5/Sio2cytnTftH9GSs9yXYQPDMbnANcv VUhuU2DQ/5Sl3YYx0AntDGOA+Bi3CRajSVeWETisqpUUJugzi+H9S2N94bwd90rJkJMo i48Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=i0SpMOMt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j21-20020a056402239500b00445ab4c82d1si3678667eda.291.2022.08.17.15.34.32; Wed, 17 Aug 2022 15:34:58 -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=@google.com header.s=20210112 header.b=i0SpMOMt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242339AbiHQVQf (ORCPT + 99 others); Wed, 17 Aug 2022 17:16:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241842AbiHQVQd (ORCPT ); Wed, 17 Aug 2022 17:16:33 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B184F726AE for ; Wed, 17 Aug 2022 14:16:31 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id x63-20020a17090a6c4500b001fabbf8debfso2208650pjj.4 for ; Wed, 17 Aug 2022 14:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc; bh=Cl0VOxXiBJ9aDBIZ9VHzAPQnD5rzvmvW0CSWEKzvNbQ=; b=i0SpMOMtexVlsWU3FXDtYdeZ42T3dV91NmBN/jHzdRZIQDh4ju+X47frFOnT5mJdaD J9ZE8jbbgrEQtl0OhtYp3mnGh5YTLuLGXS/xZS9gY8MQkBLgWhoCmMp/9R8ZFq5Enjo1 EvYBNz5lRGeHx1kVT7OHS9QwU+RMdZzAqmn0fPF1PHDWO41LlrKWf4/CR0BB2Vco+zwB tBMsMF9J5b8Oj+6L01c08s0fDdzVL60C4D4X3QVafJ8fTSId9VMJK46bex/K4L4EhYgC xvLAeqo6ZXbkRMCMa/+NTMlk722zALy4BG10rwMf5IVY00f80T64TM7wRWxb/hEMMYwk bmzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Cl0VOxXiBJ9aDBIZ9VHzAPQnD5rzvmvW0CSWEKzvNbQ=; b=sF5dJ9x2khrEyeTUuYMNCB50pZ2VqnN37O/vXXwvdXmWAF2qPj8aVIae6ysypXag3U DrcqFcKH5hwqyUdAjBDKpeBt2Kqu/uOSZa5x4M0NyP74Mc3W0J+3BNg7NiHJKjiX/Kuf Gkq2lUVtJck2Ac4A4Ozd3wXK6SxRL8r+XeIDQmUpofb85J5s/DaEUiW6hgFHNgeedtPj +bixgaG550NV/lGnMCLOFhqAf72oP+LD2zIWWO3dTC/irZM/7tNaB0bHvyRDEUZY8i7W nLvFy7HwQBAOXul4EG24DvduSZnOfQEarigfACayUSuZVvDrbH6i/oFFPK64J/5MT11A cp3w== X-Gm-Message-State: ACgBeo13PDq60x2suJkIQJqeUVpEW2+5rsDuGADLXVUf+oa84VrBCJ/Y jh6K7F0WwnlbmpStAVv6Y97h2g== X-Received: by 2002:a17:902:f685:b0:16e:ed53:be7b with SMTP id l5-20020a170902f68500b0016eed53be7bmr104386plg.174.1660770991168; Wed, 17 Aug 2022 14:16:31 -0700 (PDT) Received: from bsegall-glaptop.localhost (c-67-188-112-16.hsd1.ca.comcast.net. [67.188.112.16]) by smtp.gmail.com with ESMTPSA id p2-20020a170902c70200b00172951ddb12sm388830plp.42.2022.08.17.14.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 14:16:29 -0700 (PDT) From: Benjamin Segall To: Zhao Wenhui Cc: , , , , , , , , , , , , , , Subject: Re: [PATCH] sched/fair: limit burst to zero when cfs bandwidth is toggled off References: <20220809120320.19496-1-zhaowenhui8@huawei.com> Date: Wed, 17 Aug 2022 14:16:26 -0700 In-Reply-To: <20220809120320.19496-1-zhaowenhui8@huawei.com> (Zhao Wenhui's message of "Tue, 9 Aug 2022 20:03:20 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Zhao Wenhui writes: > When the quota value in CFS bandwidth is set to -1, that imples the > cfs bandwidth is toggled off. So the burst feature is supposed to > be disable as well. > > Currently, when quota is -1, burst will not be check, so that it can be > set to almost arbitery value. Examples: > mkdir /sys/fs/cgroup/cpu/test > echo -1 > /sys/fs/cgroup/cpu/test/cpu.cfs_quota_us > echo 10000000000000000 > /sys/fs/cgroup/cpu/test/cpu.cfs_burst_us > > Moreover, after the burst modified by this way, quota can't be set > to any value: > echo 100000 > cpu.cfs_quota_us > -bash: echo: write error: Invalid argument > > This patch can ensure the burst value being zero and unalterable, > when quota is set to -1. > > Fixes: f4183717b370 ("sched/fair: Introduce the burstable CFS controller") > Reported-by: Zhao Gongyi > Signed-off-by: Zhao Wenhui Indeed, good catch. Reviewed-by: Ben Segall