Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756918AbcJGUpA (ORCPT ); Fri, 7 Oct 2016 16:45:00 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:53918 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754533AbcJGUox (ORCPT ); Fri, 7 Oct 2016 16:44:53 -0400 Subject: Re: [PATCH][V2] nbd: add multi-connection support To: Pavel Machek References: <1473950634-4299-1-git-send-email-jbacik@fb.com> <20161007183656.GE19976@amd> CC: , , , , , , From: Josef Bacik Message-ID: <1af1b85a-6d14-b9b3-69b6-96444fccd187@fb.com> Date: Fri, 7 Oct 2016 16:43:10 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20161007183656.GE19976@amd> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [107.15.72.49] X-ClientProxiedBy: BY2PR07CA0078.namprd07.prod.outlook.com (10.166.107.31) To CY4PR15MB1319.namprd15.prod.outlook.com (10.172.182.7) X-MS-Office365-Filtering-Correlation-Id: 764a92c4-8c9d-4130-b202-08d3eef2907e X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1319;2:N7Wa2Nsjt8060m5Seh095434VcksSYU9N0aMZbXmxswLN79V8iq9h9vnev1TJg88cldF2HIEkYPxAMVbuLxPY/B2xkEKyNWwG6mWGk5JwSueXJ5fxEx4hOY+TN/XKPhIwOypc2w6N2JGaxhPcBsiDa03+7zp2frDBxJsaKrdfvN+A72j3v3RsiWIlWlsPt4xlFcCzJstZxRMx3RkMulknQ==;3:DOV+zFn0MLgZkaeIZtQwzNg+GaLzDBfaRLXVCDn0B9Lg0HgrDDuoDZxlWdJcdl4EKMrghWoTSEk/h/wqhwYP8ddKvHJVIpJc1CKqg7ayoAR9T60OHjzc3zZ4IyAiwCck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2EWD691V/owo7M0JCk2eOjhpLPhpp3AWclHVT88rPT6mw9kFlWHUTlA4EhXybBSx2lsWX71CTOtfAZOv6BFMiKj+cX3x///LoONiZi6ozfBx4mO+3vebltiEy+w+pff0ajyY5Yb+Zf4kHm2nKxfdvCEKBgJUFqML0ybZK6XZB+hcz85kOBrP3nzgXFss3HVFgBy+q77wj76mvIbVLfFHf9Tg3bo4oygOm0uFX8VGCiCc9gn5RfZqV3Dpq5/QVzHsn5xok7OHVrDbzI4DSJTRoRqPcVMCtplmCigq9nHRvYkP1amYofeNj+ZdB4fWLtCF1e/+bhjL25TWMoo8X72TpxOF+zMuL9fW8YOk72Bp94di24UWFmgA2z3051dSlS24f/2iVjxmoIldvIIU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820)(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:CY4PR15MB1319;BCL:0;PCL:0;RULEID:;SRVR:CY4PR15MB1319; X-Forefront-PRVS: 0088C92887 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(6069001)(7916002)(377454003)(377424004)(24454002)(189002)(199003)(2950100002)(65826007)(6666003)(83506001)(47776003)(6916009)(97736004)(86362001)(101416001)(68736007)(23746002)(189998001)(4001350100001)(110136003)(8676002)(81156014)(81166006)(36756003)(31696002)(66066001)(65806001)(7736002)(65956001)(5660300001)(7846002)(54356999)(76176999)(50986999)(77096005)(305945005)(19580405001)(15975445007)(19580395003)(105586002)(4326007)(230700001)(106356001)(92566002)(586003)(6116002)(3846002)(2906002)(31686004)(42186005)(33646002)(64126003)(50466002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR15MB1319;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;CY4PR15MB1319;23:VMHRdNh4anIpJYI39OLx6Uxj1MtQRx7bNxq7z?= =?Windows-1252?Q?bZFogskCLP3tgiJPvYUcuGfB2ooRqaxpiz1vVVC+01YVb6y6+r5tsE7c?= =?Windows-1252?Q?r0NtVCGORXZLLSJ6UL5nr54E+Xh0hwsoqOLfdFD/2YhbP1zdm5WrzQ9l?= =?Windows-1252?Q?8QEJTDzb7Iz4Mo6/f9MU0vie+UVNTAIfo+j6DuwiIiEAq+YJ8GCLNjFu?= =?Windows-1252?Q?+bbUp8XNSXWgQY6Z1kO05UnJIfXjgMcShZ1MH2YjvS2mz2RTh7U+g99M?= =?Windows-1252?Q?ffqdlEMtZo2qNftyhSKTW/scTfP7mRXQo0rSqOcsvw1zNHf2eQ49LOdV?= =?Windows-1252?Q?NnnVI+BzWK/uYhvjWUZw7WNN2PCyamxnzlvoTWRbFmFz1rRID15NRjf7?= =?Windows-1252?Q?J8nGrfhCQQ3RpKD2Mha1qtxKYtdGPjuVWSIlzhVi6+3ZUhPgHtIRw1nI?= =?Windows-1252?Q?A31KOUfkWHWxR6UKVn7ztY8tb4NTZX1NGxyoApfL+3M8gaJEfe+f94iH?= =?Windows-1252?Q?D8TJteIfCFO/SuxpKQrqB1t8K0DXjpZjX5dqGpmoJqXaqQ5rxDMQZi34?= =?Windows-1252?Q?35AtHW2ZJD/g3PaXx1Wzplz/+3n9kosXvRIfvAiepnn28y57cjRHWNCc?= =?Windows-1252?Q?LMEmYyKqL1TG9WCs3PajhzbvQ5KgMSCTMp9DA05xpatQGpFkI9gDjzB2?= =?Windows-1252?Q?nj1bcExViWEg6BH4zIpG6BHqGS6TD5xa1Vzd2lrw8oZn1rpj3JEE9sgO?= =?Windows-1252?Q?cDxT0ITgYkyP0VpZeC7zhmB+QarZt3rDWa7VcAIfUb9+Ax+Vd7KAVS22?= =?Windows-1252?Q?Bx3zBETW+RiDiG6SYU89CXUdWqIwA9TKKLX9QPtrjmn/PaV7pL8RXkYj?= =?Windows-1252?Q?AgKw3kIWvPfKNGbvu/SYdfDT8BKkq/JlJmikc0SEBXyZxg2pBvGyaDIy?= =?Windows-1252?Q?mCuo2zi3W4JM8xxans6yE/aE3OqaBiePk4z1OiCDoDXARBNdvCX9aNsl?= =?Windows-1252?Q?I2jzqSoW+txLbupj0C61pMb5G2Fq7gYTxqteo5GpNy7708KQeBeRtgoH?= =?Windows-1252?Q?hXBMOoMFUIpGsOo05HVOOnRywl2mhH8+gMQn3pFr/LCy/Hb06w9lFAQ+?= =?Windows-1252?Q?Dmj/J0KPgJDAGYSKs6GIGdyF4LYM55GEwiJCXWT/sP755C+5/SdAdx2A?= =?Windows-1252?Q?a7NtYV2Aj8vZB4LnD7q71SXsa4VwJE1Zg0u4VnvBBZ71I3GnwFMKSXO7?= =?Windows-1252?Q?gOQCd1HHtgycO9MLnClH7vrDUs0yFl+AUUh8vvR3jujghJvWAQovNq0e?= =?Windows-1252?Q?LUet4GvgM01ZpxY/q5KH84fTP+RqLPHa//sDquxfffxfsdvvStT4EX0U?= =?Windows-1252?Q?KOUsQSQtdgGwaSOzYz4wDh0MTFZ4H8pCWde6uxBIrwVdoMCUtETlWYxU?= =?Windows-1252?Q?8OxE2JjrdiFyCCxzZsHAiFyd9ObubsnQZ5MNJdbFTI8mhmGQJkkZAjdk?= =?Windows-1252?Q?ODHZzA=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1319;6:aLTl18goOZd0h90iVMaiP7Aebx37R4k/fGuMeXWmY6sSFM2qI70EL9swcCXeQhQdP/JginrCXyzgfrU1ywIqe2UIBkRvSrpX1rVY/ibiTSmGc/PEne9wd4258UwS+BkgEAr1Ou6kcn8UJamr8NVOY+D1GBNU1v+KMTkTgWWNtbOjP/nErDKKS6d2FGpDsfGLgMb4u7xXC8GXYPspnjlcVNxeiMLL05tf94FU9cuVG/XZ/U1aHyoLft2v4X9Mh2fVrO6fhtiXLG0AzwB2slVHBuCyiHd4gLdUA4fm0ieIYyfupiihu8TWbVosAf7HNrPY;5:wVCwAymdtmGEQa1Zdbz8g8h8QdkAihqNjN3OdFx3vP6fO+E3UQMzKORTUd1PMaJWFZOgtYd/JmeYMuo9RKZsqDLP/NxBWvZIkdCX7PfHXWA2VldEpKZ3G9dELffgz7pCAvvW1iLRP1ScUVr9JLUhDg==;24:siis+wwCEM06S5Gu18HidQR2P2wbb+r3MqqXpgdnAQHrPViYftt3Eaq/7hgXYZgHSZ2L13kTLqtVOna8/SHN4ZiT/NxyKP/djeuiA2Qa/K4=;7:8a7FUiPHI1cY33KsUVpU3yBWY7QE4lxFto/AkHwqDS3Umft91JlhqwJUocRDTxLGkw/tOLLH1tzNw/ScEkKDt4wE7/8iETYqgUdK+hjD4irtAXdSUdPDDiFoX2vuX8XeQ+yqSKEFbD6mM9fe891S8317Qs6BsrNRwcIpVDDh8Scsm/Hr9IuGwRYZiHjZzG1tF7gwOyUaMkq3k3dbeVlcyUOex4K2dZJ+JFpeMV6uaUGOpdcNPA6/dzGr44kaYEhs5Yw6Fm/xJZSK6Bpz6GD0Fq0Ftfc2hM/eucni2QdVXn7ElRTip/8rKV/fsNwCaDYR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR15MB1319;20:lmlELR5DOP+Y32I+/IJMTQrI+6I0ILIgVZPS0wbG1MWGfagFz+nIsjeyVtJvBGLDLYpFJ9YvZ0u3xWJbSMo8Z2LP6IOfs82fpMVx5xn48Vy1WApwhWrYZzIBNQjHDWlWstWsnIyhfeBSSG1vWUUGjpEvqH5yTp9ecREsoCbYLEM= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2016 20:43:15.0650 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1319 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-10-07_09:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 864 Lines: 25 On 10/07/2016 02:36 PM, Pavel Machek wrote: > On Thu 2016-09-15 10:43:54, Josef Bacik wrote: >> NBD can become contended on its single connection. We have to serialize all >> writes and we can only process one read response at a time. Fix this by >> allowing userspace to provide multiple connections to a single nbd device. This >> coupled with block-mq drastically increases performance in multi-process cases. >> Thanks, >> >> Signed-off-by: Josef Bacik > > Idea is that it can now use multiple CPUs concurrently...? > > Do you have a diff for the nbd-server, too? > Pavel > nbd-server doesn't need anything special, it just works. I have a patch for nbd-client so you can open multiple connections to setup the NBD device. You can find my patches for the userspace stuff here https://github.com/josefbacik/nbd Thanks, Josef