All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blk-mq: Drop explicit timeout sync in hotplug
@ 2016-11-28 17:01 Gabriel Krisman Bertazi
  2016-11-29  7:33 ` Ming Lei
  2016-11-29 15:04 ` Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Gabriel Krisman Bertazi @ 2016-11-28 17:01 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, Gabriel Krisman Bertazi, Ming Lei

Sorry for the dup.  Missed linux-block address.

>8

After commit 287922eb0b18 ("block: defer timeouts to a workqueue"),
deleting the timeout work after freezing the queue shouldn't be
necessary, since the synchronization is already enforced by the
acquisition of a q_usage_counter reference in blk_mq_timeout_work.

Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Cc: Ming Lei <ming.lei@canonical.com>
---
 block/blk-mq.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 9d4a1d630d0b..bac12caece06 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2220,16 +2220,9 @@ static void blk_mq_queue_reinit_work(void)
 	 */
 	list_for_each_entry(q, &all_q_list, all_q_node)
 		blk_mq_freeze_queue_start(q);
-	list_for_each_entry(q, &all_q_list, all_q_node) {
+	list_for_each_entry(q, &all_q_list, all_q_node)
 		blk_mq_freeze_queue_wait(q);
 
-		/*
-		 * timeout handler can't touch hw queue during the
-		 * reinitialization
-		 */
-		del_timer_sync(&q->timeout);
-	}
-
 	list_for_each_entry(q, &all_q_list, all_q_node)
 		blk_mq_queue_reinit(q, &cpuhp_online_new);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] blk-mq: Drop explicit timeout sync in hotplug
  2016-11-28 17:01 [PATCH] blk-mq: Drop explicit timeout sync in hotplug Gabriel Krisman Bertazi
@ 2016-11-29  7:33 ` Ming Lei
  2016-11-29 15:04 ` Jens Axboe
  1 sibling, 0 replies; 4+ messages in thread
From: Ming Lei @ 2016-11-29  7:33 UTC (permalink / raw)
  To: Gabriel Krisman Bertazi; +Cc: Jens Axboe, linux-block

On Tue, Nov 29, 2016 at 1:01 AM, Gabriel Krisman Bertazi
<krisman@linux.vnet.ibm.com> wrote:
> Sorry for the dup.  Missed linux-block address.
>
>>8
>
> After commit 287922eb0b18 ("block: defer timeouts to a workqueue"),
> deleting the timeout work after freezing the queue shouldn't be
> necessary, since the synchronization is already enforced by the
> acquisition of a q_usage_counter reference in blk_mq_timeout_work.
>
> Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
> Cc: Ming Lei <ming.lei@canonical.com>
> ---
>  block/blk-mq.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 9d4a1d630d0b..bac12caece06 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -2220,16 +2220,9 @@ static void blk_mq_queue_reinit_work(void)
>          */
>         list_for_each_entry(q, &all_q_list, all_q_node)
>                 blk_mq_freeze_queue_start(q);
> -       list_for_each_entry(q, &all_q_list, all_q_node) {
> +       list_for_each_entry(q, &all_q_list, all_q_node)
>                 blk_mq_freeze_queue_wait(q);
>
> -               /*
> -                * timeout handler can't touch hw queue during the
> -                * reinitialization
> -                */
> -               del_timer_sync(&q->timeout);
> -       }
> -
>         list_for_each_entry(q, &all_q_list, all_q_node)
>                 blk_mq_queue_reinit(q, &cpuhp_online_new);

Reviewed-by: Ming Lei <ming.lei@canonical.com>

Thanks,
Ming

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] blk-mq: Drop explicit timeout sync in hotplug
  2016-11-28 17:01 [PATCH] blk-mq: Drop explicit timeout sync in hotplug Gabriel Krisman Bertazi
  2016-11-29  7:33 ` Ming Lei
@ 2016-11-29 15:04 ` Jens Axboe
  1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2016-11-29 15:04 UTC (permalink / raw)
  To: Gabriel Krisman Bertazi; +Cc: linux-block, Ming Lei

On 11/28/2016 10:01 AM, Gabriel Krisman Bertazi wrote:
> Sorry for the dup.  Missed linux-block address.
>
>> 8
>
> After commit 287922eb0b18 ("block: defer timeouts to a workqueue"),
> deleting the timeout work after freezing the queue shouldn't be
> necessary, since the synchronization is already enforced by the
> acquisition of a q_usage_counter reference in blk_mq_timeout_work.

Added for 4.10, thanks.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] blk-mq: Drop explicit timeout sync in hotplug
@ 2016-11-28 16:48 Gabriel Krisman Bertazi
  0 siblings, 0 replies; 4+ messages in thread
From: Gabriel Krisman Bertazi @ 2016-11-28 16:48 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, Gabriel Krisman Bertazi, Ming Lei

After commit 287922eb0b18 ("block: defer timeouts to a workqueue"),
deleting the timeout work after freezing the queue shouldn't be
necessary, since the synchronization is already enforced by the
acquisition of a q_usage_counter reference in blk_mq_timeout_work.

Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Cc: Ming Lei <ming.lei@canonical.com>
---
 block/blk-mq.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 9d4a1d630d0b..bac12caece06 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2220,16 +2220,9 @@ static void blk_mq_queue_reinit_work(void)
 	 */
 	list_for_each_entry(q, &all_q_list, all_q_node)
 		blk_mq_freeze_queue_start(q);
-	list_for_each_entry(q, &all_q_list, all_q_node) {
+	list_for_each_entry(q, &all_q_list, all_q_node)
 		blk_mq_freeze_queue_wait(q);
 
-		/*
-		 * timeout handler can't touch hw queue during the
-		 * reinitialization
-		 */
-		del_timer_sync(&q->timeout);
-	}
-
 	list_for_each_entry(q, &all_q_list, all_q_node)
 		blk_mq_queue_reinit(q, &cpuhp_online_new);
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-29 15:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28 17:01 [PATCH] blk-mq: Drop explicit timeout sync in hotplug Gabriel Krisman Bertazi
2016-11-29  7:33 ` Ming Lei
2016-11-29 15:04 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2016-11-28 16:48 Gabriel Krisman Bertazi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.