[lkml]   [2009]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] cpumask: alloc blank cpumask left over
Yinghai Lu wrote:

>> Using __GFP_ZERO is equivalent to using memset() instead of
>> cpumask_clear(). It's better to call cpumask_clear() or provide an API
>> to alloc+clear.
>> Further, what about the non-MAXSMP case:
>> static inline bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
>> {
>> return true;
>> }
>> We explicity clear on MAXSMP and rely on static initialization for the
>> non-MAXSMP, laying a neat trap for anyone who makes the variable
>> non-static. Let's be less subtle that that.
> or have zalloc_cpumask_var() ?

That's the best choice IMO.

I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

 \ /
  Last update: 2009-06-06 11:43    [W:0.072 / U:2.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site