mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: kosaki.motohiro@jp.fujitsu.com, Li Zefan <lizf@cn.fujitsu.com>,
	Paul Menage <menage@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm 2/2] cgroup: use multibuf for tasks file
Date: Fri, 19 Sep 2008 04:52:12 +0900	[thread overview]
Message-ID: <20080919044828.00FA.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <48CF2863.1010502@cn.fujitsu.com>

> Li Zefan wrote:
> > Lai Jiangshan wrote:
> >> Paul Menage wrote:
> >>> On Fri, Sep 12, 2008 at 4:55 AM, Lai Jiangshan <laijs@cn.fujitsu.com> wrote:
> >>>> when we open a really large cgroup for read, we may failed
> >>>> for kmalloc() is not reliable for allocate a big buffer.
> >>> This still depends on an answer to whether using plain vmalloc is too
> >>> much overhead.
> >>>
> >>> Balbir pointed out to me that most cgroups are likely to be pretty
> >>> small - so the solution of just doing a kmalloc() for 8K or less, and
> >>> a vmalloc() for more than 8K (which is >2000 threads) will avoid the
> >>> vmalloc overhead in almost all cases; the question is whether
> >>> eliminating the remaining overhead is worth the extra complexity.
> >>>
> >> I think open cgroup.tasks to read is not a critical path.
> >> so using plain vmalloc(even more overhead functions) is worth.
> >>
> > 
> > This patch does not only add runtime overhead, but also make code much more
> > complex, so the code is harder to read and harder to maintain, and object size
> > is increased, which means increased memory footprint.
> > 
> > And is there any reason not using plain vmalloc? Don't bloat the kernel without
> > good reasons IMO...
> > 
> 
> I said that vmalloc is worth.
> vmalloc was the fist choice of my opinion. ^_^

I agreed with Paul Menage's opinion because ..

 - plain vmalloc cause unnecessary overhead.
 - vmalloc sholdn't use for small allocation
   because virtual address space is valuable resource on 32bit machine.




      reply	other threads:[~2008-09-17  7:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 11:55 Lai Jiangshan
2008-09-15 20:28 ` Paul Menage
2008-09-16  1:37   ` Lai Jiangshan
2008-09-16  2:16     ` Li Zefan
2008-09-16  3:30       ` Lai Jiangshan
2008-09-18 19:52         ` KOSAKI Motohiro [this message]

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=20080919044828.00FA.KOSAKI.MOTOHIRO@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@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

all inboxes | Powered by JetHome®