[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7bcf377-c386-41cd-8268-7b6f8cb251fd@huaweicloud.com>
Date: Fri, 27 Sep 2024 15:45:15 +0800
From: Chen Ridong <chenridong@...weicloud.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: tj@...nel.org, lizefan.x@...edance.com, hannes@...xchg.org,
longman@...hat.com, chenridong@...wei.com, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/3] cgroup/bpf: use a dedicated workqueue for cgroup
bpf destruction
On 2024/9/26 20:49, Michal Koutný wrote:
> Hello.
>
> On Mon, Sep 23, 2024 at 11:43:50AM GMT, Chen Ridong <chenridong@...weicloud.com> wrote:
>> +static int __init cgroup_bpf_wq_init(void)
>> +{
>> + cgroup_bpf_destroy_wq = alloc_workqueue("cgroup_bpf_destroy", 0, 1);
>> + WARN_ON_ONCE(!cgroup_bpf_destroy_wq);
>> + return 0;
>> +}
>> +core_initcall(cgroup_bpf_wq_init);
>
> I think hard fail (panic() if you want to avoid BUG_ON) would be
> warranted here and mere warning would leave system exposed to worse
> errors later (and _ONCE in an initcall looks unnecessary).
>
Thank you. I think panic() is alright.
Best regards,
Ridong
> Maybe look at other global wqs. I see that returning -ENOMEM might be an
> option, however, I don't see that initcall's return value would be
> processed anywhere currently :-/
>
> Besides this allocation failpath this is a sensible change to me.
>
> Thanks,
> Michal
Powered by blists - more mailing lists