Re: [PATCH 3/4] bcache: use delayed kworker fo asynchronous devices registration

Hannes Reinecke
2020-06-15T06:12:46Z

On 6/14/20 6:53 PM, colyli@suse.de wrote:
> From: Coly Li <colyli@suse.de>
>
> This patch changes the asynchronous registration kworker to a delayed
> kworker. There is probability queue_work() queues the async registration
> kworker to the same CPU (even though very little), then the process
> which writing sysfs interface to reigster bcache device may won't return
> immeidately. queue_delayed_work() in this patch will delay 10 jiffies
> before insert the kworker to run queue, which makes sure the registering
> process may always returns to user space in time.
>
> Fixes: 9e23ccf8f0a22 ("bcache: asynchronous devices registration")
> Signed-off-by: Coly Li <colyli@suse.de>
> Cc: Hannes Reinecke <hare@suse.de>
> ---
> drivers/md/bcache/super.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer