Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965111AbcKOBeR (ORCPT ); Mon, 14 Nov 2016 20:34:17 -0500 Received: from mail-by2nam03on0050.outbound.protection.outlook.com ([104.47.42.50]:26144 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754630AbcKOBeP (ORCPT ); Mon, 14 Nov 2016 20:34:15 -0500 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; fb.com; dkim=none (message not signed) header.d=none;fb.com; dmarc=bestguesspass action=none header.from=sandisk.com; X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:3324;Count:19 X-AuditID: 0ac94371-72fff70000000ee3-11-582a60bc62b0 Subject: Re: [PATCH V4 00/15] blk-throttle: add .high limit To: Shaohua Li References: <986ada43-3217-3277-724a-5c76f8dad74e@sandisk.com> <20161115000529.GA15160@shli-mbp.local> <20161115004922.GA16173@shli-mbp.local> CC: "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Kernel-team@fb.com" , "axboe@fb.com" , "tj@kernel.org" , "vgoyal@redhat.com" From: Bart Van Assche Message-ID: <1bf8605a-9920-19ea-e2ab-2f3d747e55be@sandisk.com> Date: Mon, 14 Nov 2016 17:18:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161115004922.GA16173@shli-mbp.local> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsXCddJ5ke6BBK0Igy9NXBb/9xxjszjW957V Yu8tbYvLu+awWSzb2c9i8Wv5UUaLa7f2sTmwe0xsfsfusWlVJ5vH+31X2Tw+b5ILYInisklJ zcksSy3St0vgynj8YidbwUGeiildL5gbGJu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tH8 ECMTB6dUA+OykETh6ZmGPqvv3jlTsnXTHu2qdkeO8PvKU2eaypYyta+9dlk/89ehM5YW+SZz /87hMN6mcGhzx+HEqpgn/aad805sv2rKIKtjuu9m9xfvm1nNvWm2zCJBfv8ykxVMrydfaGpz eflNYFf22hnt9Xfzv7hsaHczufsk/rqWnoVrCv+U+oY9KkosxRmJhlrMRcWJAKMl6tQFAgAA X-IncomingHeaderCount: 19 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(377454003)(51444003)(189002)(199003)(24454002)(31696002)(229853002)(97736004)(92566002)(5660300001)(36756003)(69596002)(4326007)(8676002)(2906002)(8936002)(76176999)(305945005)(50986999)(54356999)(81166006)(23676002)(356003)(81156014)(7846002)(77096005)(65806001)(47776003)(65956001)(86362001)(4001350100001)(64126003)(83506001)(230700001)(31686004)(53416004)(6916009)(68736007)(65826007)(93886004)(2950100002)(626004)(2270400002)(345774005)(110136003)(106466001)(33646002)(87936001)(50466002)(189998001)(142923001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR02MB2823;H:milsmgep14.sandisk.com;FPR:;SPF:Pass;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC006;1:AL3JYOyN3wSBZhycjC55CGBJSWf/D9ZIE3Vu0MR7J62Hnqi0qA8Fm7e1VoukV59f+dG2pnnLV4o3r24Dc3eGfL/AlmRyt63xHpSJK11dr0G1WVvVvOElS1fessWiAXjcfRgLsCBp8yZnvJVr1b4FuVQySdRO0rsTl9C9F6hWe1R9JmgrEIo8O5K8uoCzbmW/dFOzzJSIf+WjxQ5HA74b2WT4+1zn3Q1PmEZd68Dk5G6CmIqXubgoC9jzJxYFTiV7c6Hd0JDPezALavQ3dgXCw/ko8voMkfoLKLR7tsi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Yr5V4Ch0zykJYPtADaGShI0TJtWKDD0LStvSKQGPTxFM0co/hcLOxpWVcsWXRw9pLi8OJI5IehDcboOjpxZ2YqAlMZ2XN1K25bCgGcO/4R X-MS-Office365-Filtering-Correlation-Id: 69bbcef0-171e-4638-0e55-08d40cf55246 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:CY4PR02MB2823; X-Microsoft-Exchange-Diagnostics: 1;CY4PR02MB2823;31:ScBx6PIETIynoHQNM62D3d1FYrj5F2q/BP0Rk7ltEbVT+vdrctgxHlSklSMh28sO5WFykaqgiF0YZ8zzxwXnKgOyp5DhfG+EzmXCAP68JeJnFcEV/4+pwy5HFWZplg5tOAYzxRe73PSmFhzd5jaRP6vKyF8WG6QlgYMePxmDXKdB7WjDr539/zV0awxrHAMFSBVLLsmXF0mtI4QgK6dI1WVJ7F4ysA8sSZeGpM5xpOXIWI+SITcZaar3xXKemUlJ;20:Amb4Xjw7S8a8K2dlVg4locWFCaof5Zag2w+CT188f8eoRR5q2iaa6OznNs7t5UWalp9FXaxZ7iSkOtH4P1wtJFQV4prS4ZHmW/3eoQqGEJ5keQNlwBR1G/ounuAAV+wIde1FI0EZeBMUDiM9hYbLYqNqlrEevEfcerdm8AoyX/SWICV1Ajrz/zUvoyoxShjDTMgJM8+dbhBfrbQqby5xheAzMKl6TZ4cO1birh0iygmcyyV6WzbP1fKRtsOVR80Az6wApsGRZ9mBJUT2yvjrJGTI3tZ52C02IW8pMnFi7osIJe9ujZUn9cgPEHhQ15dJZS81e5MeL1fgvcw247upqZVXjxb/pWHlsD/sa+EPeXuDwt3STQk7mx6ftKgxJv4xYOeGH53fIGbjoEGhl1hJb43jJ9gZhV7sroKFKr5zqRcyrVAmHSKITK6HrtrnQB6vF2ccPq+PcSp2LeoraJIDQejoG8pC4VCftik5LhzCXyqes3fEcfgTNuxQPp3Eb264 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)(13016025)(5005006)(13018025)(8121501046)(10201501046)(3002001)(6055026)(6061324);SRVR:CY4PR02MB2823;BCL:0;PCL:0;RULEID:;SRVR:CY4PR02MB2823; X-Microsoft-Exchange-Diagnostics: 1;CY4PR02MB2823;4:xo+0a+ojXEfLQtoEZdqQK7ctNHsRA6/UUCsFVIG1AM3Ih6e2O2WgC213Aul6FD1Jao6x2WWTka9cKXpT6WsPPagKyGLHSOEaoGGCbgfHim+Ap0afctfGJqrkjlnrpG3NMB4nUsTG0MQYrGjyl7rvRSjArSu8gCjM0GYZu3OS3NE9Ii+sEfR0l7bLiJSuMnWGenxk5MSTX5ySV5jz2n90zCNBwNYQOpa6l1xoCYUz37gNeW5nOU7bquRbGZ9PHqbi7bYhB/wDJoXQA//Rum+lENGYew0xzmNWDjlv3qhNtNlBFugnuVM5Kr7wdcBpcbjr9dmCBgENHUQJre9RG8JG0MXgKIBXC+TQC8AVy6plnWjQDsjySg84FJ5CEwe+CjYo4tyBJrS5xj9IiYKtnGPQd+2BizCTBVGJx6t3oN/9cHtv5s8rGeynWztvdKOQfttYD5J+PqbmSFdOlObZMsKs2M6LAOIllrBux6ZpFMoTdW9HIoItwqfwJE2n0GMu6/RWqoAJkXdepnRBmcdXWtvNsw== X-Forefront-PRVS: 012792EC17 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjAyTUIyODIzOzIzOkYycnc5ak0yZHJvRGg2YTQ0d1pManBoVzVy?= =?utf-8?B?QXE1K1N3Q3BybWFrUk1VcWFQTG9yekpVbTNkU2NUYmlaRnZmNVBBWEk4R0sz?= =?utf-8?B?SnZqVUZsQ1NTN2RvNlhacGhVSE1jQmJLRjJFWllqWk5qVjFBaFY1cG1UMmQ2?= =?utf-8?B?c1NNQkZLQUl6N0lLRlJxeFZRM05BS2NqS2xyZEllcnZGUENsY1FYdDBKbHNV?= =?utf-8?B?Q2VjTF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PLbHqj2OAuwQkGZ+xNh X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2016 01:18:35.2302 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d;Ip=[63.163.107.225];Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB2823 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1565 Lines: 34 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. Bart.