Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2908953rwb; Wed, 30 Nov 2022 12:34:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf7U9MMy8mJhWm2p0+EY1Jrg76jK+pAstwS5hsaqE2GQI5lnKq/WFIo9Uw/T9Y8Mxl9EMXlb X-Received: by 2002:a17:906:ca18:b0:781:c97c:84d1 with SMTP id jt24-20020a170906ca1800b00781c97c84d1mr52886407ejb.147.1669840481117; Wed, 30 Nov 2022 12:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669840481; cv=none; d=google.com; s=arc-20160816; b=BFqvGhXNVc1B7ex3Om5ZTv9azaoQdtIsLcn89K0FrvQn3Q+NkuyAC+aHbsThSdk2ac z6wkLaU3UA4wHY6ykz8eeDIt4b5OqBkt5Wrm59HXxtbd9aKal9KQ1fpyVZR7vOQn8mrY btwAatI1Jx2cQa5oidrwv6jJgrhIanZGJbyrT6Sw81uvTmZ9fjwQ+Ocmya5xAffhZvVu adETs88lgXDdkbsi6nWAfE7kHeglOXzra7sGzeC4MxVDJeQ+JvBahurdgLnvaRG5dBSz GbXKlB17IK7euWmVQMAvtzieRQ3+i75T+GgQJWPJJQ9nYTrMOMhQBghDX7QMepr5/wUp Mbrg== 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=rXdxFhxTXJMZHC2K4jUkxh/OKutSS9K9Oo99ntvx5PA=; b=bJ6MbPdziA2B95wnXvJrJzQwoJjAFGdELEsyTUD80gzvX3TW8nsx4FA/20BvlAN6nh C3BSoovf7IJlPkHM/54JJbScYYLY7TGCKB3odWO+0lscnYaFxmEmozecb/uTo9NpMDBE 4/QyfLrk/jJ7pO+mV61dmpATVEk1uSQ7vdETp5jU5ChHO6QTKIwm+W1uU/HaQXjJ9LJ5 6fGjdhaeRNHo2vSYwJTq0/xYZtjTIHuZKYWrGDdBRXT2QB7/dZybyhulIL20T0aba1WU n4pU2u6Cq12SEeXnCKTckg6nHtaw/1cJ+eMQu1l9HLqVfUEOJipyKEkiaQTRwE05r+iJ amRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="fwyygy/f"; 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 ho8-20020a1709070e8800b0079ddb52369bsi2265765ejc.61.2022.11.30.12.34.18; Wed, 30 Nov 2022 12:34:41 -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="fwyygy/f"; 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 S229999AbiK3UXn (ORCPT + 83 others); Wed, 30 Nov 2022 15:23:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiK3UXQ (ORCPT ); Wed, 30 Nov 2022 15:23:16 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6A3EF75; Wed, 30 Nov 2022 12:22:35 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id x13-20020a17090a46cd00b00218f611b6e9so3456908pjg.1; Wed, 30 Nov 2022 12:22:35 -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=rXdxFhxTXJMZHC2K4jUkxh/OKutSS9K9Oo99ntvx5PA=; b=fwyygy/fIcGISnxM7SLd6HwKX/itaYN7ne1sCrDpxfbyLvA/cYTRPkVgulkb4I5K1h 1ubPvLIZte+QIp4MCfHDL3whCyHeHroidEc7paAJ2LlFvK5lP17RnutOxvtk3AKlMYJR tzfQ56dgLwAYEw8BEVndHTMEIlj3V4iFc6cTpaGKvgw3/pQS6tjnLOQ9ap6SPdS/xjwD ho9jq2NS9Yfxyt20H3vwHJqav1tRRKrHuEvj8vuJPuyDB4o8htsopWsUszs2VaYuPqFb O01oWFIDJjIUhYyH99AoZmGQDceqxvisTkY1V37hhitb88QrslKdeXpoO4wwgoPbnohC LG4A== 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=rXdxFhxTXJMZHC2K4jUkxh/OKutSS9K9Oo99ntvx5PA=; b=IThz3mSC2S5XKMic5xJ7W2CkBmeESHvf82IGxcMQumztCAG1T39/DZi2DsaJ5HvFCt V79JVnjSORXJOgvaIzgek3ofXmYnEQb4UD6nexKt7vt6GXHkCXgV+XMFJW/LMCb/0TRJ Ho8jZt862Ll5yJVjl983osF4oDxQhLPyem4kyHM7Xlppbh03sqIK+SRasELsnkxnlnJu VyaNlnBV2pl5t9TEicpScOd+aTfJrnSzcNE2mFuSCF5QbLivPoi5pRsfvr5awA9qao7I y2t2VN5wWMfZ4LqxD7cNxGxFhjmnjOvKIktLhFCcS7sHY8lgx1Q0XC1ojzZPBfJlzd1l LgnQ== X-Gm-Message-State: ANoB5pmAqzjiaRHrn88cANBhcIpKt4C/te61q+UQ+pJ2Rp0Nq5tbXYil erwiZfTHOcGWC61m14XF1E4= X-Received: by 2002:a17:90a:a616:b0:219:6afd:24be with SMTP id c22-20020a17090aa61600b002196afd24bemr3258885pjq.0.1669839754973; Wed, 30 Nov 2022 12:22:34 -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 x12-20020a1709029a4c00b00186a2dd3ffdsm1914862plv.15.2022.11.30.12.22.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 12:22:34 -0800 (PST) Sender: Tejun Heo Date: Wed, 30 Nov 2022 10:22:33 -1000 From: Tejun Heo To: Li Nan Cc: josef@toxicpanda.com, axboe@kernel.dk, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com Subject: Re: [PATCH -next v2 6/9] blk-iocost: change div64_u64 to DIV64_U64_ROUND_UP in ioc_refresh_params() Message-ID: References: <20221130132156.2836184-1-linan122@huawei.com> <20221130132156.2836184-7-linan122@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221130132156.2836184-7-linan122@huawei.com> X-Spam-Status: No, score=-1.7 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 30, 2022 at 09:21:53PM +0800, Li Nan wrote: > vrate_min is calculated by DIV64_U64_ROUND_UP, but vrate_max is calculated > by div64_u64. Vrate_min may be 1 greater than vrate_max if the input > values min and max of cost.qos are equal. > > Signed-off-by: Li Nan > --- > block/blk-iocost.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/blk-iocost.c b/block/blk-iocost.c > index f4a754b9d10f..2316ba93e7d6 100644 > --- a/block/blk-iocost.c > +++ b/block/blk-iocost.c > @@ -926,7 +926,7 @@ static bool ioc_refresh_params(struct ioc *ioc, bool force) > > ioc->vrate_min = DIV64_U64_ROUND_UP((u64)ioc->params.qos[QOS_MIN] * > VTIME_PER_USEC, MILLION); > - ioc->vrate_max = div64_u64((u64)ioc->params.qos[QOS_MAX] * > + ioc->vrate_max = DIV64_U64_ROUND_UP((u64)ioc->params.qos[QOS_MAX] * > VTIME_PER_USEC, MILLION); Can you please align the parameters line? Other than that Acked-by: Tejun Heo Thanks. -- tejun