From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
David Rientjes <rientjes@google.com>,
Suleiman Souhlal <suleiman@google.com>,
Ying Han <yinghan@google.com>,
linux-mm@kvack.org
Subject: Re: memcg: slab control
Date: Tue, 1 Dec 2009 13:06:09 +0530 [thread overview]
Message-ID: <20091201073609.GQ2970@balbir.in.ibm.com> (raw)
In-Reply-To: <4B0E50B1.20602@parallels.com>
* Pavel Emelyanov <xemul@parallels.com> [2009-11-26 12:56:01]:
> KAMEZAWA Hiroyuki wrote:
> > On Thu, 26 Nov 2009 12:10:52 +0300
> > Pavel Emelyanov <xemul@parallels.com> wrote:
> >
> >>>> Anyway, I agree that we need another
> >>>> slabcg, Pavel did some work in that area and posted patches, but they
> >>>> were mostly based and limited to SLUB (IIRC).
> >> I'm ready to resurrect the patches and port them for slab.
> >> But before doing it we should answer one question.
> >>
> >> Consider we have two kmalloc-s in a kernel code - one is
> >> user-space triggerable and the other one is not. From my
> >> POV we should account for the former one, but should not
> >> for the latter.
> >>
> >> If so - how should we patch the kernel to achieve that goal?
> >>
> >>> My point is that most of the kernel codes cannot work well when kmalloc(small area)
> >>> returns NULL.
> >> :) That's not so actually. As our experience shows kernel lives fine
> >> when kmalloc returns NULL (this doesn't include drivers though).
> >>
> > One issue it comes to my mind is that file system can return -EIO because
> > kmalloc() returns NULL. the kernel may work fine but terrible to users ;)
>
> That relates to my question above - we should not account for all
> kmalloc-s. In particular - we don't account for bio-s and buffer-head-s
> since their amount is not under direct user control. Yes, you can
> request for heavy IO, but first, kernel sends your task to sleep under
> certain conditions and second, bio-s are destroyed as soon as they are
> finished and thus bio-s and buffer-head-s cannot be used to eat all the
> kernel memory.
Just to understand the context better, is this really a problem. This
can occur when we do really run out of memory. The idea of using
slabcg + memcg together is good, except for our accounting process. I
can repost percpu counter patches that adds fuzziness along with other
tricks that Kame has to do batch accounting, that we will need to
make sure we are able to do with slab allocations as well.
--
Balbir
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-12-01 7:36 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 23:08 David Rientjes
2009-11-26 1:14 ` KAMEZAWA Hiroyuki
2009-11-26 8:50 ` Balbir Singh
2009-11-26 8:56 ` KAMEZAWA Hiroyuki
2009-11-26 9:10 ` Pavel Emelyanov
2009-11-26 9:33 ` KAMEZAWA Hiroyuki
2009-11-26 9:56 ` Pavel Emelyanov
2009-11-26 10:24 ` Suleiman Souhlal
2009-11-26 12:31 ` Pavel Emelyanov
2009-11-26 12:52 ` Suleiman Souhlal
2009-12-01 7:40 ` Balbir Singh
2009-11-27 7:15 ` Ying Han
2009-11-27 9:45 ` Pavel Emelyanov
2009-12-01 5:14 ` KOSAKI Motohiro
2009-11-30 22:57 ` David Rientjes
2009-12-01 10:31 ` Pavel Emelyanov
2009-12-01 22:29 ` David Rientjes
2009-12-01 7:36 ` Balbir Singh [this message]
2009-12-01 10:40 ` Pavel Emelyanov
2009-12-01 15:14 ` Balbir Singh
2009-12-02 10:14 ` Pavel Emelyanov
2009-12-02 10:19 ` Balbir Singh
2009-12-02 10:51 ` Pavel Emelyanov
2009-11-30 22:55 ` David Rientjes
2009-12-01 10:39 ` Pavel Emelyanov
2009-11-26 10:13 ` Suleiman Souhlal
2009-11-30 9:17 ` Balbir Singh
2009-11-30 22:45 ` David Rientjes
2009-11-26 1:17 ` KAMEZAWA Hiroyuki
2009-11-26 10:01 ` Suleiman Souhlal
2009-11-26 2:35 ` KOSAKI Motohiro
2009-11-27 7:01 ` Ying Han
2009-11-27 9:48 ` Pavel Emelyanov
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=20091201073609.GQ2970@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=suleiman@google.com \
--cc=xemul@parallels.com \
--cc=yinghan@google.com \
/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