Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755164AbbKRBRo (ORCPT ); Tue, 17 Nov 2015 20:17:44 -0500 Received: from mail-bn1bon0053.outbound.protection.outlook.com ([157.56.111.53]:20832 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751702AbbKRBRk (ORCPT ); Tue, 17 Nov 2015 20:17:40 -0500 Authentication-Results: spf=pass (sender IP is 63.163.107.172) 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-AuditID: ac160a68-f790b6d00000123b-4c-564bd1af28a9 Subject: Re: [PATCH 4/9] srpt: chain RDMA READ/WRITE requests To: Christoph Hellwig , References: <1447422410-20891-1-git-send-email-hch@lst.de> <1447422410-20891-5-git-send-email-hch@lst.de> CC: , , , , From: Bart Van Assche Message-ID: <564BD1AF.60200@sandisk.com> Date: Tue, 17 Nov 2015 17:17:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1447422410-20891-5-git-send-email-hch@lst.de> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkkeLIzCtJLcpLzFFi42JZI8azSHf9Re8wg8+XdS3+7znGZrFy9VEm i8u75rBZPDvUy2LRfX0Hm8Xr40+ZHNg8ps/YxOoxsfkdu8fumw1sHp83yQWwRHHZpKTmZJal FunbJXBl/L7ZzFKwn7Ni8qSXbA2Mi9i7GDk5JARMJNad38AIYYtJXLi3nq2LkYtDSOAEo8Te +wugnB2MEq3rZrPAdMze+IIZIrGJUeLOypmsXYwcHMICthKHDhaA1IgIOEjM+DSTHSQsJJAt ceFmPkg5s0APo8TRe/vBtrEJGEl8ez8TbCavgIbEvGermEBsFgFVib3P54DViApES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XFpj1uObOL3Z7VTL78w4XKO6axLhenztj2 x+atEktxRqKhFnNRcSIAiRTHTRYCAAA= X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD009;1:Xl0ZBebbpnP+dvIqaXE2xKGYb5I+VVGCsgLKc/7Gu3bj0AO6C69cMQf0/+yxFcHzu05aAn5Yyr3KjexnqBNQ91AqpGKumJ0FgbsKzI00i67VJdJGO1sSwSQUn0A5S1umLL6C/wfN3HvkcVDzp5wbfBm7us/QN/Mw2uIP9B0r1uqIpb9OHq4sSDB2nXR2PQkv89tR4sUkqULAKc26aWL8rXN7QNd1f87Q8igJi5k90ZRdpTYIhsIX9R2U4tZOrxGmAiMlVfUqGt3ejw+uvECwyAZN/3rz8+XAepRsweNvkgS7aKp9/0Idqwwc9a3cEB0/kuAauVCOwbSi4ufZncrG3q5+NjgtBVAiYtqZkYp4dpii6NDFvBzrdZJRSI+GjYlWr8hXigf5fSWTkGLKzDj4rg51DaZHgvbefe9O3w0sAOM= X-Forefront-Antispam-Report: CIP:63.163.107.172;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(199003)(377454003)(479174004)(24454002)(189002)(87936001)(86362001)(23746002)(189998001)(5008740100001)(5001960100002)(92566002)(64126003)(50466002)(36756003)(2950100001)(33656002)(54356999)(65816999)(50986999)(76176999)(65956001)(47776003)(106466001)(65806001)(19580395003)(83506001)(77096005)(69596002)(5001920100001)(230700001)(586003)(81156007)(5001770100001)(4001350100001)(97736004)(5007970100001)(11100500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1PR0201MB0756;H:milsmgep11.sandisk.com;FPR:;SPF:Pass;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1PR0201MB0756;2:ksyyu080/G4w+6lUY7bMghNBnA2uJAzPBPCIzIo9CcfkDWQa/Gs/rgPJcvc1cK41MRM1T9O4GBXf/UoksENeKuBZYtWA77J910bVMCNZsZq2odkLHIt/uiNfysC5eFtwq2LFg/gWyrFZyOPRjFIBn6t4FwNaMHy/aAZMiPHZNoA=;3:WY0WPe71FJ42YPj7J0ONbej+USurZfHagwnpS4Wf0rCa7/wRU5RKnFEyWTCvK55D/bgJcW48A2aBLBjCmV7LNEKGgNoAUU4Biq9K6OhEnCcN6AQK/0zim/IUMY7e92VRMR0GjdSl+1fslWIZPen989JOiJ9kMbWYF5NnLl470uGAJm66TH2YO9NpL8+c1EkpdaHkcLgOyswWO9OchZuCU2aGvlTcB50HqeHmMHKU8VHuOuBUMB/Q/C045YpacoaSRBGM2mFF77QOD1d1N0X6xw==;25:40BKULh67zyEWSlxZfPWZM6Rh53vM16SpBSY70/8r94RpF6yq7z0HPKEiyIpAtwIcSuU8PM/hZDfIeN39DqZcFyX6q/ELjEfiJeXhlG8C2OytzwTL/jecnSUNRp3DQYjBMqb5+B3OLZhCS9Rg3mReYoqtkhfEvVSbfywkslH7KtkxU52u1vHmZNH/usTeGJr7QZ23WLUPuX85DIWZ2UX/8nRkq8mACFkwwt7zozC2lzNJzcOaOIQ4S6csiWgMU66BotrBLg4BpjnJrllB7OKBg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501001);SRVR:BN1PR0201MB0756; X-Microsoft-Exchange-Diagnostics: 1;BN1PR0201MB0756;20:nHvzE460MDS2f7n+wS7be1Q20rE3cU5ACBuadd3VS52gGVaRpdsXIL3GLfgTqq/NRm0z0fajzVVW+NvuSba3YO/HAXdAefpzVqWfkEUXyToznVVvNh3HlcOYtx0KZuzsH/CHPgDKH5e3Cw+S+05Qi3035pLCrk/P2Z5QwKN8DIcskOaZLZ+/LsuL9h3M6Tk8bQ6XQhYBCG58FxI34jQ10tbsG96GnsEHrDScennbiBdoYNP+7eU5nF1LZ9+EIbpXDn/I0iB9uQPp7HtffqYpB+mZp5BTp9xuZVHcrTGb/TNn99VJ+lSXhLWTs/EiXLddZfza82Eu3QwW06w4alNaE+o3NkKteZJyNGkKtRJU57XNqy9aBQ4kAALJkYqOisdascP8GdScn/q0t5Oe9txBKirRNdweBWQUpPCrz1XYIDSkgcUkA3LbFX4H92m60yAVyGBHKElxu48bxwjLGBatL1jvsB4tVjXLw6SeGcGxMZBI+RLe3A+VvbkUnAO4tG38;4:EUF37qE+t6OV2Cj2+XuwQSWZb5pAoktlu9McLXUa57KA8vTaEdkK9ltsh1m0qZh9jO5qUzEydyyqMEqUpTHY//HkLf0JQiwl3M8opHStzMzfsJVwyIMJ6Hanl+PyzrYr8pwwbrMJCIXrJWBrQv+v/2tDWi6W7QIJT18rLHFEs6B57szdRlEpzdSBjBs+THVYhnXGxwaLW4NVyeUI+UsAc8zM+Oj6Jv6+m+WXznSV/PtXLDUcGKTnrE6MnoKtaEsj1/ukexhcgyDReVIIHcZvu+Y9McgfIxxWtZ1Nd7WbpFc8zZcFnLrN92M2mtpSrBsxzLElWutDoIFKf9nUytqAe+qzUUJWyzG8Hs4GJZUb8Xw6PZG8a3VSqMWkl9I9ctRd X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001);SRVR:BN1PR0201MB0756;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0201MB0756; X-Forefront-PRVS: 0764C4A8CD X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BN1PR0201MB0756;23:ugH7KeCBTeDb9MOdfrgmT8j7gaAwy3wEBxN?= =?Windows-1252?Q?TMuuGVus2cqWg5V+wlOpTl5XCn2AScKjooHAo7KfxatL5C7OOUWcU7+x?= =?Windows-1252?Q?mzkPR1plRFo79GgYXjL+MDhVqpm2rY4oKtxQnPY7q5EjLilg4okqHY8Q?= =?Windows-1252?Q?slQ96x6ZEjGH4kEnyammP+h50c1NrMxFUaaYkAFUVSpkxzFfSZ7n/sQj?= =?Windows-1252?Q?dwnI6Uo/adZY7DJh3i5yGDzWc4eQz9xdmZDmCGToxAAjTVD2OV+ft0/Z?= =?Windows-1252?Q?iyU6u/aCxH7RoRJ4xYs6UQqM737INRSIyEjGpjJggDjLufTTDBMVXN8Q?= =?Windows-1252?Q?bUqo/TmwW2Qha5INf1OBCfjSXpiXfLmpxPT04GYAj+M7DT52LG/y2XEK?= =?Windows-1252?Q?E1+jMtwecsBzt6KXFBPCkkIsa+z9M2UKXu1fTU12FqZAjp6bhqUWdYId?= =?Windows-1252?Q?QTG+UVa16XaK0p145pgoVGasa8KPVs7p76bbfVSurFhcIBobKHn8tXyQ?= =?Windows-1252?Q?W6m/mY83s8sbIWsZkg7SRqLLO5gSu22xhUwisKAUEWZEmXHv51wu3Kf3?= =?Windows-1252?Q?Uxi5CEYg48hyzmz0WX5kdYbRGQ4XpKdjRKWBtkUW1tbWtQrkDVaS7Dq7?= =?Windows-1252?Q?yGXD30xbzIYaXw8gD48YwJb4/LLWD98L8CnMaEUE2OCwFoQwVbIQ3Seo?= =?Windows-1252?Q?oze3CFHCDqXt/rT9h0tW8cO8bFL5lbBExqpz2ivKgGb/B7LjsZqOAC8G?= =?Windows-1252?Q?0qjaU3COg1Oos/SQZJHH2U5DePE7ifqcBYjV5fEPhxCNJDfSXVb5rmL7?= =?Windows-1252?Q?SFuvwVAp8QDTKRVidGxqN+oCnWyqoXZrSwE3j3V0YfF/mCYCbY2AWZWq?= =?Windows-1252?Q?7r3ZzAkhPtX3ws5e3fvUzolxo1Qq9fGnNPKii0rMLLwv3zSkuAPSBaNu?= =?Windows-1252?Q?ZszD5/NyENcioUDiXlo0SIxy4SxNE+JoqTfwU4sGhk7pG8580jXhEsUE?= =?Windows-1252?Q?zgVzLOTQnQlo4RrXACdy9wYXleck9/YaV+vNiQmgQzAke3sO25YVhaTd?= =?Windows-1252?Q?Yo24+p+VMfOeTjcJlsXfDIjfMDYmLh3eYM8SxBz7KcOrIZn7h8PDXQTE?= =?Windows-1252?Q?wTSxZKHxTeGqryuxzC1OU++wDdOVJTB28OGf+PFrBZsWeOIo7ELneTdG?= =?Windows-1252?Q?5Wk8B5d8dANwkShsWMJ/vqXOyhYwH1tw=3D?= X-Microsoft-Exchange-Diagnostics: 1;BN1PR0201MB0756;5:2j/Lf/rutkxBoxCporMCq0CDpCdgojO2BdGV9eIByXOMH3DyRtS3wvvlbDmO/ryzA1X3rYvCqfGvQyIRhUEuBhOsDbEhzyDQPv+/B+ZPDtSiKpo1pXSFPBaoHP6EgN5RP5YhdUQ+N5VhZBcIRGJBfQ==;24:kTmUxwfHtrBS0ocABde8Q/aARrb2qkBJ7hdd/EwmUegww6nt9qHdkxh+E9MY2ojRWztnzeOOogf7HlXH29U3+T74k8SIDDTB85ndfQMfAME=;20:jvVmRMxIHbgmU/eHbM2Z6IX6zZrClRqDwparicwmHsNdwHo7a22dYlUKUSuuVGLRd+va9c8rYvYiIzyKKU3IpoxPjt5oxwiA+YR9yyUzOjwkFbOHEjOtGAwSh/lnWD8fy5KGL91o4NTDvmGMtgZVbNJVMWE4whkJDQMfqQZb4FaIyPKx8mp/ZvgXu3COm6x68SVbE4x9A+6AUFoP/ct2iwJCztpJpj3Oe8I9GhM7IJBbOpq5quS6Xud0XXnymKfo SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2015 01:17:35.9973 (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.172];Helo=[milsmgep11.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0201MB0756 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1429 Lines: 36 On 11/13/2015 05:46 AM, Christoph Hellwig wrote: > - ret = ib_post_send(ch->qp, &wr.wr, &bad_wr); > - if (ret) > - break; > + if (i == n_rdma - 1) { > + /* only get completion event for the last rdma read */ > + if (dir == DMA_TO_DEVICE) > + wr->wr.send_flags = IB_SEND_SIGNALED; > + wr->wr.next = NULL; > + } else { > + wr->wr.next = &ioctx->rdma_ius[i + 1].wr; > + } > } > > + ret = ib_post_send(ch->qp, &ioctx->rdma_ius->wr, &bad_wr); > if (ret) > pr_err("%s[%d]: ib_post_send() returned %d for %d/%d\n", > __func__, __LINE__, ret, i, n_rdma); Hello Christoph, Chaining RDMA requests is a great idea. But it seems to me that this patch is based on the assumption that posting multiple RDMA requests either succeeds as a whole or fails as a whole. Sorry but I'm not sure that the verbs API guarantees this. In the ib_srpt driver a QP can be changed at any time into the error state and there might be drivers that report an immediate failure in that case. I think even when chaining RDMA requests that we still need a mechanism to wait until ongoing RDMA transfers have finished if some but not all RDMA requests have been posted. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/