lkml.org 
[lkml]   [2014]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] blk-mq: remove unnecessary blk_clear_rq_complete()
On Wed, Sep 17, 2014 at 05:47:58PM +0800, Ming Lei wrote:
> From: Ming Lei <ming.lei@canoical.com>
>
> This patch removes two unnecessary blk_clear_rq_complete(),
> the REQ_ATOM_COMPLETE flag is cleared inside blk_mq_start_request(),
> so:
>
> - The blk_clear_rq_complete() in blk_flush_restore_request()
> needn't because the request will be freed later, and clearing
> it here may open a small race window with timeout.

This one is defintively correct, blk_mq_end_io should take care of this.

> - The blk_clear_rq_complete() in blk_mq_requeue_request() isn't
> necessary too, even though REQ_ATOM_STARTED is cleared in
> __blk_mq_requeue_request(), in theory it still may cause a small
> race window with timeout since the two clear_bit() may be
> reordered.

Why yo you think it's not nessecary? The request is not in the drivers
hand at this point, so it should not be marked started. Maybe I'm missing
something, but this sounds like it could very likely cause regressions.



\
 
 \ /
  Last update: 2014-09-17 19:21    [W:0.075 / U:1.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site