Thread (34 messages) 34 messages, 7 authors, 2012-06-29

Re: [PATCH 2/3] zsmalloc: add generic path and remove x86 dependency

From: Minchan Kim <minchan@kernel.org>
Date: 2012-06-28 00:20:36
Also in: lkml

On 06/28/2012 04:09 AM, Seth Jennings wrote:
On 06/27/2012 12:28 AM, Minchan Kim wrote:
quoted
quoted
+{
+	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.

Could you add this as a comment?


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!


Thanks!

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help