Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941300AbcKOB3c (ORCPT ); Mon, 14 Nov 2016 20:29:32 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:52128 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933642AbcKOB32 (ORCPT ); Mon, 14 Nov 2016 20:29:28 -0500 Date: Mon, 14 Nov 2016 17:28:58 -0800 From: Shaohua Li To: Bart Van Assche CC: "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Kernel-team@fb.com" , "axboe@fb.com" , "tj@kernel.org" , "vgoyal@redhat.com" Subject: Re: [PATCH V4 00/15] blk-throttle: add .high limit Message-ID: <20161115012857.GA17239@shli-mbp.local> References: <986ada43-3217-3277-724a-5c76f8dad74e@sandisk.com> <20161115000529.GA15160@shli-mbp.local> <20161115004922.GA16173@shli-mbp.local> <1bf8605a-9920-19ea-e2ab-2f3d747e55be@sandisk.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1bf8605a-9920-19ea-e2ab-2f3d747e55be@sandisk.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [2620:10d:c090:200::6:8ae0] X-ClientProxiedBy: BY1PR20CA0017.namprd20.prod.outlook.com (10.162.140.27) To SN1PR15MB0414.namprd15.prod.outlook.com (10.163.205.148) X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0414;2:H1bbnuKiJ2dIs14b30npHPIDQAH0EkGOKOoJ2vc/m3PgZeVFoyP4oNB0eu7/ea3B01FyZPwgyPp00PPDOMwXXe/rfSv/YzpQ3FhP4CgsTV0CLCcOfOt4km+aQjThtIbN+fJkbNBc+PM0wk724Y9OAgwaU0bewWa87kSoBT+nYYs=;3:EilTSzNNms/fP1gP9VrbTb38/y0pKouwcPUbyDI63/2h6ScBGdXtCToZ1KWAUn+NT9wKwF2ipYophDo45+IQKslEabnnNlSB2Qm8q1ntwj7koN87pjTmjajllcdz6RYEv92Kvddmf0umUhlfa6wEJ2OOgbgWRdYmH/xMBkJVKxE= X-MS-Office365-Filtering-Correlation-Id: a887ad3a-9a11-44e7-3f50-08d40cf6cbb6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR15MB0414; X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0414;25:sBZsCc86+hWSC4k0jqHHVHbpNOubBmq3gfwzxe8bsehq4aHxdfRLVwp1gvZ2U+JqV+Q2+9Stk2bAS5fai2MQNHdATvzXX+0n7eEUCNejFLNUzG1tjOR/EgSAouixJoXCGfgN4yhgmfSv9zNhfFe7IoAf9mjubjIusC/u4MzR9xxpWMCooH+AM/aOAsR8JpV1+hfOMoQsgr63XW118LAhGLtAnxkqSdcbwlRJBI+xYOSmCC+0lqfxpqaqbd/sRR5sQ7SD/SPA1b3/Z0qOFIgV+vX4RCYnJ2Q5AqOZq/gAhYOZK9KOw9pl6M8QmvmYKAqPcZ5ffACEVd/eYedFmSXY1zYB4u9YbUhaI2JBQsUdsyNExjv1BA3BFsvfgV+XcTLe10jTn2D0cQ+LvByVzF+i9jdnYIotRwuWfS7LP9AtbVgiobqJejwasrUfJj4IyeY1uZuvg+U3Jp7KSkjoPNybSVtDbh7y80XYui8KtFJdrWyoMoNHJnEFAgo9Ptu+wMGitFh80KsYaUWvXuDVQjRUwTHPy9VS7ErJ5HND7XD8dygHWO5WTByyrIGa/w2TZOAE15YZo23FtxkmA9jQg0ufX1FTsCoGe7ufkmZrbyzKZ68HqF8qjt5lwSWQGP4akfh4k2gHJPVHQhrFaBFRD0nzvr2NB5deVkXPOQ8oXhDB8jORnoj0aeSUYAb9dbexg+oPI2/Iu3I/OWQOZXwFwa5TBPREWLJeYuHEklCQSiOj/DpaIH3Fh+p3O+o124hvU3hwjlkhlX4lHbCEazAiNUnP9+1x0LsLuWttyZVXPwf6vVc= X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0414;31:FDaIvQeqStKx/HLFjqmpTPFwL3YVF/s7/a/zrcCxc21hzmlUSp2l1O1WyZhWL32HdHs+3okMc6Tv8Xu6JnXm/ZSnDKWRuJa/Ph7k2BhoAjZJ0WR5AMxTskhu1NQae73a+D/prR69lRON3Y/tCyjCnEDJFzMhNdaGJTdSq4ni1y6rconCw56j7Bl9G19gHMWCy/Ci4QC2s9Kpai6HpdrTWdS2VXuFeiJOZNQVLn7hqayE/zdJVRh23VRUBIEHCDsWgWWJcO303TwwhK9x5eraTg==;20:SFj20gZAEHwVTEu//Hp1Y9yebCnx7gz/lBoqFACMpEUGnLlVXq6ya1aUpYFM/+1dBHQ3DssRhtUva9il4LX0p4K6001vRLQyBaOurYClYkOePdfFI4QVuMNJG7vIUZdUtRWYAoYnJm4WD4d69l745v+XnIqsljTjqf/QHyxAj2Ktqwcss4HYrLzxqF2mTnohUO3PKMIeZk/mzPiqGrzy65Qc2NS+zwWvXnySliYNKUlVv4sDuViZrtPZgpJ7Pik+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060326)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6061324);SRVR:SN1PR15MB0414;BCL:0;PCL:0;RULEID:;SRVR:SN1PR15MB0414; X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0414;4:Il9YO9sWq1WgNDY8z5/5MpU24VtWoomkt+KiWsQi9tSOk0gkolN1A46o0lx48MqfJn5ScV/tjfIzNR7oVBsBXHYwKK8MXlUX/gaS0I1zFVnWKupo6yfkuUda7R/er1r6I0dkRK84oRXzX6reC0esWHc3pXaSxPrP+eGA2BNVwfRZi8LgDNO1GnFKZiQ+CFi6qMTom82wU1YXO5xdrwpdaRxLIcMN2Ea1/EcVldy4GxUinG8SW521TgT0QsHa5phhNq/ZpMBtuSV8y25ln4rtNm8L1JjKeNuzfPy8QbPBQEzqFwZmQfVuHr7bCBVnXfbwq8sQw93ltY+4Uhnq40rvNPCx+/uuetoyS/wjvUs5BqTYxtpP/oViUzZzLrZjBVWgD+FGcRvm1pv2TO/DVpVgyy7r4KNDjGS4H1m+LvAogLUiLYacjg3OpZlCG+RD+Bb33wJnTElQcQ0D0Is7fWliVA== X-Forefront-PRVS: 012792EC17 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(209900001)(199003)(377454003)(189002)(51444003)(24454002)(68736007)(6116002)(4326007)(81166006)(106356001)(189998001)(97736004)(1076002)(8666005)(9686002)(110136003)(5660300001)(6666003)(46406003)(83506001)(345774005)(7736002)(305945005)(6916009)(2950100002)(229853002)(50466002)(101416001)(105586002)(4001350100001)(42186005)(7846002)(81156014)(86362001)(8676002)(77096005)(1691005)(50986999)(93886004)(92566002)(23726003)(33656002)(2906002)(54356999)(97756001)(15395725005)(47776003)(76176999)(98436002)(18370500001)(7059030)(142923001)(6606295002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1PR15MB0414;H:shli-mbp.local;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN1PR15MB0414;23:KQb7XFiA6g8BC9j57f2e9BWqr2tZqX4C6HA/ls4+3?= =?us-ascii?Q?T/iG7bCWkDJQafb3jcZgn/ZmxVxLoJ3LO+luHCe4tijfGivMkbe8/YbHmcSg?= =?us-ascii?Q?/iReg1yHgGX6W3RiyKILnHzzX5UvC0ecbwDVvYZCLYyzaV1I4JrPy1kwki2Y?= =?us-ascii?Q?XfUNT7J8pswtZPW7PEVbjYkgGMb3Q2TBO0yeF/Na8FZx73jgUZL1GeLWhXtW?= =?us-ascii?Q?D4R90sAVIJVSGMs9q9RIsXzLpmxCb7HP6hPOOf0SpjmyR9CJ4LHP3XFAbQ4k?= =?us-ascii?Q?UNzQf8eWwQnjyF6PeHVs0vkttsk48eiybKkqSoGGJgNBdm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Vo6SJwWCrXgsPTRomQZkFPEWDt1Q7tx08XMJyDbSWAw1jmOHa?= =?us-ascii?Q?FgX9TNsnjSRjbHTp7eMCmjn/KTdii570zQ9zu0rI1ZqiURqQg8vWG83VLjN/?= =?us-ascii?Q?1XJARuMWjLnmrhm/4UotUnKYs6ppGonmbYwp4XPgQ0wCW1dyMI63t8pLuZ2C?= =?us-ascii?Q?TCF4X2XNFoZHDxPsNpHfVOKXQJYxJJ/6q6IJkjC9wlukXvg?= X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0414;6:BbB9q+Qx4QkGJa/pWkjDKOkxp/E8L7OM/rTk/3nWJy7k4QohGrS8rqZwlWMLFeenxCI1TEMaYS0nHaUk5NGCAiWkmStBm7q4nI3elBg2mke+m2Nmi6gI5oMKBrZWmSURVvto7dt4ojpbKp9UQrLxF1sa0aaPLph+/So7jl0loWWmM9qJ68JnAMMe/8Z5xsM4Gojp+1t13Il7h46zhry9/ATC4vWNX7khmty34KA7z2lYMoY7MbioWE0d9ngfvUp9WPAwgoHvVjnFT+aZl00oGxWwma3/edrftc5vEETt07gEJte0/5F6pio/XiSyXPZ41fctUSfc+fR53SfKmIFAznsX4bqGuPfRCP7Vy9oeFu4=;5:Jl9o+chnic43uKv3BIuPzwViWNPrV9YIZPMfdZyDDQUELXbgEDvv00QtmsJlhTyzmNB2mewxZ8TkRvKWdoRMAlRdY2Eq+mlyznryykbXaDw4Qb8h1zf7gGmbe5xgBWOS2Uj0KlMXCdPfovEqnhtCHw==;24:9OFg4Hh+Kg/ty7EpA++o4cVEmfNLV/fw92sAQSLyCT0qE/APBMqx3at+9EmRTpAZPA75w/9LUM6+kA7Ay4FaxYquea4bNLBTvxwmhCkNPJ8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0414;7:6PGeVa7kY0yy6WY+SSJ0ktPUbqCqEN3yPmu44kmp4gS2mzzeVMCM+9SYYad2qPJIOuNLiAsVcGQAbivAIZNrEl2hTSsBGf1897yoafUCCmxD85xFzfIQmEegPX/iEut4CB71qJz78zS7MAxowo+JAombCy3exKQGRXlyJPgkEhYH5eJTISOgfuw4h5hfcIUhhEswJ7wlWQuN7LMjoRnIJrf+t+P34IolrF8s45ARvBVwr4q0r4P9nQKUzJ+a8MiQD8dsr64gOTkvC/sBuR5lp9XjeZz9rMnEYF5zJJ97id9G3pD88BZw10QjYv6a0Jw5R/zqXjQv0J0DcFbz2wHkdIn37Mn7ttPX5K7tw5VOPPk=;20:4XfF7dOhNBx0HVP8pnnzyTtP35MZiHhVl1fI7yswLzTmUNMCNlCmVsYsiXOsggywZ4N+K2Q5LUKaQN4vnrCh62E7bc8nKdrUKGXmcoe5NhhN4/OBzV6DO0ed+ck6Gx/fdeGcUhCpyvjIYSB+t7TumEeQJwfb4zZAfqlnQKeHdD4= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2016 01:29:07.7783 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR15MB0414 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-14_14:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1924 Lines: 39 On Mon, Nov 14, 2016 at 05:18:28PM -0800, Bart Van Assche wrote: > On 11/14/2016 04:49 PM, Shaohua Li wrote: > > On Mon, Nov 14, 2016 at 04:41:33PM -0800, Bart Van Assche wrote: > > > Thank you for pointing me to the discussion thread about v3 of this patch > > > series. Did I see correctly that one of the conclusions was that for users > > > this mechanism is hard to configure? Are we providing a good service to > > > Linux users by providing a mechanism that is hard to configure? > > > > Yes, this is a kind of low level knob and is expected to be configured by > > experienced users. This sucks, but we really don't have good solutions. If > > anybody has better ideas, I'm happy to try. > > Hello Shaohua, > > An approach I have been considering to analyze further is as follows: > * For rotational media use an algorithm like BFQ to preserve sequentiality > of workloads and to guarantee fairness. This means that one application > submits I/O per time slot. > * For SSDs, multiplex I/O from multiple applications during a single time > slot to keep the queue depth high. Throttle I/O if needed to realize > fairness. > > Implementing this approach requires an approach for estimating I/O cost > based on the request characteristics (offset and size) and the device type > (rotational or SSD). This may require measuring the time that was needed to > process past requests and to use that information in a learning algorithm. > > Unless someone can convince me of the opposite I think that coming up with > an algorithm for estimating I/O cost is essential to guarantee I/O fairness > without requesting users to perform complicated parameter configurations. That's what I tried before: http://marc.info/?l=linux-kernel&m=145617863208940&w=2 Unfortunately estimating I/O cost and disk capability is very hard if not impossible. People objected using bandwidth or iops to estimate I/O cost. Thanks, Shaohua