Linux Container Development
 help / color / mirror / Atom feed
From: Balbir Singh <balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Hugh Dickins <hugh-DTz5qymZ9yRBDgjK7y7TUQ@public.gmane.org>
Cc: Linux Containers
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Rik van Riel <riel-ebMLmSuQjDVBDgjK7y7TUQ@public.gmane.org>
Subject: Re: memrlimit controller merge to mainline
Date: Fri, 25 Jul 2008 15:28:11 -0400	[thread overview]
Message-ID: <488A294B.4090609@linux.vnet.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0807251715070.12089-popGQ1T0qN76K7/ahGyk6A@public.gmane.org>

Hugh Dickins wrote:
> On Fri, 25 Jul 2008, Paul Menage wrote:
>> On Fri, Jul 25, 2008 at 5:06 AM, Hugh Dickins <hugh-DTz5qymZ9yRBDgjK7y7TUQ@public.gmane.org> wrote:
>>> (Different topic, but one day I ought to get around to saying again
>>> how absurd I think a swap controller; whereas a mem+swap controller
>>> makes plenty of sense.  I think Rik and others said the same.)
>> Agreed that a swap controller without a memory controller doesn't make
>> much sense, but a memory controller without a swap controller can make
>> sense on machines that don't intend to use swap.
> 
> I agree that a memory controller without a swap controller can
> make sense: I hope so, anyway, since that's what's in mainline.
> Even if swap is used, memory is a more precious resource than swap,
> and you were right to go about controlling memory first.
> 

Yes, I agree.

>> So if they were separate controllers, we'd use the proposed cgroup
>> dependency features to make the swap controller depend on the memory
>> controller - in which case you'd only be able to mount the swap
>> controller on a hierarchy that also had the memory controller, and the
>> swap controller would be able to make use of the page ownership
>> information.
>>
>> It's more of a modularity issue than a functionality issue, I think -
>> the swap controller and memory controller are tracking fundamentally
>> different things (space on disk versus pages in memory), and the only
>> dependency between them is the "memory controller" tracking the
>> ownership of a page and providing it to the "swap controller".
> 
> It sounds as if you're interpreting my "mem+swap controller" as a
> mem controller and a swap controller and the swap controller makes
> use of some of the mem controller infrastructure.
> 
> No, I'm trying to say something stronger than that.  I'm saying,
> as I've said before, that I cannot imagine why anyone would want
> to control swap itself - what they want to control is the total
> of mem+swap.  Swap is a second-class citizen, nobody wants swap
> if they can have mem, so why control it separately?
> 
> IIRC Rik expressed the same by pointing out that a cgroup at its
> swap limit would then be forced to grow in mem (until it hits its
> mem limit): so controlling the less precious resource would increase
> pressure on the more precious resource.  (Actually, that probably
> bears little relation to what he said - sorry, Rik!)  I don't recall
> what answer he got, perhaps I'd be persuaded if I heard it again.
> 

I see what your saying. When you look at Linux right now, we control swap
independent of memory, so I am not totally opposed to setting swap, instead of
swap+mem. I might not want to swap from a particular cgroup, in which case, I
set swap to 0 and risk OOMing, which might be an acceptable trade-off depending
on my setup. I could easily change this policy on demand and add swap if OOMing
was no longer OK.

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

  parent reply	other threads:[~2008-07-25 19:28 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-25  8:14 memrlimit controller merge to mainline Paul Menage
     [not found] ` <6599ad830807250114h7ab0fdb1u98c0968961647642-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25  8:25   ` Andrew Morton
     [not found]     ` <20080725012519.a5fed7d6.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-07-25 12:56       ` Balbir Singh
2008-07-25 12:57       ` Balbir Singh
2008-07-25  9:06   ` Hugh Dickins
     [not found]     ` <Pine.LNX.4.64.0807251004570.31120-popGQ1T0qN76K7/ahGyk6A@public.gmane.org>
2008-07-25 13:32       ` Balbir Singh
     [not found]         ` <4889D5EE.4010601-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-07-25 17:38           ` Hugh Dickins
     [not found]             ` <Pine.LNX.4.64.0807251820440.20617-popGQ1T0qN76K7/ahGyk6A@public.gmane.org>
2008-07-25 19:08               ` Balbir Singh
2008-07-25 14:06       ` Paul Menage
     [not found]         ` <6599ad830807250706t23e483b5j18d683c0470d1d22-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25 16:46           ` Hugh Dickins
     [not found]             ` <Pine.LNX.4.64.0807251715070.12089-popGQ1T0qN76K7/ahGyk6A@public.gmane.org>
2008-07-25 19:24               ` Paul Menage
     [not found]                 ` <6599ad830807251224g218e17faj5c8224ba398a51c8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-30  0:31                   ` Hugh Dickins
     [not found]                     ` <Pine.LNX.4.64.0807300117210.14699-popGQ1T0qN76K7/ahGyk6A@public.gmane.org>
2008-07-30  0:33                       ` Paul Menage
2008-07-25 19:28               ` Balbir Singh [this message]
     [not found]                 ` <488A294B.4090609-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-07-30  0:48                   ` Hugh Dickins
2008-07-29  6:01               ` KAMEZAWA Hiroyuki
     [not found]                 ` <20080729150111.f879c989.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-30  0:16                   ` Hugh Dickins
     [not found]                     ` <Pine.LNX.4.64.0807300113200.14699-popGQ1T0qN76K7/ahGyk6A@public.gmane.org>
2008-07-30  1:17                       ` KAMEZAWA Hiroyuki
     [not found]                         ` <20080730101719.5eb18635.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-30  2:16                           ` KAMEZAWA Hiroyuki
2008-07-30  2:52                           ` KAMEZAWA Hiroyuki
     [not found]                             ` <20080730115226.3fec2540.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-30  3:11                               ` KAMEZAWA Hiroyuki
     [not found]                                 ` <20080730121115.b1e3a7be.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-30  4:14                                   ` KAMEZAWA Hiroyuki
     [not found]                                     ` <20080730131407.526d323b.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-30  4:58                                       ` Daisuke Nishimura
     [not found]                                         ` <20080730135803.a7750e21.nishimura-YQH0OdQVrdy45+QrQBaojngSJqDPrsil@public.gmane.org>
2008-07-30  5:11                                           ` KAMEZAWA Hiroyuki
     [not found]                                             ` <20080730141147.837446aa.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-30  5:41                                               ` Daisuke Nishimura
2008-07-30  5:40                                   ` KAMEZAWA Hiroyuki
2008-07-30  4:23                           ` Daisuke Nishimura
2008-08-04 19:04       ` Balbir Singh
     [not found]         ` <489752AA.9060500-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-08-04 21:52           ` Hugh Dickins
     [not found]             ` <Pine.LNX.4.64.0808042226430.4300-popGQ1T0qN76K7/ahGyk6A@public.gmane.org>
2008-08-05  4:53               ` Balbir Singh
2008-08-10 17:04               ` Balbir Singh
2008-07-25 12:30   ` Balbir Singh
     [not found]     ` <4889C77F.5090909-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-07-25 13:47       ` Joe MacDonald
2008-07-25 14:11       ` Paul Menage
     [not found]         ` <6599ad830807250711m4f34c447oc259b0af40f68da4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-25 16:07           ` Balbir Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=488A294B.4090609@linux.vnet.ibm.com \
    --to=balbir-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=hugh-DTz5qymZ9yRBDgjK7y7TUQ@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=riel-ebMLmSuQjDVBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox