Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7832958rwb; Wed, 23 Nov 2022 11:20:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf73blDkJIY1crQgwHvGpehgzOoI90K3i2r8GEbkLR61F9uxayh4NXxUugubX8njHs9yUlVi X-Received: by 2002:a17:902:aa88:b0:188:5c0c:758a with SMTP id d8-20020a170902aa8800b001885c0c758amr10496331plr.134.1669231229015; Wed, 23 Nov 2022 11:20:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669231229; cv=none; d=google.com; s=arc-20160816; b=qqPSpYA8/AroaEpihwnLgV2XW6AzbCa02AFL3QYG24rPHxQSs2jNWUaJfbymaqz21f GQO1sUGhv4wBJSM0BYPoUetfjV8NpWEQmmJkdA+/KVXrnYklTdNFRp8v4vS6gA3frogQ Q+d5xmyabiSMRDfnIx3RfWz/VBP3olQtZNxjsmXCVM5BwPCrV3lVSYKChiZKIUrVPM+S gWvj6pIm460nKQkP1+Gv2Oy/1Wt8q5BAmDW7QMaQ3TZASM7stx9KULifleEIb3Yindg1 yFWJVfIRPPbz67EMILuYj4K4xke7OrF4jgBNOsZE1S9V0+D2WbwtSZJrWJQWvi4H7XSY DLIQ== 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:sender:dkim-signature; bh=0WaeNxRFAhW4+njSz3oymHAfGYjiGBjYSgTnlxkSAys=; b=xej1Ru0INcOk8o4XNCPXOdbjBdOh8Yy2suM41iSwJMq+mmpr2t+q5pqefe0M1eYiyU hw70RaAsa875Yh4WIheyIwVOUj1kWpdK7Xij5PvEOUqgsAxHKbW8LKNtOhz9ZOyDrJjK QY5j85CSc+x7Ang+uFWyEK5XvtjiTt0jZQc5NTQxMONP+mbGFxjR3qAf9ATe7ZxVKi1w uyDQXzYCQcoDlrV2gmCcIvMOsL/VHNXjTJWVyra4z1i+VV6kd1f8sDgesViXxkh85aaw YrkK0tdSGpcKjY+ugWOq8YZHIGawLsLe1eVftvURtmELKDbu7aRy1tak3ofweCiueTxA aK7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jxxUgRm3; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a056a000b8200b005732e831300si9467617pfj.337.2022.11.23.11.19.58; Wed, 23 Nov 2022 11:20:28 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=jxxUgRm3; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239789AbiKWScz (ORCPT + 88 others); Wed, 23 Nov 2022 13:32:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239856AbiKWScE (ORCPT ); Wed, 23 Nov 2022 13:32:04 -0500 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 987FA58BCB; Wed, 23 Nov 2022 10:31:57 -0800 (PST) Received: by mail-pg1-x52a.google.com with SMTP id q1so17448156pgl.11; Wed, 23 Nov 2022 10:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=0WaeNxRFAhW4+njSz3oymHAfGYjiGBjYSgTnlxkSAys=; b=jxxUgRm3rae626X/F21Ixmc+goaczD8yETEXBu7QKc5qDMcofymNGMqTIMRVMFSRgo MWh0pdG+HtHw/CoioHszw6hAOBoiZlBfcQaWru3S0hQoUOw0a150L6bPjTztvDXr6EHd LQHcc7w27lcEfmNURWK2YGbv5ooe00NXtY9/nHbuKrqPlRfT6GjcjDNIZQx7wHCcEeiK uFNz1BwW7Y/3JL5VqEoKKeLWI94+tneUv4fB0k9afElk693ZB3qerfUL+jP+GlR6/LAb AmqWawnah09OIwkxNg3OtH5d6XnCCa5Bp02R8mdnjDRzhKp8PWkO5lPULhVQTq8eJzxB cxdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0WaeNxRFAhW4+njSz3oymHAfGYjiGBjYSgTnlxkSAys=; b=qV2I9ZlBNcgVh7XNmZiRe0zt/KYqIWQ9WWH9Pl+LayIF0oQxeaZTiDAiMGOxo+rtr7 jJHLwPJKcP5lRMx8OT0bXhZzTsLc43sVq0QvLKluoTEf7ErlDBNMlrFlQ9j1gSUJocmV sikYP5NpOkQh84zYGUIN8jH/PORcFP6L6LA/pjhN2DDiLezFPOr8ASioCNHJ4ABviY84 8sjPJZMgbZ5Bg9absx0s2oRwQQ3aFcISFl4dzkGyF7nWpKhRnEkFf6ATPO+B49SFbzZr eNwDLWoiTaDv+U6G3rSLuvb4+jD7JXhMlSjvTAQf08c43GVaVNMhTPE3gYRh6Yvt6BJ9 f95A== X-Gm-Message-State: ANoB5pkXIx9p8hjO0tOvgHsRgnzsopvNf/iiVXF4uG/9qcJKfW8S/Sms TPGxP71G7V8nX8VSfy9EkiM= X-Received: by 2002:aa7:810e:0:b0:56b:f23a:7854 with SMTP id b14-20020aa7810e000000b0056bf23a7854mr14683565pfi.66.1669228316945; Wed, 23 Nov 2022 10:31:56 -0800 (PST) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id b1-20020a17090ae38100b002132f3e71c6sm1699262pjz.52.2022.11.23.10.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 10:31:56 -0800 (PST) Sender: Tejun Heo Date: Wed, 23 Nov 2022 08:31:55 -1000 From: Tejun Heo To: Kemeng Shi Cc: josef@toxicpanda.com, axboe@kernel.dk, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 09/11] blk-throttle: remove unnecessary check for validation of limit index Message-ID: References: <20221123060401.20392-1-shikemeng@huawei.com> <20221123060401.20392-10-shikemeng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221123060401.20392-10-shikemeng@huawei.com> X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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 Wed, Nov 23, 2022 at 02:03:59PM +0800, Kemeng Shi wrote: > We always keep limit index valid as following: > Max limit is always valid and low limit can only be invalidated in > blk_throtl_update_limit_valid. Each time low limit may become invalid > after blk_throtl_update_limit_valid is called, we will check and make > sure current limit index is valid. > > It's reasonable to always keep limit index valid, so we can remove this > check. It's not obvious to me that it's correct and I'm not sure what we're gaining by removing this while risking subtle breakages. -- tejun