From: Chen Gang <gang.chen@asianux.com>
To: Tejun Heo <tj@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kernel/workqueue.c: better to free related resources when failure occurs in wq_numa_init()
Date: Wed, 15 May 2013 10:16:00 +0800 [thread overview]
Message-ID: <5192EFE0.4040903@asianux.com> (raw)
In-Reply-To: <20130514151752.GB6795@mtj.dyndns.org>
On 05/14/2013 11:17 PM, Tejun Heo wrote:
> On Tue, May 14, 2013 at 08:25:20PM +0800, Chen Gang wrote:
>>
>> When NUMA node mapping not available for one cpu, need disabling NUMA
>> support and proceed.
>>
>> Also better to release unused resources (the original code can not
>> cause issue, only waste some memory).
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> ---
>> kernel/workqueue.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
>> index 1ae6028..a763079 100644
>> --- a/kernel/workqueue.c
>> +++ b/kernel/workqueue.c
>> @@ -4911,6 +4911,9 @@ static void __init wq_numa_init(void)
>> if (WARN_ON(node == NUMA_NO_NODE)) {
>> pr_warn("workqueue: NUMA node mapping not available for cpu%d, disabling NUMA support\n", cpu);
>> /* happens iff arch is bonkers, let's just proceed */
>> + for_each_node(node)
>> + free_cpumask_var(tbl[node]);
>> + kfree(tbl);
>
> Eh... let's just leave it alone. The path is taken iff the whole
> thing is seriously broken and we're triggering WARN. I don't think we
> need to worry about small memory wastage there.
>
> Thanks.
>
OK, I can understand. I will continue to try to find and make another
patches.
Thanks.
--
Chen Gang
Asianux Corporation
next prev parent reply other threads:[~2013-05-15 2:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 12:25 [PATCH] kernel/workqueue.c: better to free related resources when failure occurs in wq_numa_init() Chen Gang
2013-05-14 15:17 ` Tejun Heo
2013-05-15 2:16 ` Chen Gang [this message]
2013-05-15 6:13 ` [PATCH] kernel/workqueue.c: need call device_remove_file() when failure occurs after called device_create_file() Chen Gang
2013-05-15 21:22 ` Tejun Heo
2013-05-16 3:33 ` Chen Gang
2013-05-16 4:16 ` Chen Gang
2013-05-16 4:48 ` Chen Gang
2013-05-16 17:50 ` Tejun Heo
2013-05-17 2:51 ` Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5192EFE0.4040903@asianux.com \
--to=gang.chen@asianux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox