lkml.org 
[lkml]   [2012]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] zsmalloc: add generic path and remove x86 dependency
On 06/27/2012 12:28 AM, Minchan Kim wrote:
>> +{
>> + if (area->vm)
>> + return 0;
>
>
> Just out of curiosity.
> When do we need above check?

I did this in the case that there was a race between the for
loop in zs_init(), calling zs_cpu_notifier(), and a CPU
coming online. I've never seen the condition hit, but if it
did, it would leak memory without this check.

I would move the cpu notifier registration after the loop in
zs_init(), but then I could miss a cpu up event and we
wouldn't have the needed per-cpu resources for mapping.

All other suggestions are accepted. Thanks for the feedback!

--
Seth



\
 
 \ /
  Last update: 2012-06-27 21:41    [W:0.101 / U:4.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site