From patchwork Tue Dec 29 09:54:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 7929281 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DC5489F318 for ; Tue, 29 Dec 2015 09:54:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3C9220173 for ; Tue, 29 Dec 2015 09:54:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3F4920166 for ; Tue, 29 Dec 2015 09:54:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752024AbbL2Jy1 (ORCPT ); Tue, 29 Dec 2015 04:54:27 -0500 Received: from mail-bn1bon0099.outbound.protection.outlook.com ([157.56.111.99]:43714 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751649AbbL2JyZ (ORCPT ); Tue, 29 Dec 2015 04:54:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hdiHlr++B0mzuN+baHpZkQtk/Ig2JHb0znU++SDVs3k=; b=tNj0bq7NJnLRH/zALq1ImaVYOhvLJSY6Lj8ngjuGxnk44MYBY6tUPXGpDNo6mY1bPkGSaPXguT+oG6i+IK6YVWadv96nnNWJ/VlmaF8/97gtIA5StV5uJbiWVfA3GBFWgnc8FWRmU32z6KmmhCUMtse6MbgedMXA2GVgVn7u8PY= Received: from BY2PR02CA0065.namprd02.prod.outlook.com (10.242.32.23) by BLUPR02MB293.namprd02.prod.outlook.com (10.141.77.13) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 29 Dec 2015 09:54:22 +0000 Received: from BL2FFO11FD030.protection.gbl (2a01:111:f400:7c09::194) by BY2PR02CA0065.outlook.office365.com (2a01:111:e400:2c2a::23) with Microsoft SMTP Server (TLS) id 15.1.361.13 via Frontend Transport; Tue, 29 Dec 2015 09:54:21 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.173 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.173; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.173) by BL2FFO11FD030.mail.protection.outlook.com (10.173.161.40) with Microsoft SMTP Server id 15.1.355.15 via Frontend Transport; Tue, 29 Dec 2015 09:54:20 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep12.sandisk.com (Symantec Messaging Gateway) with SMTP id 92.9D.32178.C4852865; Tue, 29 Dec 2015 01:54:20 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.248.2; Tue, 29 Dec 2015 01:54:21 -0800 X-AuditID: ac160a69-f79f76d000007db2-e6-5682584c10c4 Received: from [10.50.231.66] ( [10.177.8.100]) by milsmgip12.sandisk.com (Symantec Messaging Gateway) with SMTP id 21.13.17166.A4852865; Tue, 29 Dec 2015 01:54:20 -0800 (PST) Subject: Re: [PATCH 03/13] irq_poll: fold irq_poll_sched_prep into irq_poll_sched To: Christoph Hellwig , References: <1449521512-22921-1-git-send-email-hch@lst.de> <1449521512-22921-4-git-send-email-hch@lst.de> CC: , , , , From: Bart Van Assche Message-ID: <5682584A.5030708@sandisk.com> Date: Tue, 29 Dec 2015 10:54:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1449521512-22921-4-git-send-email-hch@lst.de> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42JZI8azSNcnoinM4OB5PYv/e46xWaxcfZTJ 4vKuOWwWzw71slh0X9/BZvH6+FMmBzaP6TM2sXpMbH7H7rH7ZgObx+dNcgEsUVw2Kak5mWWp Rfp2CVwZzd+amQvaeCpuPb3B1MD4lLOLkZNDQsBE4uj7BlYIW0ziwr31bF2MXBxCAicYJZpP XWaEcHYwSpx5MI0JpuPukQlQic2MEis/nWIHSQgLBEtMW7GMDcQWEXCQmPFpJlhcSCBbomfN MrAGZoEeRomj9/YzgiTYBIwkvr2fydLFyMHBK6AlMf+2AEiYRUBV4vqKc+wgYVGBCIlFOzJB wrwCghInZz5hAbE5Bawl3rY9YAUpYRawl3iwtQwkzCwgL7H97RxmkE0SAjdZJZbf+s8IcYK6 xMkl85kmMIrMQjJqFkL7LCTtCxiZVzGK5WbmFOempxYYGukVJ+alZBZn6yXn525iBMcMV+YO xhWTzA8xCnAwKvHwZkxqDBNiTSwrrsw9xCjBwawkwuu6BSjEm5JYWZValB9fVJqTWnyIUZqD RUmc17pFLUxIID2xJDU7NbUgtQgmy8TBKdXAOGn9qeUrhBhnhze9jDrx+pFP5Z5PYbVrNklN PCAgxpvN55zhkClY0uHN0rBDafb/DRcWnH4mGcChdjNk2Y1zavUS8jyJ5Z2W4vdk+Q7eneTm 951ls05gz5u7v+qnJDX+5FtW6j91Ec+maSZ/ggUTz6tfOP189nORtjrRtwcdJgc0/013mXzP Q4mlOCPRUIu5qDgRADOrBx6VAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmluLIzCtJLcpLzFFi42Lh2siRousT0RRm0LFKzuL/nmNsFgd/tjFa rFx9lMni8q45bBbPDvWyWHRf38Fm8fr4UyYHdo/pMzaxekxsfsfusftmA5vHtDXnmTw+b5IL YI3isklJzcksSy3St0vgymj+1sxc0MZTcevpDaYGxqecXYycHBICJhJ3j0xghLDFJC7cW8/W xcjFISSwkVHiT89csISwQLDEtBXL2EBsEQE7ifWvm1hBbCGBbImeNcsYQRqYBZoYJe593QlW xCZgJPHt/UyWLkYODl4BLYn5twVAwiwCqhLXV5xjBwmLCkRILNqRCRLmFRCUODnzCQuIzSlg LfG27QHYeGYBW4k7c3czQ9jyEtvfzmGewMg/C0nLLCRls5CULWBkXsUolpuZU5ybnllgaKRX nJiXklmcrZecn7uJERzMnFE7GK9PND/EyMTBKdXAuIvx4Nwt/iZ9Ec1pRz9M6ec4OLshLDCv d0f5mr9rhad3zfB5/eN5p9ChDesvGcxJ83tspPA5Mz1FxPtV28//FY8WTLY/yxN6W0Bi47er x65IZVz8XXzGvKFUmyl9qs6eroPKUrfY3aazejo+C79hOv/Sutk+N4P39zWl/7581PnZBTHV nI4PO5RYijMSDbWYi4oTAciULWwWAgAA X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD030; 1:OCV0i1CIB1HEvgBdn4p0xIZNJ78wBoS0exsFRW0mWMI29wRYyqy7+uTWAWsAk5FDRfEf1Pire9Pw36GvjBP9csEvp5wnBXIF3wo4aXcXxeehq8xFQn3PwK8DTsjTLyt1zcCiHGubqAILogZFlCxbqb/1ow4pEXouYOxHs8LEaLnQjcuqJclyXqN59u7lLI0L94KGDAJOc6/tDZQaN2kfqSIdVYM8m55yOgIoxcosErFijXi9ns8bezIf+VblzU6UUA6lQx1atHJlNVoIMHxnAfz8Ljtk9dw/3oLQwpAVVDy5EesvIkOBnNp21kbddcYw0xiN6SMBue1YfdDJOA31TxSE8+JGD5CQ8Yo1z19I+eMSVvQOexp8okD6S4VpC4Gx+boNVCflDHqqt5kn+PA1uw== X-Forefront-Antispam-Report: CIP:63.163.107.173; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(377454003)(479174004)(24454002)(189002)(50944005)(199003)(65956001)(86362001)(83506001)(65806001)(47776003)(50986999)(65816999)(87936001)(87266999)(54356999)(76176999)(77096005)(36756003)(33656002)(99136001)(69596002)(23746002)(4001350100001)(80316001)(59896002)(106466001)(5008740100001)(230700001)(97736004)(92566002)(1220700001)(1096002)(586003)(5001770100001)(81156007)(2950100001)(5001960100002)(50466002)(189998001)(64126003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB293; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB293; 2:eQ7CaVsHMEsDucp47nGAoHzCOL+XLQ5dZslTtyjtVS5beWNJZyhqqQ1B2H1ZbB+1Og+8ZROjoazWsRxaj41bICtaEaU59YNx28h6GM9CCw9+C7sbdZta5tn9RrjfMY3U8OJf7hO2tNL3UqQefL36tg==; 3:OE5+H06gprguurh1SM73WjyHHK5DRtFLvgwtFstm+uyVXpZq2lpvGzfI5llf92gctLy0W3TfFLtE8n8lSICmcocsI7G96NTDHQKFPpJOrnqvr/RCMFuRvWJf1R5OrtEMuW5hNB+psQtm1uea6K5jx4J7maUiwocPFjup/iaQuT1hZXLN0n9S6FE3lPoh6q+gWvDWxfwS3OyMCGobgKc9vAWAHH6DsOQDyKAR8L8RZ0yyFfQOetys0dJhkDomTwBDrdondzU+0SpUUp4DAdIl7g==; 25:S0QcBJMr4NH4e7c+ds1Plp/N52ImdSZLZ+fRgSRunS/UPOQF7r7EV5IvG3QZD7bQ45ZR2lIYt6yXo3s8s7PcGsH+LALeHKZxbCSmAWNtjiXUpDL05mPVQs0StA3qjbEUyE6uQicVeU+DCAyuH7uQlPxmq20SAF4ls7IG2PjVLxMEocMFIdG/Ly0iWNpZtBNwuGmt5BQNxHR/gj05vjzRb/ESG8Fk4+M59+Hyq8W3yFQc+tdteZ66ClmfnIrb7p8scKA8MiSj7cUWYkBb1oofLA== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BLUPR02MB293; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB293; 20:M9gyBax3M+r3Id9J5PgvO1KPzcMqNDh99KXi7dNo0e2sL+ch1K4hnIjqgwF/Mu5Ntg646hc3sLkuwQ9rHTTCnOmh43tkxJ6tkjk37590M9ujd2cPYpnfUDZsslPRxPaF1DyPBVAgG9s4fqvpj7SYSyrTuXNy3++7N1oQtIn9TcQlVWhqSK25u/FhmbFCPtH7cyKibN6LcJfjH+DHelGnW9AU9LDwohziwIsGfgl0CDIBiwHXvUn8KtsNR30ZA8qdjbec5FF87odiMVUwLL5Y4GrCaH/v3Zm8vpOqX5z6qrv7uFoFFoiGK3Y1iqMui9xTQdWCx3lXhJIgM3OSqviY19kkeUhLY1/b+suFaBWFMy8dLkFsYTb9XG3P+R5SS6Oc+sZ1kCY1EWDle521WsA6TgxRr/FacDRCSROCN+897xJwvuymIrHUoagr0pqtmSVSkVeiLke7xMcnyO7LcefrLi5D9f5CWjWw5TjCKuM//Ut99rvDu4eGavr+byIYqFEa; 4:yowsrQ3vpx6fbRjHJ8IOY9sbSSp1ZjtnYYqYVHSD2ajELAK8kxcrxt2K4fYxKmOhTiMppDeik8dR6RzS8sp0kocDeKiwf3YPjXkzRBIeiPaKzVys+c8z27dwo5NqVV0n2gc+yI62pjqoj/kWNKHijhWjifllKi8Q/p8bZysKizdOyB2vOQs9zQeVALkrRaLYwyEh69TmOeawYwVem8xpEJTXM8pT8Bpo+TMqZ/Rt4pCVT0EcdYSk0OnqIibFl4rHchXeonnu/7CPXw1SFSUFc06doNQQR4l9f5F3Fma0tmy81eNl86DI18Mj4pCQTk6TsfRRi3snBcysKXGRb1qPJ7ek+J3i7qNyUl2rF03/smaIEncqbIZzwjKenMTgxbPM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(520078)(10201501046)(3002001); SRVR:BLUPR02MB293; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB293; X-Forefront-PRVS: 0805EC9467 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BLUPR02MB293; 23:d24fznRMlT90YY/h3vrVhgZnBTasm8WPMxBn3X?= =?Windows-1252?Q?j68UJolVJO4bCd/PAqcHHLohmnmYiOpun6BKHcHdeHBljxQyjAWZHFn3?= =?Windows-1252?Q?rVdNBdRZk3nM01FHvCNWArTl9+Tu70ueGr4eCJAgDP9mqNy67X6Uumuy?= =?Windows-1252?Q?zmyFpAT0eWUZ+om/t8z3CNO1HZb8kFZ6JztLRGxWjZQF6XK5yEoffnM8?= =?Windows-1252?Q?XwBFBHhuODdWxFSh1Ur7Yn8YnlNF7y4Z5vjstOW3iEDLOspaMzt7AiV8?= =?Windows-1252?Q?64i3Xurrz5/lNDCUmqIlsIk/7/dlD8HIptYC3KfT8crqEgkzQQl2StAl?= =?Windows-1252?Q?tqSiXwJym6iogmQ5Mynk1RTsaAYIQ+V5a9Q3HSjDqpaqyiFJzfCtcRD5?= =?Windows-1252?Q?axV94oEhIICOGK9rJwF4LViJ3dGi2/DI0XLtE/JViGVSpdyUw1fMyWrW?= =?Windows-1252?Q?zKvhQfpJbR3Szffv29iQTmME/8prNFebhnuk5LtlU1sZL0PwOotQPfdQ?= =?Windows-1252?Q?0MORzboXpNVn4Z1+gMGSeDUWg9bLj/lW7mKDyynVfS0XI5rf2sQGmP+S?= =?Windows-1252?Q?xx5g1BTaqFPPLltyMaRjTqVCbZhBzYODwPe1CbLUvRHXlZWmT3krflin?= =?Windows-1252?Q?vZ4grxYQk0AO8eP8yKXhBj7NkbzNxmU1ul3uEp9ZUVXx2abcX4+B88mQ?= =?Windows-1252?Q?wdj8T5j4EKZUNGQY1Zm6B3Dv5z3AGjLZSMSKfEZYA9GdZhu+P7Cm4eJG?= =?Windows-1252?Q?1+xYmFXffAREds0lY+1seiOHG4WdxP/tEkYtZP+c78IiRKF/gl8raZvS?= =?Windows-1252?Q?/pL2Lm7A2Rq1I4FZRThs+fGAhqg2CRKzNh+rXO7aveDUUt+bRVOUJiKC?= =?Windows-1252?Q?CvnYUQpTuunxzaDAkZKTzTN0npc2fMoHhLcC9PmwAIuUdZiXXAk0R/3O?= =?Windows-1252?Q?+fXtH8EmAKA4afu8iCjhekWcNwXqtyJa5UetJwMAVWm2RtCbVKXOH2cK?= =?Windows-1252?Q?rk1IMsws6+bet8NslSh+yawGwIHE0p3ZR5NRq6BoO0Pm+6fv59Vo3KpM?= =?Windows-1252?Q?rvTilJ2wCYR9bXhO5RY7BJKFoaAfS+oz+Lh16luTWRBqlq4EnBbm/qah?= =?Windows-1252?Q?LPZeDt32Sc966DtqeITwoE55PVshrauY74J5TsBQv1T2UvI/4diVp7jk?= =?Windows-1252?Q?jG4eiBPJz+ej1JwLiMfksnjqPNao75ahW7JTtAv9a9N7foloFm04KN8c?= =?Windows-1252?Q?LH7RE6ZsBp8NJSag=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB293; 5:LBtWn86JTnqMgVLvqsoxt0GwUa7qiYSq+uogHKMGXH6stqR4C+vhFyMazJbwBrhkjCy6GLDlVDl5TYV7L/oWCeegzLscp3sI5675U5un/1oATGvv0/cYYttF6+ZscxiDdDk9aRFUXNEY9VA7aI5FUA==; 24:UA4LwrqZoEl6GC90zINCuztRlNKxI+xAZbFsU10ESH9qMmjqpAE279E1PfoR9hMN5UX/1gcZP6DZkxR1WVaYmU/1bUqEAxuWCFVHb8wfIYw=; 20:IViJuzQxkdQ6a7dxcexZWJfFPnGRqKHG3TBWmB/5az21yfLwnKf8tctPeZeJ9EY9OopjMV1yEHNlqzPwDn9+2FO/t9J7+wybx1LP9yUIFdGsD3EvTJVeAmapLDKVxNNDhiXlgJj5XCZCm35EI3/tZ3NmMjytw2rj2NozwP/3Qh8+d2Dte3YcH1ktDnsGNSaEWsFI3acgBZFIKJJryJekRMGFk/0JORcBIwjyulZztNYPL8MjkOGe58rDGNXURE7Y SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Dec 2015 09:54:20.8169 (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: BLUPR02MB293 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 12/07/2015 09:51 PM, Christoph Hellwig wrote: > diff --git a/lib/irq_poll.c b/lib/irq_poll.c > index 88af879..13cb149 100644 > --- a/lib/irq_poll.c > +++ b/lib/irq_poll.c > @@ -21,13 +21,17 @@ static DEFINE_PER_CPU(struct list_head, blk_cpu_iopoll); > * > * Description: > * Add this irq_poll structure to the pending poll list and trigger the > - * raise of the blk iopoll softirq. The driver must already have gotten a > - * successful return from irq_poll_sched_prep() before calling this. > + * raise of the blk iopoll softirq. > **/ > void irq_poll_sched(struct irq_poll *iop) > { > unsigned long flags; > > + if (test_bit(IRQ_POLL_F_DISABLE, &iop->state)) > + return; > + if (!test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state)) > + return; > + > local_irq_save(flags); > list_add_tail(&iop->list, this_cpu_ptr(&blk_cpu_iopoll)); > __raise_softirq_irqoff(IRQ_POLL_SOFTIRQ); After having applied these changes the SRP initiator didn't receive any RDMA completions anymore. I could remedy that by changing "!test_and_set_bit()" into "test_and_set_bit()": Reviewed-by: Christoph Hellwig --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/lib/irq_poll.c b/lib/irq_poll.c index 43a3370..3a67019 100644 --- a/lib/irq_poll.c +++ b/lib/irq_poll.c @@ -29,7 +29,7 @@ void irq_poll_sched(struct irq_poll *iop) if (test_bit(IRQ_POLL_F_DISABLE, &iop->state)) return; - if (!test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state)) + if (test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state)) return; local_irq_save(flags);