From: Daisuke Nishimura Subject: Re: [RFC][PATCH] another swap controller for cgroup Date: Thu, 15 May 2008 21:01:53 +0900 Message-ID: <482C2631.1030600@mxp.nes.nec.co.jp> References: <6599ad830805150019v5ba23fe1xe5a6e8b80bc194f5@mail.gmail.com> <20080515085606.7239D5A07@siro.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080515085606.7239D5A07-Pcsii4f/SVk@public.gmane.org> 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 To: YAMAMOTO Takashi Cc: minoura-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org, hugh-DTz5qymZ9yRBDgjK7y7TUQ@public.gmane.org, menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org List-Id: containers.vger.kernel.org On 2008/05/15 17:56 +0900, YAMAMOTO Takashi wrote: >>> > If so, why is this better >>> > than charging for actual swap usage? >>> >>> its behaviour is more determinstic and it uses less memory. >>> (than nishimura-san's one, which charges for actual swap usage.) >>> Consuming more memory cannot be helped for my controller... >> Using less memory is good, but maybe not worth it if the result isn't so useful. >> >> I'd say that it's less deterministic than nishimura-san's controller - >> with his you just need to know how much swap is in use (which you can >> tell by observing the app on a real system) but with yours you also >> have to know whether there are any processes sharing anon pages (but >> not mms). > > deterministic in the sense that, even when two or more processes > from different cgroups are sharing a page, both of them, rather than > only unlucky one, are always charged. > I'm not sure whether this behavior itself is good or bad, but I think it's not good idea to make memory controller, which charges only one process for a shared page, and swap controller behave differently. I think it will be confusing for users. At least, I would feel it strange. > another related advantage is that it's possible to move charges > quite precisely when moving a task among cgroups. > Moving charges is one of future todo of my controller. But, as you say, it won't be so precise as yours. Thanks, Daisuke Nishimura.