public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: 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: Tue, 16 Sep 2008 11:30:43 +0800	[thread overview]
Message-ID: <48CF2863.1010502@cn.fujitsu.com> (raw)
In-Reply-To: <48CF1710.20907@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. ^_^

> 
> 



  reply	other threads:[~2008-09-16  3:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 11:55 [PATCH -mm 2/2] cgroup: use multibuf for tasks file 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 [this message]
2008-09-18 19:52         ` KOSAKI Motohiro

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=48CF2863.1010502@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --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