From mboxrd@z Thu Jan 1 00:00:00 1970 From: Balbir Singh Subject: Re: [PATCH][RFC] memory.min_usage again Date: Wed, 10 Sep 2008 08:32:15 -0700 Message-ID: <48C7E87F.2080706@linux.vnet.ibm.com> References: <20071204040934.44AF41D0BA3@siro.lan> <20080910084443.8F7D85ACE@siro.lan> Reply-To: balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080910084443.8F7D85ACE-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: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org List-Id: containers.vger.kernel.org YAMAMOTO Takashi wrote: > hi, > >> hi, >> >> here's a patch to implement memory.min_usage, >> which controls the minimum memory usage for a cgroup. >> >> it works similarly to mlock; >> global memory reclamation doesn't reclaim memory from >> cgroups whose memory usage is below the value. >> setting it too high is a dangerous operation. >> Looking through the code I am a little worried, what if every cgroup is below minimum value and the system is under memory pressure, do we OOM, while we could have easily reclaimed? I would prefer to see some heuristics around such a feature, mostly around the priority that do_try_to_free_pages() to determine how desperate we are for reclaiming memory. -- Balbir