lkml.org 
[lkml]   [2016]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/7] blk-mq: abstract out blk_mq_dispatch_rq_list() helper
From
Date
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.

\
 
 \ /
  Last update: 2016-12-13 10:31    [W:0.359 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site