From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kamezawa Hiroyuki Subject: Re: [PATCH 1/8] cgroup: add cgroup->id Date: Tue, 20 Nov 2012 16:11:38 +0900 Message-ID: <50AB2D2A.1040604@jp.fujitsu.com> References: <1353093624-22608-1-git-send-email-tj@kernel.org> <1353093624-22608-2-git-send-email-tj@kernel.org> <50AB086E.70901@jp.fujitsu.com> <20121120053112.GE25790@mtj.dyndns.org> <50AB2BCF.2050204@jp.fujitsu.com> <20121120070851.GG25790@mtj.dyndns.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121120070851.GG25790-9pTldWuhBndy/B6EtB590w@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Tejun Heo Cc: nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, daniel.wagner-98C5kh4wR6ohFhg+JK9F0w@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, john.r.fastabend-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, srivatsa.bhat-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org (2012/11/20 16:08), Tejun Heo wrote: > Hello, Kamezawa. > > On Tue, Nov 20, 2012 at 04:05:51PM +0900, Kamezawa Hiroyuki wrote: >> BTW, css's ID was limited to 65535 to be encoded in 2bytes. >> If we use INT, this will increase size of swap_cgroup. >> (2bytes per page => 4bytes per page) It's preallocated at swapon() >> because allocating memory dynamically when we swap a memory is not good. >> >> Do we really need 4bytes for ID ? If so, swap_cgroup should be totally re-designed. > > That's a memcg restriction which shouldn't have been imposed on cgroup > core from the beginning. What memcg should do is rejecting to become > online from ->css_onilne() if cgrp->id is out of the range it can > handle. > Hmm. I'll think a little and consider a patch to remove memcg's refcnt. Thanks, -Kame