lkml.org 
[lkml]   [2022]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -next 1/4] blk-iocost: track whether iocg is still online
From
Date
Hi, Christoph

在 2022/12/21 18:33, Christoph Hellwig 写道:
> On Sat, Dec 17, 2022 at 11:05:24AM +0800, Yu Kuai wrote:
>> @@ -459,6 +459,8 @@ struct ioc_gq {
>> struct blkg_policy_data pd;
>> struct ioc *ioc;
>>
>> + bool online;
>
> Nit: maybe tab align this field like the fields above it.
>
>> +static void ioc_pd_offline(struct blkg_policy_data *pd)
>> +{
>> + struct ioc_gq *iocg = pd_to_iocg(pd);
>> + struct ioc *ioc = iocg->ioc;
>> + unsigned long flags;
>> +
>> + if (ioc) {
>
> How could ioc be NULL here?
>

As I explained in another thread.. pd_offline_fn() can be called without
pd_init_fn(), which is a bug from upper layer...

blkcg_activate_policy
spin_lock_irq(&q->queue_lock);
list_for_each_entry_reverse(blkg, &q->blkg_list
pd_alloc_fn(GFP_NOWAIT | __GFP_NOWARN,...) -> failed

spin_unlock_irq(&q->queue_lock);
// release queue_lock here is problematic, this will cause
pd_offline_fn called without pd_init_fn.
pd_alloc_fn(__GFP_NOWARN,...)

Thanks,
Kuai
> .
>

\
 
 \ /
  Last update: 2023-03-26 23:19    [W:0.083 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site