All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xunlei Pang <xlpang@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] sched/core: Clear the root_domain cpumasks in init_rootdomain()
Date: Thu, 3 Dec 2015 10:44:08 +0800	[thread overview]
Message-ID: <565FAC78.3030205@redhat.com> (raw)
In-Reply-To: <20151202162542.GT3816@twins.programming.kicks-ass.net>

Hi Peter,

On 12/03/2015 at 12:25 AM, Peter Zijlstra wrote:
> On Wed, Dec 02, 2015 at 09:12:30PM +0800, Xunlei Pang wrote:
>> Hi Peter,
>>
>> On 12/02/2015 at 08:34 PM, Peter Zijlstra wrote:
>>> On Wed, Dec 02, 2015 at 07:52:59PM +0800, Xunlei Pang wrote:
>>>> The patch cleans the garbage by using zalloc_cpumask_var()
>>>> instead of alloc_cpumask_var() for root_domain::rto_mask
>>>> allocation, thereby addressing the issues.
>>> How did you notice this? Also do we want to do the same for the kmalloc
>> When doing review.
> Nice, will you be looking for similar issues elsewhere in the scheduler
> too?

Sure :-)
>>> in alloc_rootdomain() ?
>> There is a "memset(rd, 0, sizeof(*rd))" in init_rootdomain(),
>> so I don't think we need to do this in alloc_rootdomain().
> Ah, right there is. Which also clears the mask for small systems.

Yeah, maybe we can improve it using alloc_cpumask_var() with
__GFP_ZERO instead of zalloc_cpumask_var() to avoid duplicate
clean for small systems.

Regards,
Xunlei

  reply	other threads:[~2015-12-03  2:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 11:52 [PATCH] sched/core: Clear the root_domain cpumasks in init_rootdomain() Xunlei Pang
2015-12-02 12:34 ` Peter Zijlstra
2015-12-02 13:12   ` Xunlei Pang
2015-12-02 16:25     ` Peter Zijlstra
2015-12-03  2:44       ` Xunlei Pang [this message]
2015-12-03  8:28         ` Ingo Molnar
2015-12-03 11:52           ` Xunlei Pang
2015-12-04  8:09             ` Ingo Molnar
2015-12-04  8:27               ` Peter Zijlstra
2015-12-04  8:30                 ` Ingo Molnar
2015-12-04  8:28               ` Xunlei Pang
2015-12-04  8:30                 ` Ingo Molnar
2015-12-03  9:35         ` Peter Zijlstra
2015-12-04 11:52 ` [tip:locking/core] " tip-bot for Xunlei Pang

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=565FAC78.3030205@redhat.com \
    --to=xlpang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.