Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754459AbdCGBFf (ORCPT ); Mon, 6 Mar 2017 20:05:35 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:18256 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751607AbdCGBF1 (ORCPT ); Mon, 6 Mar 2017 20:05:27 -0500 X-Greylist: delayed 1673 seconds by postgrey-1.27 at vger.kernel.org; Mon, 06 Mar 2017 20:04:27 EST X-IronPort-AV: E=Sophos;i="5.35,256,1483977600"; d="scan'208";a="1136817" Authentication-Results: spf=pass (sender IP is 74.221.232.54) smtp.mailfrom=sandisk.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=sandisk.com; X-AuditID: ac1c2133-d1e189800000c960-bf-58be038dc8a3 From: Bart Van Assche To: "tj@kernel.org" , "paolo.valente@linaro.org" , "axboe@kernel.dk" CC: "ulf.hansson@linaro.org" , "linux-kernel@vger.kernel.org" , "fchecconi@gmail.com" , "avanzini.arianna@gmail.com" , "linux-block@vger.kernel.org" , "linus.walleij@linaro.org" , "broonie@kernel.org" Subject: Re: [PATCH RFC 04/14] block, bfq: modify the peak-rate estimator Thread-Topic: [PATCH RFC 04/14] block, bfq: modify the peak-rate estimator Thread-Index: AQHSltxyUST7CGtwdEOgNVq/ejIuiA== Date: Tue, 7 Mar 2017 00:47:50 +0000 Message-ID: <1488847656.3125.10.camel@sandisk.com> References: <20170304160131.57366-1-paolo.valente@linaro.org> <20170304160131.57366-5-paolo.valente@linaro.org> In-Reply-To: <20170304160131.57366-5-paolo.valente@linaro.org> Accept-Language: nl-NL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.28.1.254] Content-Type: text/plain; charset="iso-8859-1" Content-ID: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsWyRobxn24v874Ig97d8hbf3n1hslh9t5/N YurDJ2wWN7bdZ7aY8mc5k8XeW9oWl3fNYbN49Wcvk8Wv5UcZLY6vDXfg8tg56y67x+WzpR6b VnWyedy5tofN4/MmuQDWKC6blNSczLLUIn27BK6Mpkv/2Au2MVc8baxqYDzL1MXIySEhYCJx sOcmmC0ksIRJYuvu+C5GLiD7PKPE0RUrGUESbAJGErMn7GEBSYgINDJKzG6/yQ7iMAu0Mktc WnadBaRKWMBT4vXxb6xdjBxAVV4Sfy9FQJh6EgvawCpYBFQkrl5aBDaTF2hm9++zjBCLiyS6 754BO4JTwE5i8rMJjCCtjAKyEi2vuUHCzALiEreezIe6WUBiyZ7zzBC2qMTLx/9YIWwFic8r /rFB1OtJ3Jg6Bcq2kuhe954ZwtaWWLbwNTPECYISJ2c+YZnAKDYLyYpZSNpnIWmfhaR9FpL2 BYysqxjFihOTi3PTUwsMTfSKE/NSMouz9ZLzczcxgmNX0XgH478N7ocYBTgYlXh4E7L3Rgix JpYVV+YeYpTgYFYS4V1wECjEm5JYWZValB9fVJqTWnyIUZqDRUmcN2b21AghgfTEktTs1NSC 1CKYLBMHp1QDI/8Nqzn8ASsmMPVdPrCKfYGLikKdzukPkzdnsEx9kTW5yKriaMSs1/z6nhxz ftmXSWpNW1WmbHUh63UO77NFlflFja2yh+SLVP4rOnDM/rms9hN//k3LzfK79mwo08lP/Xs/ 6GuX81GLCQlZscWdbWfbRJvcLW67vJeff9te8f7sv03ve5KYlViKMxINtZiLihMBfMSrGtkC AAA= X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:74.221.232.54;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(7916002)(39410400002)(39850400002)(39860400002)(39840400002)(39450400003)(2980300002)(438002)(189002)(24454002)(377424004)(199003)(9170700003)(2201001)(8936002)(5660300001)(76176999)(7416002)(86362001)(81166006)(3846002)(106466001)(7736002)(106116001)(6116002)(2900100001)(2950100002)(8676002)(47776003)(92566002)(2906002)(39060400002)(38730400002)(53936002)(6246003)(50466002)(103116003)(2501003)(8746002)(229853002)(54906002)(50986999)(189998001)(33646002)(36756003)(102836003)(2270400002)(626004)(23756003)(4326008)(356003)(305945005)(54356999)(7099028)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR04MB517;H:sacsmgep14.sandisk.com;FPR:;SPF:Pass;MLV:ovrnspm;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;SN1NAM04FT020;1:WGwVZ6X2RV0qK/DfnxaBqpBrrmXDvLxeGdaDm2WOdqcKmJ5FkTTlEP3Hz/lN30qvjr+LgQcTYnpCEAJ6cNa6FG9hZMTGNrVJQ7QLyFB3sfsxzyAIPiXgEG46Q7GEGQZ/63nk8frftwsKGeH21x06c4lmQMUa3W9smipFH5VIh4u5xTajGit6+Wf9gUWNaPa5zQbEz2FB7535kHE+sdv4JKIUBNw7QjvlSGtDN/NeP4scmJqzafX6tWzgToOsGD5E4h3iG66utSjaBEQzUIMzFYJLjaMNkeyJIiLWykEGNQHr0WxucE+JvHOjZla5WLEvGqUP6w2JoxS3BTSxaRIvPDVagoCFQd2GNOWEGCp+ypn3NmTrt08S87A8UNDUeyW+HZpypmbMXTsu/EBVG0zaZWRVIlQadaNlknVTCXYIi8NFqVs2SNHFOjgI2jKHAGyEhUvoQhEAvFfp3O9mC5pidLGx0RclHB/SNszENBH2H960LN6gpM0crKaPclUpyiKjjKu8piC9XwudM/108mtC7NUNj+TZ6b4RxPo4T32NWV/Wjvl929964YFXW1IKu/IMLSZrm3kj3Ii+1taQRXD59w== X-MS-Office365-Filtering-Correlation-Id: 931c83be-dc22-4ec4-47a2-08d464f3c96d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:BN1PR04MB517; X-Microsoft-Exchange-Diagnostics: 1;BN1PR04MB517;3:Y4oKrTpWgjDz7bPTy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KVskSJ+zfEnYRP+0zW4xN9yblYza+BKLCmrL6iALy2zs1rdMBKenD3X1tMBpktPHbEJLHSvoI9dT1kfN4g;20:T0cpukmJ8s/ZCGr2q26XCGFzDFzhhAiwoVXgKceJCauXvggm+A8z8bEpej0vkQe6zsilPl/u2jCqHBbZdHp+XPhneq8YyNkxmQY9dcTG0hBOgiqN8FpnxLG6vPqZblwS2wxXMGMdkSiSfaXAQ/MtxkXzj46pbqlzznb0zqny7/tajxlZI5szpVRgRx6Igu53T6s7PtGNfyiIOGJaIS9g7Ahdbg+EOZtJE2MSq+AQGc91mQUztw2f/rqyzrybT0PTS128FKXRJ/DKC+d7PwNuccZAbtDucC12HX6LNI+31vXmi6k5dcFGUYja3iEw8xXavrRCS+ly4aGKzP7zN2YaBSc2Jh+05qIBbv+TDXi6X+/AYC3uSolGxcTqE12ed8A234RicPGfHlFLvHTV4rR1mTpSnJldz9VUHCBWp9o58sUTkyLDrdv7lcanPRyrR8AF35hS9R94WYWXumA7DCn0f0aCnexnB5MhlKcGw3sLfU8DmVH6NtLKQHvLn4rUppxP X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(13015025)(13017025)(13024025)(13018025)(13023025)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123558025)(20161123562025)(6072148);SRVR:BN1PR04MB517;BCL:0;PCL:0;RULEID:;SRVR:BN1PR04MB517; X-Microsoft-Exchange-Diagnostics: 1;BN1PR04MB517;4:7Vz+g8+k7k6vliXmk3pwh/PJRSmyFg9UynDMjTG3V+G/f0L3kGsHkYRFgYNpysbi/vcqjSwh/1dhyP3dJ9JifoX0szF4KDyJUylmDds3kmFslOHD42xLLnd8PeeltW44BLpkpbMTjtjuQ9MukoBshZ6ZgEPwMhyDMtVe3SDxtcTg9s6dJSyClCran3Cr/9JvXSPhIDEXdqmUayDrMlUnB+o8tNetALbr9Mo8aFCMLDBx3AgtAhskZZcEvy4mWjjotqT+vD20nvrrDRkIqq5LEgiIRsbNBJKhItULwwpsjbRJdVFwnWtGqCYblW35Nu3Uli/6T/hamwKKJWeyn8r+dTR+usRaqJkGYtRHAtcX68sSxt6dr3/V1cXPOJT068+JGTf9Sum+W8gSmnl1HKmxtIJAheJkge5cA19EkeUvFjvcHFp65uTDQb0oUSNPfgq0ZJYI0dpDhOZhY2ZqNKxzwQF+kYUe1g2sBI4UNx1Mr0oUUeYIo9GQDGyT2eZJVqQBOfO0gD7GoraVwAQqCbXXhUDrG/xdaBCMBZePWoT90cwXjmf/FkMublqtMspET0S5YgukXEz7LduBqnrOFIp3W4W+tt5lERIMpisDE24rkMJaU0Bi5xsp36Nb2QZpkQRWpdSKzwWyEfpr2NLqbCPDFUFlaovLery9ima9xVV/em6mx0MHfzkbziPzIxQ0rD/fyC8MG/42aJzzOBnaSr8PgQ== X-Forefront-PRVS: 0239D46DB6 X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;BN1PR04MB517;23:h5rQfE+fH/8vyAFA1Pz5Y2FX4XEAISuwu2z96JhB?= =?iso-8859-1?Q?IrffX7uip9JCS8AzK+J54+41UODX+CBd+zDiLTs6t347az2B4uWOgldubC?= =?iso-8859-1?Q?W9+LcP0RzfZdR5SsxaHTLsRRrvhSLZT7evNJyCF6eZVlfRPO+0v/mvtxmW?= =?iso-8859-1?Q?+NcJbkxT3Hc8qd/+DMyoZRBB2BSzTuBsoa660/lPIiyfS3wKbkMkpJl4zo?= =?iso-8859-1?Q?Q8psdwkWzUQxUA09LcJcEaI4+cyASQOefdfGkadIYoOP1sFFAJeIdjEcqw?= =?iso-8859-1?Q?ODKAxSMRYppFJm4GEXfvz4sALEpQB/FcVHspmhogxlpQuBufTV5CJVam3c?= =?iso-8859-1?Q?y+HeR9vZbCV6LaRsEoFK4cxQhgGVIXpzcBWPOeNxqO/41rpnGScEwXQoGY?= =?iso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ePy18sprcz/s9mCPj0L9kfD4nXX4DXhDyYN?= =?iso-8859-1?Q?d4RGcjEE8Ild2ZcsY58IwmydvqmVvd+itptkPtLnlXNkrhYa3nkMrhfU7g?= =?iso-8859-1?Q?uupc/6UPDAPe39srbVeA9gUNt5iN?= X-Microsoft-Exchange-Diagnostics: 1;BN1PR04MB517;6:/fQFMvQ0QNVsE/LTNWLc5INTwAqiplpQEfIiFf9xklLC/txmXff6qz1stNaooeK5g7hC12p6oU9SOiD110I/kNHBWonJcOowT4wQLC63nnfNNYmpZ4xQilaHzihpmeNzlYPtY9Li8NISx2by7xnQhEaSwqWWXr+koHHOSfrvvb3fD5CzMFc3AMt1z/A7rBS7rCrEfvd6OBEdetgaeIHT7xfzpT+gPtt6DnkNwey9xPO1XJWGD+56irdGo59hO4zN0Lj9JpdMd/aZdOLAW6g7MUPpHUEGGnCWDIix7Vy+q+c0LRUq258QnN0IKY/GfrQzTV16dvvYQPWDckc+B9UfB6QH3CpukrU3fWvIE9xmkzsAhriwqWn6qYcWachvI+SaBrL+ZbQz6BWsFdHPC+soOAqI01VW5cJLB0OIhN5vJlQ=;5:cOnGevkJKQYIAXzbCT0gI2tPAkXktAHzrEiSNGMUghYTZ5LHgXbCu8KYfWBigjxdAXbssTVxjJMoMTczWylqwT/BQ1Va8uBXq+xNtwxa5E5gJflMJ4Eoqrkplnu5dFqllFvs+pUBzACdF6MXLxuwIQ==;24:EDiwwnegTj63d9o1FzcFi4/fX3WYaDoLxk4QqO6/wZy1Ep52cHR/nKCcm1X4xlds+qd528A7mFSeVn4Kf58zmA6yjeyH8o1GREQ3ESgiqzg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN1PR04MB517;7:2viCQDmWq+kWQ48q5W0wcAYfbKO0ZHrYDVPmoIfO8bEBBvyYZTXGaRLxQLs9+S3wDBaZ4IBfGrk19gBYfLOT6xsZYjk9JFZfKpdmGsGBHEX6uPWDHZrmPj9Bf7l/A/VroALdqhoiEVPXotre2+wHtTB4bzQK6lN2p52AYhaHZ84l6UHNdYbYoUkbbqqeZ0KpKRNNDvnWSqmxnSE+X+7JOq7LJBtYKz4QiKlV7RdkCiEWb/BPA73epb0fNOLxrQ5/FzfdNWaPEGDeifUnLyj62Jq7VLCoNe/ZdBiBQa1xo7aaa6+mRrZUJC1irphVVYLkrpLLc6+KS0OJJvFJ30rRvg==;20:8CS1Dc95O0as9sg8IxUkpV2zJfndVVIuOTq+CzYgoJLHFFnS5KfvSQeI7X4kYvpzY/ugst8sx41FdRFTyN1MzE1hQS6f3fvVST9aMBJ+GNolT2u5zOtNd58u1jyu9jspPnrMag/ZZm5Ky6DB7ctMfLikABd2jOGLWOowCmdPWgI= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2017 00:49:17.6857 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86;Ip=[74.221.232.54];Helo=[sacsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR04MB517 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v2715eEh007995 Content-Length: 411 Lines: 20 On Sat, 2017-03-04 at 17:01 +0100, Paolo Valente wrote: > +static sector_t get_sdist(sector_t last_pos, struct request *rq) > +{ > + sector_t sdist = 0; > + > + if (last_pos) { > + if (last_pos < blk_rq_pos(rq)) > + sdist = blk_rq_pos(rq) - last_pos; > + else > + sdist = last_pos - blk_rq_pos(rq); > + } > + > + return sdist; > +} Have you considered to use abs() from ? Thanks, Bart.