Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755378AbbKWVzO (ORCPT ); Mon, 23 Nov 2015 16:55:14 -0500 Received: from mail-by2on0092.outbound.protection.outlook.com ([207.46.100.92]:14976 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754179AbbKWVyL (ORCPT ); Mon, 23 Nov 2015 16:54:11 -0500 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; dmarc=bestguesspass action=none header.from=sandisk.com; X-AuditID: ac160a69-f79f76d000007db2-da-56538afdb1be Subject: Re: [PATCH 2/9] IB: add a proper completion queue abstraction To: Jason Gunthorpe References: <1447422410-20891-1-git-send-email-hch@lst.de> <1447422410-20891-3-git-send-email-hch@lst.de> <20151113182513.GB21808@obsidianresearch.com> <564640C4.3000603@sandisk.com> <20151113220636.GA32133@obsidianresearch.com> <20151114071344.GE27738@lst.de> <20151123203712.GB5640@obsidianresearch.com> <56537F59.4080708@sandisk.com> <20151123212822.GE6062@obsidianresearch.com> CC: Christoph Hellwig , "linux-rdma@vger.kernel.org" , "sagig@dev.mellanox.co.il" , "axboe@fb.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Bart Van Assche Message-ID: <56538AFD.9080103@sandisk.com> Date: Mon, 23 Nov 2015 13:54:05 -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: <20151123212822.GE6062@obsidianresearch.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjkeLIzCtJLcpLzFFi42JZI8azSPdvV3CYwZR/Ehb/9xxjs1i5+iiT xfcbphaXd81hs3h2qJfFovv6DjaL18efMjmwe0yfsYnVY2LzO3aP3T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ZwExi3uaHULa8xPa3c5gnMPLPQtIyC0nZLCRlCxiZVzGK5WbmFOemZxYYGuoVJ+alZBZn 6yXn525iBAczZ+QOxqcTzQ8xMnFwSjUwcgWblMcsjvafbCI+vZLFzWX2msrr7jdafVwP7jvL vbZix8oXb7Ourr1206nw9Z+MvCmSJ58U8Fl98LMIcT41w9wyz+DVAeZpGzu89qoc3C+98cCx 3wlrdh/8vbma8/8scw9u72VsDZ1+K+82bNLd/pD1+FdtsWt/Pb9Uy38JTVrlJ9SRkzztoBJL cUaioRZzUXEiAHNGPckWAgAA X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC011;1:fIrLwEwyxPHQkdKZ5U/MuC+BXsqUSvTT7Ou7zWDaFZza05t/1MJwH2L8qXME08UgaInwC0+yl2EViskwYpFGkDL2XXLaoB10fn2Nu6uC4h9iE6jTAyXk6VBMFCoYX/8lJ6DIi5NPSoZFz2vz7xnGwfVNrIdk4P3cTYlvaDFqQzrLUrMe9VILfVjIVwNPDUiSgzInM4iRfHGu192PRlGFaQgV9PEtdR/8JGNo/Po0bjG7EJgcwMWyJyESmWC6Aj6mCeKDlw1v1VIRfj0GeH/eiB37bdl2iIE2nGohp4UtWtW5YozJKUnsRLLePpOG/H3ZBGq74SiefOuPChfCAPKvaUDCoDq/StzyADZqfoLflZjs4h70IkBIi3lMIZfnmk6BDjFjn5AYtjEg+G+sWQXaNY8Nnzo/Sy4VPMJWMKW5opM= X-Forefront-Antispam-Report: CIP:63.163.107.173;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(377454003)(479174004)(199003)(24454002)(2950100001)(23676002)(50466002)(5007970100001)(64126003)(97736004)(36756003)(5008740100001)(54356999)(69596002)(106466001)(76176999)(86362001)(80316001)(87936001)(65816999)(87266999)(92566002)(81156007)(33656002)(11100500001)(5001960100002)(93886004)(83506001)(4001350100001)(230700001)(77096005)(586003)(50986999)(65806001)(99136001)(59896002)(189998001)(110136002)(47776003)(65956001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR0201MB0821;H:milsmgep12.sandisk.com;FPR:;SPF:Pass;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0201MB0821;2:KlnOGyHJZn5TDXzniqF0WJbx0RfgLZw9zUTIPOw4B3a/rHYW3ZUwOdtGYL8Fi8M3EItczzXB/idGltMn1hLm54SmO2cf1MkqCwtkERkMjoz6GftAZjQ82ttTZUmbGkzX2kG2cNGNOJJYSq4lvsEkX+v22bDOdEegTfCH6SEQwrA=;3:vz5g2LYTLpSRoLMsb4dZPXICOPrRgb2dWcoCOLz+H2A3WdwuPX8WonPiiMgqrTdc4Uc4hMzzFS4nJdSdrQ2lhYmZNIIyeR5u/GTM+disNUQfFRzDkg9ADsWoNDxw8RBjPKORiVqyKH+QR8cH6bh8S5v6OCL3YSPFvHtPbiqcHH4aYxLSAqW3xnz8DeZf32QtbVXqud1KhSOBykiUutpznVwwTm2uWN3ziYL7pDVEnPXKfo6O9NaXPsvhIkjji3N2TZX5Txb9rQsw5wU8LVl8kw==;25:2oaLhAz+JVm4Mku7jmybESkZmy98KQuON10/2+8pIlY7XpZoIim8Us9XADwTyEEMifjmlQLcetfoBkNLDSTV8ID3cE9oLGYE4YYlNdb32vxAGTzmFvCBCbRtR+8MYy6HVuWtebhsdeXGOEDTd2GHqLbbUkhkObmbhg55j3huSKuYF1yWxSgz//Ws0YfPCBqf+qSlpRSLq89AjDerP4gtL11NFKR6bhszQRg9qkO0JJQnBWnKGVtwOr/NyZ58kY8f6nCsYYaIEJ5Xw94NWnobFQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501001);SRVR:BY2PR0201MB0821; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0201MB0821;20:0IksPzFRmtZkxdBvt0uXUxXGKpBuomywXcJMfT2x1kjM7qe3nS3Vje0ztYlLYkIBzCYXhyFNSbRXjP9FnFse5upFYBbype3j0gvnc7bvFgV331GVwPbZ7v3sb7BYYvweJTj9cwAcegVd6BQQjkmDmcSp0+B0vJL18hkllOokkpe6XJHFrIMZ+vcSoWJOMKqbrSuPIOkBqs8BU6ISqW7O+Dg1hy6p7qvkCnmdi/Zxsm473ho2ChEyQ1aKywafK0blmQYR1EvRtEya8NOp0G2+ALCAT4IwaxYmg6rp7JgdFy5XjaLncoHGLThb7KpKDELdhrNIYwVOFFYX0dXv738gMwvF8W0ViqlEECMBhLzuWL/zKvZn5C0YeQAXskQnhSW4uYzSkQUpK7imCnJWXnJhVEi/4dpY/FpfDShxSkuN4DqBizeebxe204DXnsNcF7QSPocVrf0HBNc1r1U23RSghldTEe958fY0wieNANFwxpez4VbISi6zHH4d98+5glY3;4:Hhctxu13mTDp2S5oUhcND8N8PdIS5GmshNkauq+zxaxt73Izepf0pOVHBzfciycen/QSXO2VQJxnKz7x1nhfhHNP++L8fL9Esj15+uiD1OzxQfR6x/0pk197f7tdlhkftAWu9kEvBqFSwRU50/eDsz8sWgsvbn3ZbuCWs4Bnrq2gVyXGNwz38I5nWz+AAK2BOqu5oR0wTxVYct/NQ1VzLFraAIt41uWvYdX7PnUEvTwn/t2gfq6yoqUk0pruC4gn+jPa3Uj5TtEcDBN/POrA05rYuqtBA0udo0kpXoyrJe2MupTVQMvW+IVr7sHBpv/cVk0awX38e7cAdWg14yajVohXm/pkMYJY7MX+onAtl2McG8gDHgAtzJRGbi24d4MT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001);SRVR:BY2PR0201MB0821;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB0821; X-Forefront-PRVS: 07697999E6 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjAyMDFNQjA4MjE7MjM6SkpmOEhxalJH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Y1+NsZ9GQfsuwVSUZq1vjE0QdXjqPQIuKS03nBujBk7FOc=;20:7lOxmqJnwjCfI2UfD7ridBK1poKgLtEYKTzfzX4QacigbAw8fa1DEZ9k3mokp4gE9yhiL5gz7DnyT9nZQja6j6Qh03FzlD7noWv4MMPLZFj9T5ylxnWa9MYwhflkuqc+rf2RYVoawUEOhu31Hp7Mi1pxZWkgzIiFnhQp7u3S73vKStLcdFBFj1+PzZGmQ+NZ/cTF3SSTwnO4zic8Ys6EYCzvts6357RSMLHRJf7Sj0vCrXgX0ACBqOyVFQpFizoD SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2015 21:54:05.7494 (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.173];Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB0821 X-Microsoft-Exchange-Diagnostics: 1;BY2PR0201MB1894;2:U2zwligDyBIdpvbzFn9F8a7w7PYhDkmjZCouFoFi9qv7ckps4Po3jAHv4Q7vyhCSSVaRb6ccfRvVqkt8JHFzgdEVCzjOOMTMK32G5m9k8pvq2MFSA1kTYQjDPomVxG47h7udTiZiFg8WOyZulOod/w==;23:hLLVfcOV/fNaUPbwQZdb+R+eDfKuSFFdgxG3DHnXuh66M2KaBpgkb1hziIjFnKZNz9Eo+4pNcStfmAhYf+gIEQorttcbS07lHcWAOFMZH39BuuC6iPp9p1FxCG/8ls0yZi9vKIYv38tVT+JKl+xXs2ldX0uqKqmiNo9glhQbW689i54lDTUzvsgG/7+VKiS6 X-OriginatorOrg: sandisk.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1479 Lines: 33 On 11/23/2015 01:28 PM, Jason Gunthorpe wrote: > On Mon, Nov 23, 2015 at 01:04:25PM -0800, Bart Van Assche wrote: > >> Considerable time ago the send queue in the SRP initiator driver was >> modified from signaled to non-signaled to reduce the number of interrupts >> triggered by the SRP initiator driver. The SRP initiator driver polls the >> send queue every time before a SCSI command is sent to the target. I think >> this is a pattern that is also useful for other ULP's so I'm not convinced >> that ib_process_cq_direct() should be deprecated :-) > > As I explained, that is a fine idea, but I can't see how SRP is able > to correctly do sendq flow control without spinning on the poll, which > it does not do. > > I'm guessing SRP is trying to drive sendq flow control from the recv > side, like NFS was. This is wrong and should not be part of the common > API. > > Does that make sense? Not really ... Please have a look at the SRP initiator source code. What the SRP initiator does is to poll the send queue before sending a new SCSI command to the target system starts. I think this approach could also be used in other ULP drivers if the send queue poll frequency is such that no send queue overflow occurs. 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/