Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757658AbcLSPVy (ORCPT ); Mon, 19 Dec 2016 10:21:54 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:53184 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755514AbcLSPUy (ORCPT ); Mon, 19 Dec 2016 10:20:54 -0500 Subject: Re: [PATCHSET v4] blk-mq-scheduling framework To: Paolo Valente References: <1481933536-12844-1-git-send-email-axboe@fb.com> <7A8A5078-E9B8-4EBF-BAB1-9E8EEBF3A043@linaro.org> CC: Jens Axboe , , Linux-Kernal , Omar Sandoval , Linus Walleij , Ulf Hansson , Mark Brown From: Jens Axboe Message-ID: Date: Mon, 19 Dec 2016 08:20:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <7A8A5078-E9B8-4EBF-BAB1-9E8EEBF3A043@linaro.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [66.29.164.166] X-ClientProxiedBy: SN1PR17CA0069.namprd17.prod.outlook.com (10.163.3.165) To MWHPR15MB1199.namprd15.prod.outlook.com (10.175.2.141) X-MS-Office365-Filtering-Correlation-Id: 2972f04b-fc7b-465e-63b8-08d428229a5f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR15MB1199; X-Microsoft-Exchange-Diagnostics: 1;MWHPR15MB1199;3:Oo1tpXKf0oVKFNk6etbYovgrPpoV93YjjumG+zbJ5wrfOv5aswf5x49SzWqabmfD67wCtCJFYYwcE+cT+KfV0VcRks+mK7q8KrUoCJG732mc57djM8b6gDCHx9pwzIuWQY60SPxWsl3IEpvAz8TElvf3EQ1KI7EZlwNXiRtQ4tYIFphUnvmcIT2miS+UczlibDeLG7ebs4WIZp+E1RlXdIU6NWYYmwXweaVJ1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twHVfZF1+Y5KylY8wvEuOkTY4/Rd8/51blz1KbPK305fh0Er3e1CDohynd0UCT9CSGoj2mF+KSXLFnellbbfK2gWpfKtS5K8OhfoDxw+6u75+/M/V5n2+rC3HbnuAZ5+YAZpOizasTLYc+QTT9pd7s2ieJFsHsnO5W+mUZUD8K/bfGYFPbNJgb5/mdlPyqeSqpQ8r2xLpZa4nSYDtIbPXKgpu2pBk1ineL62h0pn1A36xjXniBrGqmJReehOkDm0bkYHa X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089)(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148);SRVR:MWHPR15MB1199;BCL:0;PCL:0;RULEID:;SRVR:MWHPR15MB1199; X-Microsoft-Exchange-Diagnostics: 1;MWHPR15MB1199;4:1zIrZgxvQQ8ZKHgRgL3xzwns0hV/mbBx2APqicJ9Mn5kmobyURTarcMnvG3vU364iKsXJYOIjWjTjt9m52NsMAlDm/Wl7NuCClx9FylfQE76RbeD0uvnxjJhh/RybQKn38sbFKuiRiERseGHyhBeGMGO+fpGYAy7KpjQaR9Sv/aMZt8pR/9fRdSE40H5uCOmwDMeH6ppADvuhyBDuzHxOSjKfpZUPB5jxVK5TkXxyfJ1TTOTcz9MFSOoaufyUpeg1HJp8AH1UEvCwk17EDw7cDto5h6W3oIkJuoxl1zS6z+tdX3jFfFrTjjA/rFcsYRd0gWIQkNKxIYQTGnTd4FmyvFNIfK+ft+feIkiuwjTyKH6Iq1qi+rNOn2rnF5+jRdCg3igL7iP83bLfkSHaI3Rpe5XkII/7cs4Owygv0z8xcDvAyBMoP4ZR96AFP6MO/KnCH42uxRWyj5NV7L4OhSHfzBstKnqwPMlpqE43I1S9PxhGr4lODCSGP6msyvUU0tto5HoIm1Za29Eeewrlq43GlvlUasBS/PabH9YrwA8i5CCLsZ4nWfUCr2e/i4kXO7pxCUXbeWL65u54aDpcN8DuhU0OVYxCKUkuKNjDqMJj+QR9Y0oYDT2xM1FvFiLtduBELB2pKZGhVCK0YhE3yRhSg== X-Forefront-PRVS: 01613DFDC8 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(7916002)(39450400003)(189002)(377454003)(199003)(24454002)(6116002)(90366009)(3846002)(92566002)(76176999)(31696002)(68736007)(66066001)(6486002)(77096006)(86362001)(65826007)(117156001)(47776003)(230783001)(110136003)(65806001)(101416001)(6666003)(6916009)(81166006)(50986999)(4326007)(54356999)(2906002)(2950100002)(81156014)(230700001)(33646002)(38730400001)(65956001)(305945005)(105586002)(83506001)(23746002)(97736004)(5660300001)(229853002)(189998001)(25786008)(31686004)(50466002)(42186005)(7736002)(8676002)(36756003)(106356001)(64126003)(4001350100001)(6606295002);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR15MB1199;H:[192.168.1.176];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;MWHPR15MB1199;23:0KY5nz0Nq+atqZt23cHtxFojOV3KX7HniMHGU?= =?Windows-1252?Q?ySjsviLf3JciMtrDEZpjmMo4q+RHAkQKsPwi6ltMGRaLVo7p37mnqGlV?= =?Windows-1252?Q?RovJinBgoJPk6y6ukJUW6hYXeH0/T1q3Q+0hFl667rMkkQTgeb+HSBm/?= =?Windows-1252?Q?+xN7tx55YuAKI9ZWBPoJtgfRcW/95J0PaOSS9RcEk6RJ9zrZrVrigDdV?= =?Windows-1252?Q?YfAqKMBSwI3vOVMtmkYn1NGnmzySFB0u9VKEG2gskCkG5iFSPCBvOKNI?= =?Windows-1252?Q?6QOBHg+Egg5Lqa2eSc/11XKSPlf1VD/+2tT1pJqcG9SHIXIa3JwPOriS?= =?Windows-1252?Q?pFj8GTUCL+XOFc4TYGaikB9WLIvqugK2FVm0bHmRJcQw/PBPW144uS5J?= =?Windows-1252?Q?UPkaNnVryiop2u0ojvRJH/cPJWtNSfA2b0tZbtqHtgDFB1D2ZJ3gs0F8?= =?Windows-1252?Q?Bnl7ezrTkzBV3iRFOq2ZiDMJKZ7RnTpXMmPu/8MeeAeR2tJ9CC8Ru2eW?= =?Windows-1252?Q?gE3HwbJ6eoYrbFex+NCU9p88mc6ulbhoo741UahkIsTsV2If5k4LA0lz?= =?Windows-1252?Q?HTcSSLSe6PIae6tmiysuc0Wct7eyWQczBV6I7pLRfa/MuPA22gxW8a31?= =?Windows-1252?Q?Jy8PLQNhiCAxXLKz23E0jyUtyj4KaKUeex9Tn/Zi9ftkQQaovXgdEBB8?= =?Windows-1252?Q?KGXBDqti9cPxAjTS65AMv7c9hiimvhXsK1zKtaR0oQVc67mNpiElTmdp?= =?Windows-1252?Q?ofQ0bONNpa6HvebdLxToC0Z8vXzKsjxi048uGX51CN0rG8dww5Lnmoa7?= =?Windows-1252?Q?CD5NYms98CQXLiewSruaIspHDA2eSAqe6Gq02QKf02BAzYUz950cyP3j?= =?Windows-1252?Q?oYy9GUrqxOxKtRjpOzUjuo/nO4MieJBeUHP3EjAOXNKGC/veaMvTyd4+?= =?Windows-1252?Q?g9LJwF/nu0tdMvxoa7jhLvWN8ZYUzx4NfymrlfzJMsahzK7H/cklkAbx?= =?Windows-1252?Q?VN/54CLPD+KEX9YLgzhHP+kgsfxNCVEcrb1Qaig1LZX+ALh/HoJyN00g?= =?Windows-1252?Q?MhAMVPhoud41PvZVEc+coega2lCuZWnq35LuNKKO5y3DfzW4sPH6Y81v?= =?Windows-1252?Q?cRVuRUfdXGO0gjbofLKAAItIiJ3h1HTLm8l2amZ+lUFs6JmJXtKayjln?= =?Windows-1252?Q?JoM4MIr5Vbn7lrS2G5B8fZ0qP1ryjlyPv5iLSpDUs+Eo+8oE4ARu9GfA?= =?Windows-1252?Q?bFG/YgnZxiD8DXmABzyDOcwDpfSPcLn3aAiWqvOFiAp7F3qR2BGDQemU?= =?Windows-1252?Q?wLnjHfxVx3lCJW/XhFyP3dlDm4vR/X04KpEczDWtey/qGNB9mAjbhhrS?= =?Windows-1252?Q?r7UdNvEiJVi+cHwsQtjXlOnHH+/PXsYRQ0B/WYCXX8AOeAkpHOorGj8q?= =?Windows-1252?Q?LpmyXp10fitHXC2uX2As9wE9xg0wxjMapirQjrmXyxhbURGcNH3J8nWQ?= =?Windows-1252?Q?3Io+wmiug5MWu1FA/9cPNc7ll0cw4di5s+TqSuDZ1OWNjYijg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;MWHPR15MB1199;6:9WiVGUemI+NvKpCBK0Sgah7qU4+oAIeUeo776PtY6QtUiNTFO5RJGQMtxcl0LyMBZp9sMzBpPSnvA0vTvKeH/PN7+KdSkN2+orSC+e8OS2jHq3MsMQgmLpxK+vdPkZ7E8dtXQcg0oV/QXQaoLBdHwa4WyBkCxnKN+ZxbXZzl/Yewaaiew2xtk8+PFQf9t7gTDpFyVMfr9r1gbQXi/ppw5OokgTWDVnEIY+cdVFgsu+NFaa2zxJdN5CjNMlmh31yrz+dGXcDrQINiHlBo2QPwrU8yvS0dRYoIKewiWSEBgOxcNr0WN60RbQze0WPTk6YFg3WG3Nf1VgH3EjmqAPmDVVdSZno4K6DXn2QPgT3TAxGmHZzGqtxnypcYKT0fOCjx4Iy/swowZYLJrxVHmaIz0DRYRku9uhRKsURStcnoAFE=;5:g1Xns8YqGSTQb/vTrL8bhenaolhG24L+SUniHWRHZT5ffyrC1/NcWrIZjomhM47CUpR3AR1Ofrn8LC/9LYUlKTbZfeFPGwRii8ug85Pw7pZ5V2fC5RtUyBbHHn8P+l4pxHZzzqEnY52i7wXpjKAEQA==;24:xmZQV8N3lWF4v2OYMsi2kejSi1dHzWPrvscWTagKI76JVRHXe+A9j3kvjO9cQvuocR6r/JhNVCcPc8lLEjjIOne8hl4IxMoKMsEmOXezrS4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;MWHPR15MB1199;7:vjbjAjRKGo+X1kZdwesXk/W93P+3YVS1LKC0BrceQDuQpSlmKf5IlM421TDYXl0T7sH5J/v7x3Gcbd9c4XXS9ir3t40rTkQk1acgQbzpESLLkWCzJCvrfJwzmFxHoSWS8n7zMkcK+IpuHqKdyiDOKqKSr960BoPeVE7ThSy7tzJOPGe5+BAIoULjtn9l1oN7RcjDbMLB+KezzyRNeTg09jQMHAr113fnaIBKftsoV6PjDZx3VI9SGY1uhba29Cr68IwwEXUHQgZBbQmPOqYhBQi3DsXnoKnLsTWu0WC0u6mRvqDMgLs9kBnlhWenqCmWAlmPWnB2gY73hYnmJ9HWqHQxsv5droTItfNLJNrhXD2bmm+x9ijxbV+BBWYtvpz3OmuIQE+KtscTc8695iYhXri3CdX4U02dlnvJM3pGGhu/YuVDU3PHMAHi0od8SsuqNI6vD4EpuhB3oHRPQVl+9w==;20:ZZDZLPTUVELz8mqdSD10/8wyS/NfdzClaZPZUtbhzJIknU9OcTEQSdAdyKo6iacRSrpTNvSgI0la6fgkkIyu/BeXnRYLMV2prhDcGtwSl8Sb9VdljwE6COANyDaY88n58HvfqTXSGZ6VeOIXY4OiTiHcLkDb/seUBJ5iNEZNlOk= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2016 15:20:43.1088 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR15MB1199 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-12-19_11:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2142 Lines: 46 On 12/19/2016 04:32 AM, Paolo Valente wrote: > >> Il giorno 17 dic 2016, alle ore 01:12, Jens Axboe ha scritto: >> >> This is version 4 of this patchset, version 3 was posted here: >> >> https://marc.info/?l=linux-block&m=148178513407631&w=2 >> >> From the discussion last time, I looked into the feasibility of having >> two sets of tags for the same request pool, to avoid having to copy >> some of the request fields at dispatch and completion time. To do that, >> we'd have to replace the driver tag map(s) with our own, and augment >> that with tag map(s) on the side representing the device queue depth. >> Queuing IO with the scheduler would allocate from the new map, and >> dispatching would acquire the "real" tag. We would need to change >> drivers to do this, or add an extra indirection table to map a real >> tag to the scheduler tag. We would also need a 1:1 mapping between >> scheduler and hardware tag pools, or additional info to track it. >> Unless someone can convince me otherwise, I think the current approach >> is cleaner. >> >> I wasn't going to post v4 so soon, but I discovered a bug that led >> to drastically decreased merging. Especially on rotating storage, >> this release should be fast, and on par with the merging that we >> get through the legacy schedulers. >> > > I'm to modifying bfq. You mentioned other missing pieces to come. Do > you already have an idea of what they are, so that I am somehow > prepared to what won't work even if my changes are right? I'm mostly talking about elevator ops hooks that aren't there in the new framework, but exist in the old one. There should be no hidden surprises, if that's what you are worried about. On the ops side, the only ones I can think of are the activate and deactivate, and those can be done in the dispatch_request hook for activate, and put/requeue for deactivate. Outside of that, some of them have been renamed, and some have been collapsed (like activate/deactivate), and yet others again work a little differently (like merging). See the mq-deadline conversion, and just work through them one at the time. -- Jens Axboe