Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936501AbcKXBGu (ORCPT ); Wed, 23 Nov 2016 20:06:50 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:54310 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S936467AbcKXBGo (ORCPT ); Wed, 23 Nov 2016 20:06:44 -0500 Date: Wed, 23 Nov 2016 17:06:30 -0800 From: Shaohua Li To: Tejun Heo CC: , , , , Subject: Re: [PATCH V4 11/15] blk-throttle: add interface to configure think time threshold Message-ID: <20161124010629.GB4724@ksenks-mbp.dhcp.thefacebook.com> References: <52aae27038728bf0fd1b2b3b6536fcc28c9f2e6c.1479161136.git.shli@fb.com> <20161123213243.GD11306@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20161123213243.GD11306@mtj.duckdns.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [2620:10d:c090:180::2e85] X-ClientProxiedBy: MWHPR20CA0023.namprd20.prod.outlook.com (10.171.151.161) To BN6PR15MB1635.namprd15.prod.outlook.com (10.175.131.9) X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1635;2:NpDJW4rDbGlLIno9PU7a/l4CHuPw4bOGt0Ct84kFEazgZVFuKUasArpn7FQnVClaY0C03uUfG00Cgjs+cS9yHin11Yiyxl0Qhgv/gt5DHU1G/AEqwPVhZ0AmM0w2f0kAjsxJ64Ei3uy50YDd55e2nVCqMzAQaxHemYmTDl96IIs=;3:rPwA2+WcWcnET97bVuQgNaeGYljErXXO1xE4VMRxvgZHN2v0LEzChIe5ZMaHIez2MBs7a5GnTQhglP3O+h2LmvVUXUWu46g1+C2h0v0IwDmbyqI6fAxZrWT9XtyMxgZu+sNO6Qr4i7dha+VZaCI0rZOHO3LFa8o/jmj86u5MpTY=;25:heD9eJI/qwas55atgm6Q2satTLix+fa6vlaGv0F3pC4cpfv1i6UewT5CHU5vjnTfWa6d3SfuqfRvTOKF1zQwNXPTHDdR4AHGHPHDMlXEeFgtb7AIESIByIpXCh4jCavhKvXy53y6RSrujFeNllBYqJerjth89oNuwiYvxwQVcuTlYds4O1tYNZTJxlKv04BDcqoGbEF7omRja1jR/UaPld6VmXDbOv2WrpKMbIdCXoJDRnqimuid/N6+Uvm0tFfAPwVqvAWAtaduv6UMJle9VzyPUc+WjUIzqCdMWShKTUCTrBG90LOFyCpHibmvo3rt6Uw4FzunfKewxOUwvwPGq7+MxEgaOuhrlVkNK99RzUw8inIGVswXjEhWeSbO9vuFfiqAU6m4I8mLx2cFTEFBMpMrkvAWfXOGei8Kx4iemzm3UGjGVlKdDufhHpHxqqTa+NO9bS53pMOO36CCaM5IFg== X-MS-Office365-Filtering-Correlation-Id: f63b3b46-15c2-4d14-37d2-08d414062382 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR15MB1635; X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1635;31:O/WHpmzZ31ztZeeZiJYjqYXgpbAlvDOEt3Xk2LwSf7F7pMg4DnBIxqs9co3KzZ80c0+5G1pAkGeVJJ7pHTBf7sQ5p4RwbFb6t1Rv62pQTkir6fgMnDRF6hSuFUNVCiSMnaaUIkGUsUVgZYt0/uaWDrdkaB28/9EH832HzTF4I4ZXfM3sN5lez/PuHmT9dT1+h87eMhBx0PHi9hwnZlyfqhIuxq0vS6qmPVaptiCcyHENRF9TV1MYRDe8G7F6VxyV;20:rrrpeeLWUwNad63JZ9IorQnATIHFXhzC5Zk+0+uC6LPe+hyztMB2EUDFTgJGIu1cNbSgtN+zZDzWhycpsTnAck7sOMnkW2BrvK1ebZntS64eLzECBrG67Sk+3MH8FnEYUVOEjHIx9XW0DbQcTvFM7hLtWDEgdOap1PxKcv8MPaB0Ol7g8BW4aKvc7c3DEYmpHldEC2iAZv7DMeYtrt8LBT7HCvheO7RX6esLKSceEJk0sNNDIlpUrVhgqxdMfrtv X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040307)(6060326)(6045199)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(6061324)(6072148);SRVR:BN6PR15MB1635;BCL:0;PCL:0;RULEID:;SRVR:BN6PR15MB1635; X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1635;4:0dUfmYLtCDGAXYkKBjJmSX86vI5xrsRArWIgvVpNq9YV4DObGIhXXTkEw1pcYXPjgir+YARhn0UxH3C1xKYDLTTYSGJxqPTZImyewOCN6z4fuBcKPdqi8VLXixm5NqZVSO6b/Nowr+1f1bDUQmO9RBoRl08iRHpSgc4llYnBgCxEADXS/HeSLQXNsrC7nJIX7VyfNE7B2wHGz2wY+VRktewLrMa8UWAwoPCb5oc+vzmFZ9Kk3ui8j4YPtIu5DZBNblJmOnbKSOMu69QkKLDRlLv9fXDSmoiq8sMBXxfGs6GfHJ+5+9mW7xgwnAtPJTD2BoVSPNj/YjyT2B2qtAYewXFx//cduTrSsEbyW1Wn4eMKEhEf/HM0vQQWusGIAf0TOiWNn1JoOCFtHOd6ksKRwPBnoXUWLVyOpQJ1FTJpFkaFDV6LEc6N3+Hb8D4wLbcMh8y3u3IDLLOTVAQjwZtEwDa8ERkmq+YgUe4GVDW+y7Jpam6Y0Q/cP01P1ew6Wu+1Wlop5e6mGv3Lhxgs/8kYSpw8T9bR04SLy9qu3d+D3nM= X-Forefront-PRVS: 0136C1DDA4 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(24454002)(229853002)(189998001)(6116002)(4001350100001)(68736007)(23726003)(106356001)(105586002)(86362001)(42186005)(38730400001)(2906002)(50986999)(46406003)(76176999)(77096005)(97756001)(33656002)(97736004)(54356999)(7846002)(1076002)(7736002)(101416001)(9686002)(5660300001)(305945005)(50466002)(4326007)(2950100002)(110136003)(6916009)(6666003)(47776003)(81156014)(8676002)(92566002)(81166006)(83506001)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR15MB1635;H:ksenks-mbp.dhcp.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR15MB1635;23:BN8aWAr1Y8XmUv2Fz4DyDnuXYzR/9hB++9b59PuY7?= =?us-ascii?Q?twOkiVfgSLFZsLrRebbVlfpUDzcTWMAFDtmoNX9tDMUt5ufFHxy/YQ7F5LWu?= =?us-ascii?Q?WuhQjv6j5EW3MptakcgAy36oewc8tzD5nXD39ER6Iup0RqIdPV3gt0htRPKM?= =?us-ascii?Q?edVNFcG6WcSzd5tgJa3MSRLtAiMCfaXdayALBkOT1UoQCZlA4OHr8rHiKfrd?= =?us-ascii?Q?8wdVbfdG0SQGHA5NwqFlDsv6XeA4/5ZIcK5CqR3FJtm7sp1tV1WSG38PNhtD?= =?us-ascii?Q?Mc7AcEuhcFNKFNrQUI7xqTopA+RNwpH82IafRxv5KHIsL2Naz0asz7GFs36S?= =?us-ascii?Q?kOQp0XvI4tGSuqviz4MgJe4+ruGH3AUVWK9fROEEC5pbPqqzpvIY1f4T+NVX?= =?us-ascii?Q?+1hM+k6B/sV8K6w8hdaLqTNQk89+HgLZTYcnhwAK1pBwCuzaz3Rr/5Q5cZMO?= =?us-ascii?Q?7FC27D2lNtwD54yau0WP4q4ygyt1/mkoMs7cLXvBu8I+O3l+m8aaLJUv4qxF?= =?us-ascii?Q?ZTdXYw8f6rJCF8vm6VOyzODEsAMf4dLqAe77GXCoazQ0ECkJEYmS4cOG1p5r?= =?us-ascii?Q?Vx/hTKURELSuzqfqsTgUUY5ZDrqO4Lt4X/u3G5acjZ7u6I2zCRT1fgWFyea5?= =?us-ascii?Q?FDEaV8MbVGXLlIzqhuT5wBRA2EZWvWkGeDv2cIvBeALb4d8LS2H5F1X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FDBC6bD2s1amMLbxSxCc2BTg+W7dG7UXBpWdnZjMlDAIGwxWJ5MzPB2tNS4/g/GydQkmJvZy8L2hNWhIY7Q=;24:OoE6xngMdDHYzXEKkwknvLzashB+VC0WbNWrTqUPrGXvxmS3d9gvrufJUWzHyVnDlLAlCqITlWR/uo41iWqyDGXDk31Z4aOQ/CuP96N22m4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR15MB1635;7:psBN0Qa4Hr9g8BbKzff1ahND1rfLL7jIFDfc3nHAIE0CU1JXgHPGJ4uRVTpA6DRqnPF4QC5z+7/AFSo/TZYefQSOlEwXd9MoJBYw0k4I9AMGdl1RqOahT3W59m2IWAkW1fbmHZTCMCICiUS1ldEVFp0YdJ62WO90duIhgw9RkS+XbjMv1hhbKMPC2EwlokYcDJJi+g/1+iyI+mCgXIsxgm8SrOoBHFA8qslxkRGO+1OKDQrixfm9uGbCW4odLPY/YLbX9JMr9juercL1YGdNbfTzbqlYLitoFHu+Au0owZyrNH0tBJkMFsw1AzH8j4ttbqUBooLoCrf8LEzOyLRc/qoiAm+vhcFJHZMaE9N64dM=;20:o1lAYTWXA69vRHn7kD70edl64Lb8hHusvXVClAIL/UqMkN/kctDJb3euh1lZBNjVnvXToy3ZEV7k+AEcWcqz9TvRKwBr07dpZcIRbuLwKbr1peQ329szyjv8WpGmXwb3cYa2v4QbgEJSYf7I4W01GjpouejG2oTr+etBTuT1Tf0= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2016 01:06:35.4190 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR15MB1635 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-23_07:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1362 Lines: 36 On Wed, Nov 23, 2016 at 04:32:43PM -0500, Tejun Heo wrote: > On Mon, Nov 14, 2016 at 02:22:18PM -0800, Shaohua Li wrote: > > Add interface to configure the threshold > > > > Signed-off-by: Shaohua Li > > --- > > block/blk-sysfs.c | 7 +++++++ > > block/blk-throttle.c | 25 +++++++++++++++++++++++++ > > block/blk.h | 4 ++++ > > 3 files changed, 36 insertions(+) > > > > diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c > > index 3e284e4..f15aeed 100644 > > --- a/block/blk-sysfs.c > > +++ b/block/blk-sysfs.c > > @@ -532,6 +532,12 @@ static struct queue_sysfs_entry throtl_slice_entry = { > > .show = blk_throtl_slice_show, > > .store = blk_throtl_slice_store, > > }; > > + > > +static struct queue_sysfs_entry throtl_idle_threshold_entry = { > > + .attr = {.name = "throttling_idle_threshold", .mode = S_IRUGO | S_IWUSR }, > > + .show = blk_throtl_idle_threshold_show, > > + .store = blk_throtl_idle_threshold_store, > > +}; > > Shouldn't this be a per-cgroup setting along with latency target? > These two are the parameters which define how the cgroup should be > treated time-wise. It should be easy to make it per-cgroup. Just not sure if it should be per-cgroup. The logic is if the disk is faster, wait time should be shorter to not harm performance. So it sounds like a per-disk characteristic. Thanks, Shaohua