Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-18 Thread Jens Axboe
On 4/18/18 6:54 PM, jiang.bi...@zte.com.cn wrote: by chance, did you check whether this may cause problems with bfq, being the latter not protected by the queue lock as cfq? >>> Checked the bfq code, bfq seems never used blkcg lock derectly, and >>> update of blkg in the common code is

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-18 Thread Jens Axboe
On 4/18/18 6:54 PM, jiang.bi...@zte.com.cn wrote: by chance, did you check whether this may cause problems with bfq, being the latter not protected by the queue lock as cfq? >>> Checked the bfq code, bfq seems never used blkcg lock derectly, and >>> update of blkg in the common code is

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-18 Thread Jens Axboe
On 4/18/18 3:18 AM, jiang.bi...@zte.com.cn wrote: > Hi, >>> Il giorno 17 apr 2018, alle ore 09:10, Jiang Biao >>> ha scritto: >>> >>> As described in the comment of blkcg_activate_policy(), >>> *Update of each blkg is protected by both queue and blkcg locks so >>> that

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-18 Thread Jens Axboe
On 4/18/18 3:18 AM, jiang.bi...@zte.com.cn wrote: > Hi, >>> Il giorno 17 apr 2018, alle ore 09:10, Jiang Biao >>> ha scritto: >>> >>> As described in the comment of blkcg_activate_policy(), >>> *Update of each blkg is protected by both queue and blkcg locks so >>> that holding either lock and

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-18 Thread Paolo Valente
> Il giorno 18 apr 2018, alle ore 11:18, jiang.bi...@zte.com.cn ha scritto: > > Hi, >>> Il giorno 17 apr 2018, alle ore 09:10, Jiang Biao >>> ha scritto: >>> >>> As described in the comment of blkcg_activate_policy(), >>> *Update of each blkg is protected by both

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-18 Thread Paolo Valente
> Il giorno 18 apr 2018, alle ore 11:18, jiang.bi...@zte.com.cn ha scritto: > > Hi, >>> Il giorno 17 apr 2018, alle ore 09:10, Jiang Biao >>> ha scritto: >>> >>> As described in the comment of blkcg_activate_policy(), >>> *Update of each blkg is protected by both queue and blkcg locks so >>>

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-17 Thread Paolo Valente
> Il giorno 17 apr 2018, alle ore 09:10, Jiang Biao ha > scritto: > > As described in the comment of blkcg_activate_policy(), > *Update of each blkg is protected by both queue and blkcg locks so > that holding either lock and testing blkcg_policy_enabled() is > always

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-17 Thread Paolo Valente
> Il giorno 17 apr 2018, alle ore 09:10, Jiang Biao ha > scritto: > > As described in the comment of blkcg_activate_policy(), > *Update of each blkg is protected by both queue and blkcg locks so > that holding either lock and testing blkcg_policy_enabled() is > always enough for dereferencing

[PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-17 Thread Jiang Biao
As described in the comment of blkcg_activate_policy(), *Update of each blkg is protected by both queue and blkcg locks so that holding either lock and testing blkcg_policy_enabled() is always enough for dereferencing policy data.* with queue lock held, there is no need to hold blkcg lock in

[PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-17 Thread Jiang Biao
As described in the comment of blkcg_activate_policy(), *Update of each blkg is protected by both queue and blkcg locks so that holding either lock and testing blkcg_policy_enabled() is always enough for dereferencing policy data.* with queue lock held, there is no need to hold blkcg lock in