[Devel] [PATCH vz7 2/2] block: store exec_ub on struct request and use it
Andrey Ryabinin
aryabinin at virtuozzo.com
Thu Aug 2 19:36:50 MSK 2018
On 08/02/2018 05:11 PM, Konstantin Khorenko wrote:
> Good calltrace: we set proper exec_ub in ploop_req_state_process()
> and later process requests - accounting goes to correct ub.
>
> loop35172 6275 [002] 755.716683: probe:ub_writeback_io_3:
> (ffffffff813547aa) ub=0xffff880394a04000
> 5547ab deadline_add_request
> 52e76a __elv_add_request
> 536350 blk_flush_plug_list
> 5365aa blk_queue_bio
> 5345bb generic_make_request
> 534843 submit_bio
> 43e4 dio_submit ([pio_direct])
> 616f ploop_entry_request ([ploop])
> 7209 ploop_req_state_process ([ploop])
> 7735 ploop_thread ([ploop])
>
> Bad calltrace: due to task->plug io batching we may miss calling
> ploop_req_state_process() and process requests with ploop thread's ub == ub0:
>
> ploop35172 6275 [002] 755.716763: probe:ub_writeback_io_2:
> (ffffffff81354785) ub=0xffffffff81f7b880 (ub0!!!)
> 554786 deadline_add_request
> 52e76a __elv_add_request
> 536350 blk_flush_plug_list
> 536714 blk_finish_plug
> 1a93 ploop_wait ([ploop])
> 77a1 ploop_thread ([ploop])
>
> => need to store exec_ub in struct request as well.
>
> We are safe to check for NULL request:req_ub to detect set it or not
> because request is zeroed on creation:
>
> get_request
> __get_request
> blk_rq_init
> memset(rq, 0, sizeof(*rq));
>
> https://jira.sw.ru/browse/PSBM-86910
>
> Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
More information about the Devel
mailing list