Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932948AbcLMJaT (ORCPT ); Tue, 13 Dec 2016 04:30:19 -0500 Received: from mail-by2nam03on0055.outbound.protection.outlook.com ([104.47.42.55]:36243 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932301AbcLMJ37 (ORCPT ); Tue, 13 Dec 2016 04:29:59 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Bart.VanAssche@sandisk.com; Subject: Re: [PATCH 2/7] blk-mq: abstract out blk_mq_dispatch_rq_list() helper To: Ritesh Harjani , Jens Axboe , , , References: <1481228005-9245-1-git-send-email-axboe@fb.com> <1481228005-9245-3-git-send-email-axboe@fb.com> CC: , From: Bart Van Assche Message-ID: <71656abd-f737-6548-9e07-a899e33fcd9f@sandisk.com> Date: Tue, 13 Dec 2016 10:29:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [178.117.55.239] X-ClientProxiedBy: DB5PR01CA0014.eurprd01.prod.exchangelabs.com (10.162.149.152) To SN1PR02MB1694.namprd02.prod.outlook.com (10.162.129.24) X-MS-Office365-Filtering-Correlation-Id: c25413fa-24bd-434b-c1e1-08d4233a9761 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR02MB1694; X-Microsoft-Exchange-Diagnostics: 1;SN1PR02MB1694;3:devFQqwlquo0oyT+Vc4Tv8Vr/KoMXq7e5inFFJFEm0FWFNCbsx3reofoNHWxE2UgpBdCs+h8DhmxUZw0wU31/gNhIiHWliC6u61rFAP6Hfth21TAteklg+lWFwB00sqqyQA59KQI7u5MNODAkDDNBC1FmegFRgEj8wUkAEaIqFhvyygdMI69qbdw6qAj9Ey7zo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sC+5mMIkboFrUBvm6zPDtFomxZCdUn2Obbu9mB/KrvCEmDmRTf8QZ2YgGsJbOae1K7pOShBv+/m1e98nCp63IFWghAYolLnyFuDDB0oovHVo5JZhwdqT/b81YcdpMvBrRLXUKM99WKnBGamYRkvm+88Qf6hxcI5yQoNZBUEAW8a6dxdcgTAlkMXKdMlTxEZiMFDRomyoRtG4+5ayZZFtQYSWtU1d5VcWb2a6LU8CP4oMcPHziSJCFUXTtjJsHMgB6crv58pFqYJO1htvq3GV7DybZ5/9KLCd31aeLnQSggQY6095MoFkYhSd5MF8FLLJBWRJD 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)(3002001)(10201501046)(6055026)(6041248)(20161123558021)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(6072148);SRVR:SN1PR02MB1694;BCL:0;PCL:0;RULEID:;SRVR:SN1PR02MB1694; X-Microsoft-Exchange-Diagnostics: 1;SN1PR02MB1694;4:BbhTmjD1CEUrJYbSvv8RG3XjSzUTDLZQhxZQIGwzADz4nK8TV6fpq/kkQswprNAkYaZwvkcEHa2SL0ajw71teN5ghaQaPWKXvrVsVvnuW+Cd4/EsWqwliXiUaFYVar/85D/yxLHeDqyiGTiAqlBtVpGZbgtQaP/zkUb8fEfpNv0q7sKKIXFfMzxeMnzUiyuk6iuTLR1yIQNDxozanFcTs8z+U777pReeebx0gIkDpQpamIr2QrZEfsLQB4D/5LzrWyMPB3FWtzPutRR0KeqDUoBdr2X+AiAfrLzdY7hZYm/sfobSuRrKjmpKVtYKK+92ENGOLNl6oC4M7gv3ZPUrQe4vFiuLHCrRHwD6mUQ9C8r5sfvddGWH4cw+ed/Dy3uwSBzae8oha+Y15ZW3eQ+lKesM1LmsAxA1T5nAn/RQicxwzxY/aZBA+lAGXjY54i68e7iwHrt1jZ76JFY8mYm7YlhfnAxaMtD/0wANpxM163Vx7R3+6EipanOYPgdGscQw/j44guYK7yRPMrV9F4XeEbj5wtK7CIGGOFd5eln4BQ8RKeDodr/ZWw91m0SllNkDPD2lL9hcLQ/q37wLfLx80k83z/ImsLcFvv/PCyllxQdU5wup8iNnqBIxoXAfyoRg X-Forefront-PRVS: 01559F388D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(39860400002)(39850400002)(39410400002)(39840400002)(39450400003)(199003)(189002)(24454002)(377454003)(81166006)(97736004)(81156014)(5001770100001)(189998001)(4001350100001)(5660300001)(68736007)(76176999)(50986999)(229853002)(6666003)(53416004)(6486002)(54356999)(101416001)(92566002)(2950100002)(38730400001)(33646002)(23746002)(65826007)(64126003)(31686004)(50466002)(65806001)(305945005)(65956001)(47776003)(7736002)(66066001)(42186005)(105586002)(106356001)(36756003)(8676002)(69596002)(6116002)(86362001)(3846002)(83506001)(2201001)(2906002)(31696002)(230700001)(4326007)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR02MB1694;H:exp-402881.sandisk.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;SN1PR02MB1694;23:4RizqxxFYsogtkBxPdOFxqV/gODAuBFEMS4N5?= =?Windows-1252?Q?HlyuL4DDtrN+9A6xHt1YFStBiTtxn4jzze0MZhiuBogHwGC6789O8cE2?= =?Windows-1252?Q?PaC1mY66eq42EFuHTliMoSVuQNEpn+qaNEZH7YDNAALBCp9xv9ifPPbv?= =?Windows-1252?Q?Iasdwp1LY7QDNx0CNp2pFQh6LE8m1GS7tiwCJGBFsh0s2ucSOMdpIXKR?= =?Windows-1252?Q?i241eXHrllCKQihufPXZeAUOw6T9r9fu/mrzgBpgIk8KzV1neVTtJc8C?= =?Windows-1252?Q?eyxJ11c6GM+GhHUcYYPUbL2TRlZOT02e/YceBa/PpDl3kXugzzkwO7J9?= =?Windows-1252?Q?jZpEM2xwLt8i+QO65NRm9JhCpZwYLrIqDnxTczl3UYgkydx2bctHC2hF?= =?Windows-1252?Q?Y4kBT+rb3Z8TYmPWmSwQ2Hc2hvNs/vj+HWwuySx5P3h/yr4YINYHJFFv?= =?Windows-1252?Q?yDoQ4gVCG/NZlUsGuPKU2KVVsL0JR+I8SbskkNFESELIJlejbTULnn3B?= =?Windows-1252?Q?6b0Js0hXyXA+EXy9KOh8Henyj22JhxejTVP64tyGYSvkug+fOI75vDfv?= =?Windows-1252?Q?TOOOUGmhSmFiKamVmkshekZU5PLvzV07RmqgbDBOT9vFvbXEaNdA+D/+?= =?Windows-1252?Q?Ew75zzx4XNGz0B6mDDRuNNOGIAqMuakSCdZCVgwpc9udkG+iiyg+Hx+b?= =?Windows-1252?Q?j5122fTovtZdUzfJm6D3Bo/dHHLatTKv5GDfLcDlYkihyDbgEGWLewoA?= =?Windows-1252?Q?T1QqXyLQSZDFpJIUSBDMY5Yk8rAxRXC6RpJEPgoCZrPn/7KtHZZuQfs/?= =?Windows-1252?Q?13LE0h3KO9yT0St2/qwd/z3tcX4Zt5q2Hw1E4NrQy8JSwWr+AKShNa/d?= =?Windows-1252?Q?RVrlAyuINbgzDI3/UKEm5KWJefiV3dno4afcQrbXQvpW+vuaWVgpDuBj?= =?Windows-1252?Q?Q7TrHAM3uyDPx1zfgXMd3bfMXOK3q4udwayik3z9qN+LZ2VtMbvBmyci?= =?Windows-1252?Q?qVlTfHkTgYo4ibyYMTdD2oU9uXxPQuoejwYIf5Umb0XKTNhg18P5ONmK?= =?Windows-1252?Q?UlKB6Mqom8i0CTVfF1PygM8biDHWtC8IvHswst5W2+OpaFkR+OfVb7Gr?= =?Windows-1252?Q?AbNSXm3mk+9lWDeLutrnRJwuBGzGB4AXAT628yJ0sNzSRvdBDmxIoAQc?= =?Windows-1252?Q?Yk4qeUTNTx2WhRrdei28NhQw623omJmCjXEOj0z4k2TezueUlGGnClrH?= =?Windows-1252?Q?afJqXrGlc7xFzDXc21GdNybfa0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MAQWVl1Wk/l5YTofVstvV91kSpeQ7xwDrvv/u2r6dLU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN1PR02MB1694;7:13OVg31+JHbtBVDLyd9kbjTblUQ7ZNcgwWCW/DHINdmX8TgQxA2l7V9xqOhivMXkbTjnADye2tXWQ6fqDOeaQS3oFBmB8tQ7klW+QQXE2Me1HDAJYuhPQeALaDggsdVElF4B2su8qyFm9vwRqM5DH5CAmt3mgj5MKNhkvqOnKrsG2KtsQJcBJwDcIyIgTltNikyOcrm3jSy82vwn/NIwKSW8515ZIWMIDfiZK/1ixdSkRfDsYGDABaQsajOOAOTdHyRLoRPMKmLrPcUXMJzrQFo11WwaczVcM9ViNzkp5jILxHCXPP5zI+CiQwjkSUVES/rsfQNVvJx34+xxy6OIaoLY2aQBdHKMRCnmVTb+wW6JFT1M2s3D8U67RSlR0b6/0uRqUQLDGwzbC+2kq+bQmu7D3k83QNCrar2nN5xSEDZsCnkChQHkNZydnne4DKlnDlL8CNqcJjM+jN13AaE5rA==;20:awJkRXc0Cq+E8d/z+OekVIuXA2ElW+WExgq5wQxt/8wYUgQRC0TrBusfw0DfK3fiLm+RBdz8wmXsY7b2B7B6vLq2nc4w9Xqaa7npL9eMSlFaSxQubd80bYJw61zDb2lzcYpFJLa5MTZWwUSGPAsQ5F9ibrsixOey8ZH3y2+oxYPxkSduXgRk9a+01OaEvG3Te+YdNxEh7MSBsakxqeD/S35B829nIlYyFkS2Ws+XNU9/d0WBsg4pkc/wy3twHe/h X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2016 09:29:50.6382 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR02MB1694 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 430 Lines: 14 On 12/13/2016 10:18 AM, Ritesh Harjani wrote: > On 12/9/2016 1:43 AM, Jens Axboe wrote: >> + if (!list_empty_careful(&hctx->dispatch)) { >> + spin_lock(&hctx->lock); >> + if (!list_empty(&hctx->dispatch)) > list_splice_init already checks for list_empty. So this may be > redundant. Please check. Hello Ritesh, I think the list_empty() check is on purpose and is intended as a performance optimization. Bart.