lkml.org 
[lkml]   [2013]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 01/10] workqueue: add wq_numa_tbl_len and wq_numa_possible_cpumask[]
From
On Wed, Mar 20, 2013 at 11:48 PM, Tejun Heo <tj@kernel.org> wrote:
> On Wed, Mar 20, 2013 at 11:43:30PM +0800, Lai Jiangshan wrote:
>> > + for_each_node(node)
>> > + BUG_ON(!alloc_cpumask_var_node(&wq_numa_possible_cpumask[node],
>> > + GFP_KERNEL, node));
>> > + for_each_possible_cpu(cpu) {
>> > + node = cpu_to_node(cpu);
>> > + if (WARN_ON(node == NUMA_NO_NODE)) {
>> > + pr_err("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu);
>>
>> since you used WARN_ON(), not BUG_ON(), I think you need to free
>> allocated memory here.
>
> I don't know. Is it necessary? It shouldn't happen sans bugs in arch
> code and we're vomiting warning message with full stack trace. The
> system will function but something is seriously screwed. I don't
> think it matters whether we free the puny number of bytes there or
> not and I don't wanna nest deeper there. :P


I agree with you, but many people use semantic analysis tools to do
hunting in the kernel. they may interrupt you again.

>
> --
> tejun


\
 
 \ /
  Last update: 2013-03-20 18:21    [W:0.041 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site