Received: by 10.223.164.202 with SMTP id h10csp508180wrb; Mon, 13 Nov 2017 09:54:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMYZWj62IfQOWvsE+EPAndFiujYt7ch1rRgwdHZlIoO81IUNIBWpkqREiEKOQ+TvSWrYheKA X-Received: by 10.84.252.136 with SMTP id y8mr9801252pll.137.1510595675386; Mon, 13 Nov 2017 09:54:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510595675; cv=none; d=google.com; s=arc-20160816; b=g5bQOyGNUVc9i+ZI6O6HTf5AzM+0J+p0sbXieT6ZXFoQt1tpmRlIFLHEg61TmWRHdl zK+NgD0ZrjAAHy16rLORX8J6yO+dHRhVZy0tRLRmpQT2E293Gp51iSlP/41Ig0WbC180 WeAtQMpB3Cb/EAUkjPGpT08ssltKpqhSyFgSK5C+vESDXkUtRWDkLHMriNt1fLDlzUP1 VeBvWpCSyH1Z7XJ+JDJ8G4MqV6JBCKIhqiERCHBW57xVCiidt5EqgjjMOxZtiBpAs7Nq r+lnwAPyz0q2rqfuVtl3roUB+KT675ndZkTQx8sc7PcqqM12DJQHxEQ5//I/6HQfscbb n0Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=2VuTAxeuHoX07kJ5pvSpAFmuilb7g7sA7x+epHk6mN8=; b=VYvshP9W8ygQ2rqww3FDW01wlYsDp5Sgq1VvyFc2L8t4p6Xg6n0ZIgVo4lwwFNyxlZ DM00mGhVvbjw1lFd0TLCRHo4MtATiy/fxLQZ/Um6adAs5CWKdWLp3E1a1SNh0FyBm76q FgSVyygjEDERZWHsh+Ig9rHi/DZXDpQEIn/c42jwFSe26j3TGjKcC/XTjwz0Ecfr+yFI pfbixJep7yMcwBo0ntORZn2aMIVoRH7DxEUjJ98qeZNO0cJq7QQN8ef1eZAgGiZ0MBER U7eQbaHpPsEfHw5gr4s6Yf9cpUP7tbxkkCYHkXggEjseUNU30EVnUylnOvW4tfh9UU8e SEBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=dScIVlWZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t70si10883426pgd.13.2017.11.13.09.54.22; Mon, 13 Nov 2017 09:54:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=dScIVlWZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754291AbdKMRxe (ORCPT + 88 others); Mon, 13 Nov 2017 12:53:34 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:46466 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754270AbdKMRxb (ORCPT ); Mon, 13 Nov 2017 12:53:31 -0500 Received: by mail-io0-f195.google.com with SMTP id n79so10649993ion.3 for ; Mon, 13 Nov 2017 09:53:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2VuTAxeuHoX07kJ5pvSpAFmuilb7g7sA7x+epHk6mN8=; b=dScIVlWZ+Ll2nXTMGTCQ1o3Tvz5vmX0DL2dEd6Y4qAaJug2emXaPCFlUFx4BmNgX+K 0zlQgjYr/41AMCiu4VqDo342JXFPnw+8zyIJxz4G5bd/q9OGHe+6pi1fpO4CBK5PoxWK pyk8QblkCzTv4xAElLPfMSc9FDYEODlp11fUD7JJLTNSUvtb8q4JIsN91SESPnuCmre1 JnDXJteOAj7v24ATFtXZJLopqOL+EA4GFSQ6wMCzHLyojFNYAhaXvybx6fEBgcashA7/ 8BhM96jqxCSf+2YHb82ZV2ydxdBRs1UkFhCTi8sRvIz8pKvxTn6kY9lQOTl73efKBvId YFVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2VuTAxeuHoX07kJ5pvSpAFmuilb7g7sA7x+epHk6mN8=; b=okqe8gIUzoGHBW53bZg7RJXWX7QkGBDgzidYkwThr0+vK7hKiV295jh0ef5Ln0E98p wqCY9+OXpP2iDdipDyZZTiIKNJ5Uq20xRfIJRZpnsXYUJd984yJG3fpx3BfIFuhEDDDS hR/6q4aUr1T03sf15eSOoq7l7q2dBrKw3P67zfdUu+KzNNNLBCNEFlcPY1JiVQed/zZ9 I0bMG9M/+TC+JnOJwbpC0MjhBWrahSvSLonmUKqsdUMcP3hBsch709DcND4Sr7KUZkCK 3ME82f/CnNo8YmDwC8vNHHUtbg2BEuC82TGckERTMVi/WR4HxPjR6471Rop/kkPV72Ft VqyQ== X-Gm-Message-State: AJaThX7sSOvM8MAEZex4q3wx7vX0GFj9HnjUYjmkx1s/G3XXbOB76vd8 1q1fXSmMadwKlZ5tTyx6gPwYSA== X-Received: by 10.107.8.32 with SMTP id 32mr7996559ioi.200.1510595609838; Mon, 13 Nov 2017 09:53:29 -0800 (PST) Received: from [192.168.1.154] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 79sm4485519itu.7.2017.11.13.09.53.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 09:53:29 -0800 (PST) Subject: Re: [PATCH IMPROVEMENT/BUGFIX 0/4] block, bfq: increase sustainable IOPS and fix a bug To: Paolo Valente Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, broonie@kernel.org, linus.walleij@linaro.org, lee.tibbert@gmail.com, oleksandr@natalenko.name, lucmiccio@gmail.com, bfq-iosched@googlegroups.com References: <20171113063410.3029-1-paolo.valente@linaro.org> From: Jens Axboe Message-ID: <6723bae7-4b0d-da0e-fe28-e0b7c12f6038@kernel.dk> Date: Mon, 13 Nov 2017 10:53:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171113063410.3029-1-paolo.valente@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/12/2017 11:34 PM, Paolo Valente wrote: > Hi, > these patches address the following issue, raised and > discussed in [1]. > > BFQ provides a proportional share policy for the blkio controller. In > this respect, BFQ updates the I/O accounting related to its policy, > i.e., the statistics contained in the special files blkio.bfq.* in > blkio groups (these files are the bfq counterpart of the blkio.* > statistic files updated by CFQ). To update these statistics, BFQ > invokes some blkg_*stats_* functions. We have found out that these > functions take a considerable percentage, about 40%, of the total > execution time of BFQ. > > This patch series contains two patches to address this issue, namely > the patches anticipated and discussed in their main aspects in [1]. > > The first of these two patches is patch 3/4 in this series: it enables > BFQ to execute the above blkg_*stats_* functions, where possible, in > parallel with the rest of the code of the scheduler. With this > improvement, the maximum request-processing rate sustainable with BFQ > grows by 25%-30%, depending on the CPU. For instance, it grows from > 250 to 310 KIOPS on an Intel i7-4850HQ. These results, and the others > reported in this letter, have been obtained and can be reproduced very > easily with the script [2]. > > Unfortunately, even after the above improvement, blkg_*stats_* > functions still cause a noticeable loss of sustainable throughput. To > give an idea, on an Intel i7-4850HQ, if the update of blkio.bfq.* > statistics is not performed at all, then the sustainable throughput > grows from 310 to 400 KIOPS. This issue has been already discussed in > [1] as well. In brief, we agreed to make a further commit, which > introduces the possibility to disable/re-enable at boot, or at > module-loading time, the updating of all blkio statistics for > proportional-share policies, i.e., of both those updated by BFQ and > those updated by CFQ. > > We are already working on that commit, but finalizing it will take > some time. Fortunately, following a suggestion/recommendation of > Tejun in the same thread [2], it is already possible to drastically > increase BFQ performance, when no blkio-debugging information is > needed. Tejun's suggestion/recommendation is to move most blkio.bfq.* > statistics behind an already existing config option, > CONFIG_DEBUG_BLK_CGROUP. Patch 4/4 in this series does that. Thanks > to this change, if CONFIG_DEBUG_BLK_CGROUP is not set, then bfq does > attain a further boost in sustainable throughput, which ranges from > +30% to +45%, depending on the CPU (some figures in the > documentation). > > The above two patches are preceded by two preliminary patches. The > first updates the conservative range of IOPS (sustainable with BFQ) > that was previously reported in the documentation. The patch replaces > this piece of information with the actual, much higher limits that we > have measured while working at the above two commits. The second > preliminary patch fixes a functional bug, related to the update of the > above statistics. > > We waited for one week of testing from bfq users before submitting > these patches. We hope we are still in time for having these > improvements and fixes considered for 4.15. Usually I'd say it's too late, but I knew this was coming. I'll get this queued up. -- Jens Axboe From 1583931763362862042@xxx Mon Nov 13 06:37:21 +0000 2017 X-GM-THRID: 1583931763362862042 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread