[lkml]   [2015]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] sched/core: Clear the root_domain cpumasks in init_rootdomain()
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.


 \ /
  Last update: 2015-12-03 04:01    [W:0.085 / U:5.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site