All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Paul Menage <menage@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [PATCH] cgroup(fix critical bug): new handling for tasks file
Date: Wed, 27 Aug 2008 12:29:17 +0800	[thread overview]
Message-ID: <48B4D81D.2040200@cn.fujitsu.com> (raw)
In-Reply-To: <6599ad830808261544w308a850m865ac0c0a1552c77@mail.gmail.com>

Paul Menage wrote:
> On Mon, Aug 25, 2008 at 10:22 PM, Lai Jiangshan <laijs@cn.fujitsu.com> wrote:
>> It's complicated than necessary and change too much code IMO.
> 
> What about the problem that maintaining a single pid array can still
> fail for a really large cgroup? I guess we could just say "don't
> create such large cgroups" but someone's bound to want to do that.
> Perhaps use an array of pages rather than a single large kmalloc?
> 

Actually, I had a plan to write such a patch:
[RFC PATCH] cgroup,cpuset: use alternative malloc instead of kmalloc

The main idea is: when allocate size >= PAGE_SIZE, vmalloc will be used
instead. This will reduce the stress when continuous pages are few.
Alternative malloc is used for cgroup_tasks_open() and update_tasks_nodemask().


And vmalloc can malloc larger memory than kmalloc, is vmalloc() enough?
If not, I think using an array of pages is the best choice.

[There are several subsystem who use alternative malloc. kernel/relay.c
for example. relay.c is also using an array of pages for relay buffer. ]


   Lai


  parent reply	other threads:[~2008-08-27  4:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26  1:47 [PATCH] cgroup(fix critical bug): new handling for tasks file Lai Jiangshan
2008-08-26  2:29 ` Paul Menage
2008-08-26  5:22   ` Lai Jiangshan
2008-08-26 22:40     ` Paul Menage
     [not found]     ` <48B39319.7070403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-08-26 22:40       ` Paul Menage
2008-08-26 22:44       ` Paul Menage
2008-08-26 22:44     ` Paul Menage
     [not found]       ` <6599ad830808261544w308a850m865ac0c0a1552c77-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-27  4:29         ` Lai Jiangshan
2008-08-27  4:29       ` Lai Jiangshan [this message]
2008-08-27 12:36         ` Paul Menage
     [not found]           ` <6599ad830808270536i353e1807kaac4e9fb74301bb0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-28 12:09             ` Lai Jiangshan
2008-08-28 12:09           ` Lai Jiangshan
2008-09-05  5:34             ` Paul Menage
     [not found]               ` <48C0C4F7.2080702-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2008-09-08  8:19                 ` Lai Jiangshan
2008-09-08 21:16                 ` Andrew Morton
2008-09-08  8:19               ` Lai Jiangshan
2008-09-08 15:42                 ` Paul Menage
     [not found]                 ` <48C4E012.4060400-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-09-08 15:42                   ` Paul Menage
2008-09-08 21:16               ` Andrew Morton
2008-09-08 22:05                 ` Paul Menage
     [not found]                 ` <20080908141635.3ce77adc.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-09-08 22:05                   ` Paul Menage
     [not found]             ` <48B69582.4000208-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-09-05  5:34               ` Paul Menage
     [not found]         ` <48B4D81D.2040200-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-08-27 12:36           ` Paul Menage
     [not found]   ` <6599ad830808251929p10dfc9d2ub11e4db0cd4f9f3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-26  5:22     ` Lai Jiangshan
     [not found] ` <48B360CE.2010501-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-08-26  2:29   ` Paul Menage
  -- strict thread matches above, loose matches on Subject: below --
2008-08-26  1:47 Lai Jiangshan

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=48B4D81D.2040200@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.