Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933715AbcLMPIo (ORCPT ); Tue, 13 Dec 2016 10:08:44 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:56201 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933689AbcLMPIl (ORCPT ); Tue, 13 Dec 2016 10:08:41 -0500 Subject: Re: [PATCH 6/7] mq-deadline: add blk-mq adaptation of the deadline IO scheduler To: Bart Van Assche , , , References: <1481228005-9245-1-git-send-email-axboe@fb.com> <1481228005-9245-7-git-send-email-axboe@fb.com> <1ef97a97-d72b-a86b-1ddd-0c4c5ace8027@sandisk.com> CC: , From: Jens Axboe Message-ID: <26064b12-6434-27bd-97d2-b6a747b20a66@fb.com> Date: Tue, 13 Dec 2016 08:08:28 -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: <1ef97a97-d72b-a86b-1ddd-0c4c5ace8027@sandisk.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [216.160.245.98] X-ClientProxiedBy: BN6PR02CA0033.namprd02.prod.outlook.com (10.173.146.147) To CY4PR15MB1189.namprd15.prod.outlook.com (10.172.177.11) X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1189;2:Da5yAQY2i5k3hVoDsnHWPzXgAspluHO4iyHHJ9bSOb4a9kATdotGGsG0ykxjLFC2GR45T17zYCwOUmQMPOhoDAHzW871UtVJbD+acgAHw0iJkIfMjGFL3CQplYMZO1KTKsBooJ4Wwt+Fb13Ge7gfBeEHnKNdTse6uJ0L0y7PMJQ=;3:bGqJy3OnLpiyq7l0wr0vyGhQu5CcSlyoReNUgBgqrppPb6E6T94bxcvgHfNP+DWP7ktrgAnfcG30jhXehChS0SVtaKcqh8pD0gUg1a2mu949gNuOXKkiT267UfOXZVj3EC6p0UDsaITB+DwipSMA52yI2/zC0Xy2yPixS699hJ0=;25:G41HrBHmX6YgxXEF7oVkKaLApOA+dzmH9CbFi4Cdr0n+YJWBUkMCH0yIjlpQcWZSIN1Apal5Gub9IwaTHQ+RwMI9yrPvEM43RYPKcU/2rH3QjFgQNTpCJej+jECbyRoiFfEvyxkO/A4t8PVS0kTa+qEujyXiBrFgW8tWL1G7LJ6d0YyyxNPfXUr+TFR03YZvt6h+mQeiwn6wj3j/K2ClEnDVgIkMVCSR7w621YQFmKHrP54WWTIg3e4Bg7n4IMQMtwPsziMYCZpqlDWzXWG6eKeoo/3fT2nBSq2SNIOuaz825pxDtJHRPtGUgkDPSyJK4ZRIdmv7Ehr+nK60ziWM1XferNt1BP14xw/09nxuJQvSm3gg/Xtc2JKzKecqzKBMHZo44b+QW7UODc1Xn3ueKjihXmxnO5Xe3sqq2WSY8I2PP5fiFORvJydgfuJnPZTqrnQeMtybkN53CFrXpPVlbg== X-MS-Office365-Filtering-Correlation-Id: 50b97105-6f8d-493d-dd6e-08d42369e81f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY4PR15MB1189; X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1189;31:xPGYqsMm5eWdTRx3hWoJTMkOIFkvv3xec3dUH1bWVoyqnQ93OhNaY0lAO+NQBwdOAO16H+6+FAHUnN7+v95D/qpz8BKkTMVJgoomm8KGlsSS4+kmvJyuZmiDDiPFy82ptrcaa+Wv9aKM0ZXboiDAv4UQSWLAR2gx7RKdJFfvtHwgYOOfEdBHZvxMHD+Rf40yEkvXBHuSTYVTadmekNyxyFmoZL0NWCVnVUpF5U/JsH2l9RFgVyKjcVMLxXp27vz/;20:8NaU8biPkSgSKrvLxDC2KaoNV0Ri3B7TaqLzRJzHrHGwy7+DBph0TGCSFASRBABuVLBb7ojxIr6G27wXLV27VBlc7MnGc2KFOP0MbBDNcb+nHRAhLVXr36bhWnXolyWUHFdM/+MuRv96NPztsGA0nKzKYmBb4Fr23iEC57cLyWsmy7AGf8psfgQKCQfz2epW+N0CMhq0/urPyMJ3/ehBEgHRf8xQMjTFhmHDGDaWhieNgA9kUFKutLiU4vlHe+avO+aLdm3Lu1IFjUHYU3kL40nwhgTKgRCCq1t6tA4l1S/ag+u6LSqPjxXFrtMPK1UcezFjJqsP1RgGbZ0GUgkPEwD7te1Fj0MPmLiLxh64l2NaYXBO+Hb/nl99drkdxkrLkdFZncEnSJzv2tIkA83O0FlXRbKyG+ydiSIsyx4HBbLlLzxmJIahVsj8pG9LduIug22CCJGsZjF6UBhPAvphASKHzZQOOegOCnTzLEAhc4ACbjGR9hVm5KZUQrDE9Hxo X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(20161123558021)(6072148);SRVR:CY4PR15MB1189;BCL:0;PCL:0;RULEID:;SRVR:CY4PR15MB1189; X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1189;4:U1uCOennNCHJ4JdlU91llWs29z7RHIdY8amghTQqJnzevDTxksNQkcsQYFlpRvrJVEn1HQGd881VaGoyHQCidbULJUDB59lPtQbMwPtJHbEQfpvnkH8nqSpe3wEf6JnpQeex4kT4zTJsWTYHENlsOUaby3qmsmuhES3AytE0mugsGmKYV5QGwD3vOEflAJljTodg1Wl4TVCm1mMLcsT8kgCsXVdvFMUUNUv04yXnHvJnptLHhvVEVd+WGQZpLv5PwiKabIjXthiwDv5X5ctGHZKrtG1e/ZXEi+PMjt03kj8lMgoyvvGU1qXlyNTsOgCvQTa//WvCwYWJa9LBNcgaQDNitBdOd+OuEV5ljJAbpdGNCdq52C1gh406LwMrNvxK+16ikRCeY2gUFRV9xM1fIN0hOTiEJrj309LPO7MQEzaLQc9vLLvj2pn7sS6mtAjARUCchE+nBwuNx4B5gItMpUVYfJN3iktGVgtpAwbk2Dd9yufhRhZeU1S/cOUhOtazgEbEuGkO50zggkjYYVdWXa9pbVJGs+qW1+HHAS3utQSBlo7TKuA6/G5U+m9zCIGdBj8k/BhrzFgfm/P+Bkfb0JY3NDvIW2Bylk+HWQLCuec= X-Forefront-PRVS: 01559F388D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(6049001)(7916002)(39450400003)(39840400002)(39410400002)(39860400002)(39850400002)(199003)(377454003)(189002)(24454002)(47776003)(105586002)(64126003)(6486002)(5660300001)(6666003)(86362001)(77096006)(117156001)(76176999)(3846002)(54356999)(50466002)(31696002)(50986999)(2201001)(90366009)(4001350100001)(106356001)(31686004)(65956001)(230700001)(4326007)(101416001)(5001770100001)(2950100002)(305945005)(65806001)(7736002)(42186005)(92566002)(6116002)(189998001)(83506001)(33646002)(97736004)(68736007)(2906002)(81156014)(36756003)(229853002)(66066001)(8666005)(23746002)(81166006)(65826007)(1691005)(8676002)(38730400001)(7059030);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR15MB1189;H:[192.168.1.129];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CY4PR15MB1189;23:Vxv+YdirufcHfB1fHF/xXZeTDr+JnSXutoqai?= =?Windows-1252?Q?sZMRbHHUYGFBMGfz/QzuLcPQVvSh2+ab3046Gc6QjrJx2dxjO86eykTB?= =?Windows-1252?Q?fStecekEKjCqY4LZSi2zYLbLhktGCDU2EVYVzdoLr+DQ/1QSMPe5Mqjt?= =?Windows-1252?Q?dVPAgg7UznB95BMylDRNveBSZmKmnOt/sp2w/8zCyAhXNBYK3z0GY5yI?= =?Windows-1252?Q?d6p0N2yLLLUcvoms6ELwVyoOosisE/f6W8t7EOhaXU2y0krnlRn/YQAP?= =?Windows-1252?Q?Odk1/Irdkpr6rcCnvLoS0jTgyfyVnmdR2TNIcmqeMv7FFegqG/38kPoA?= =?Windows-1252?Q?rMl1H3XkC/iaQity0kq9zfrtOGwIl2yZEQ28B75cUFiZQy3S0/O96G1H?= =?Windows-1252?Q?xZO1gNP9n8NvhbyYGgdksDwz9BBcQ7d4RIyXyKz0AKc8gvWjJAIkwpwn?= =?Windows-1252?Q?LgA5mehPeAi1nzn9heKIM2KgHZeZ49IjRKBhNszp+xjdDbb2/6eaaZb7?= =?Windows-1252?Q?y7e3A1O4mUck0abVyL0/NZPiKofZHZZCdzgP4jJpzdhWgIeCGlTvW9ix?= =?Windows-1252?Q?wGqxa9hOi2J6WPkmVwDhOxQ1rqH6VYvBwoWeoNhU1/QYE81LpxOyfcPP?= =?Windows-1252?Q?7Wys7nMtE5KLg/DLR2BeQzRevbNXumMSJqAAkXNHWTu/9zHMOHEAtYD/?= =?Windows-1252?Q?DQEJ9qaXa+x95NYuxipFlA0BpJaa2qhzUlzk0JUhpBbhQTIyJCvBq11K?= =?Windows-1252?Q?7qvrBgPO8f6PBqpuKD2x9wnEbRKDXH0irWEobMDWAZFERt/7ELj6xwHV?= =?Windows-1252?Q?h1BqaK+6OjhLwOmaa+kikHcQu/XHmlJLrPiWLdpyhrhvJaTWAVfhMCDc?= =?Windows-1252?Q?bsZErHDMzBLiaYKZ8SEOIU4y1IkeLyb6uH4yAAiwNFx8xTPMb0hVzPrp?= =?Windows-1252?Q?udh16u8b3kLrbZtJCoeh/1hJWv/E0t8IHqLi4HB3NhHrId3934VmSom8?= =?Windows-1252?Q?LG7QhpdG6zdjawF9oJ044uvPapdjhrtfEbhzCoKjCtqMOb2o2NL32iVk?= =?Windows-1252?Q?n70rLHPnsVCd+hfrMRQF2CDC/YgmrjORtK+vlI7rixWZGJ8Aq9VQJtKV?= =?Windows-1252?Q?UZSkEtKCGq2kom2lF6pJM0D4wrrg4+SWu01FMly4/YAp5QxhEgnLpAau?= =?Windows-1252?Q?0krgzCUkanxZzAQoYsc1ilOY51K33xhAKD/Feet+BLbHnbxh6tr64b95?= =?Windows-1252?Q?sLUj+PhAYkbDLy5pvYmjUuH4braFYNNa52Sp4Kk/ijXXGWCezcq0Ly2g?= =?Windows-1252?Q?qUh+H35WHT2Ojiw0cNpo/jo8l0z91EjVB0HXANxopdlL2q3YVLpV8Lh6?= =?Windows-1252?Q?H3w+GdfozA9OqkDl4ya0szg609b+8CEd6ZEG6lx1MZDx+IDAazLiU/Bp?= =?Windows-1252?Q?ossGwAt9yNI/pjSmQuU1D/7EURKqAYWGGawYSrgD30lnxb6SFtre+35j?= =?Windows-1252?Q?LLb1TPK2CS0fPsQYe/9zyl/WziA66sdN9MPjyAOrmnYFUSI9+e8yuMBO?= =?Windows-1252?Q?Rrot6imRaxzLPhflR0CIKJuvzzjDqeA8zteaLWQVelK3S40Py7ui/4MD?= =?Windows-1252?Q?3jDx5ruKpNDC+jCphk3skxkKSmj6AvUADwPtUJKDIGOIv32fzvJM7RDe?= =?Windows-1252?Q?a+O/v9L/w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1189;6:9RSWUFJbo2s99qQn4dlKCuDfFjFTJkNEZQVq6aNp4TZmIa5emhp1HidinAbd6EoMQ5FpsOImWkTDdgkESoUIC2h4EoLWJEVfRFXw9duPo9hwm8zTCblV6jiVZmp1fDDw1Tyd3J3NTchQSUKL6tT2IzAUPeOyNJLey8X8LYRtNV2dtvOkjX7sueVOHAhzPSqwqGvtMjzjvK88KsPK99bcAK0H26/5ExOK9vbTwtPL1RW6M2nUPorDLfXvFg9ZiTKHtffb3NHDQjmI84a9gDrq+RVt/NgpItmUW72zXVxX1qRQ+wqqBtOZIPsKgjktlpj2;5:vOEAYROjx1ay0lgKXvxuSjre1keP1t4dfvodvdqCKXzH2GDchB1MKHfJcsNwNOtcECOqLBOg0vNqpfmsF10NjMQCF7vYyyd2g83Fy6r/1iSKVv967w95+p78qMO0zJrQuBTqQEQ6AX5rN0yRdhshMg==;24:oUy+uC9hQt7BT1A2EwXb1C5lx0mM+CPjcqq+upjuvzFRPy2nrFnXLc+fIeczhF/IMMRqm74LUnYQt5nb5wyYgMRtN1X4XS5Vvtyajaccf3Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1189;7:8LJDx+8jj9v1xDweGo3q0dJnzoYrisN9c2Ld9PqPrOi5f0EKXeODugRi0p1aLboiKSqGYzF57Pb9+CbO/izp5SD28GMGyg3LqoD/IXER7ahYhy+64ZpdbqDOt7jY0Dhjkc7NQalBu7MSBrUb25ikY8IiB7aaf7LsWU4hMWc/fQKSWZT5+76Kv5JUaADRl477v1bBknZ0tst5M9/tSM8HqXKiXIIGEbsTpHcSoq6Z4x3z77wQu3AwxN6XXSluBa56oxyv6Kvt31gNdIdUA5L9x6wUPb8rlKks/H9o2UpXp0puzPwABd+q+mDvrdWwNNABZowl4X4r4/+koAutPVfHif1VKAUtDCDUODvs3kg3vk8=;20:lZYHn3C5WwdbGE7FtP/rPiFbjRw5UEHSRXv3JoTpC6AHQgvxjOB45DuZi+bvRUUOkcuV1wCNvE9LrxFWFftfVppXAIp5mQ2MM6aAgx5jcdLBqe+hSQMyH0pJ62c7EGgLdBxxjts+QsfHq9TQZJ+zO6kpcTp4cdIHzi77bbIfSB8= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2016 15:08:32.7929 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1189 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-13_11:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 939 Lines: 35 On 12/13/2016 04:04 AM, Bart Van Assche wrote: > On 12/08/2016 09:13 PM, Jens Axboe wrote: >> +static int dd_init_queue(struct request_queue *q, struct elevator_type *e) >> +{ >> + struct deadline_data *dd; >> + struct elevator_queue *eq; >> + >> + eq = elevator_alloc(q, e); >> + if (!eq) >> + return -ENOMEM; >> + >> + dd = kzalloc_node(sizeof(*dd), GFP_KERNEL, q->node); >> + if (!dd) { >> + kobject_put(&eq->kobj); >> + return -ENOMEM; >> + } >> + eq->elevator_data = dd; >> + >> + dd->tags = blk_mq_sched_alloc_requests(256, q->node); >> + if (!dd->tags) { >> + kfree(dd); >> + kobject_put(&eq->kobj); >> + return -ENOMEM; >> + } > > Hello Jens, > > Please add a comment that explains where the number 256 comes from. Pulled out of my... I'll add a comment! Really this should just be ->nr_requests soft setting, the 256 is just a random sane default that I chose for now. I had forgotten about that, thanks. -- Jens Axboe