[Devel] Re: [PATCH v2] cgroups: make cftype.unregister_event() void-returning

KAMEZAWA Hiroyuki kamezawa.hiroyu at jp.fujitsu.com
Sun May 9 23:08:15 PDT 2010


On Sun,  9 May 2010 03:10:22 +0300
"Kirill A. Shutemov" <kirill at shutemov.name> wrote:

> Since we unable to handle error returned by cftype.unregister_event()
> properly, let's make the callback void-returning.
> 
> mem_cgroup_unregister_event() has been rewritten to be "never fail"
> function. On mem_cgroup_usage_register_event() we save old buffer
> for thresholds array and reuse it in mem_cgroup_usage_unregister_event()
> to avoid allocation.
> 
> Signed-off-by: Kirill A. Shutemov <kirill at shutemov.name>

Hmm, just reusing buffer isn't enough ?
as
	tmp = memory->thresholds;
	reduce entries on tmp
And what happens when

	register
	register
	register	
	unregister  (use preallocated buffer)
	unregister  ????
	unregister

Thanks,
-Kame

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list