On Tue, Nov 30, 2010 at 12:07 AM, KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote: > On Tue, 30 Nov 2010 16:51:42 +0900 > KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote: > >> > + if (IS_ERR(thr)) >> > + printk(KERN_INFO "Failed to start kswapd on memcg %d\n", >> > + 0); >> > + else >> > + kswapd_p->kswapd_task = thr; >> > + } >> >> Hmm, ok, then, kswapd-for-memcg is created when someone go over watermark. >> Why this new kswapd will not exit() until memcg destroy ? >> >> I think there are several approaches. >> >> 1. create/destroy a thread at memcg create/destroy >> 2. create/destroy a thread at watermarks. >> 3. use thread pool for watermarks. >> 4. use workqueue for watermaks. >> >> The good point of "1" is that we can control a-thread-for-kswapd by cpu >> controller but it will use some resource. >> The good point of "2" is that we can avoid unnecessary resource usage. >> >> 3 and 4 is not very good, I think. >> >> I'd like to vote for "1"...I want to avoid "stealing" other container's cpu >> by bad application in a container uses up memory. >> > > One more point, one-thread-per-hierarchy is enough. So, please check > memory.use_hierarchy==1 or not at creating a thread. Thanks. Will take a look at it. --Ying > > Thanks, > -kame > > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href