mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menage <menage@google.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: akpm@linux-foundation.org, containers@lists.linux-foundation.org,
	bblum@google.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] flexible array implementation
Date: Tue, 21 Jul 2009 13:28:50 -0700	[thread overview]
Message-ID: <6599ad830907211328w4ada3afboa8fcecfed980ffd0@mail.gmail.com> (raw)
In-Reply-To: <20090721160333.96AA4D3D@kernel>

On Tue, Jul 21, 2009 at 9:03 AM, Dave Hansen<dave@linux.vnet.ibm.com> wrote:
>
> Once a structure goes over PAGE_SIZE*2, we see occasional
> allocation failures.  Some people have chosen to switch
> over to things like vmalloc() that will let them keep
> array-like access to such a large structures.  But,
> vmalloc() has plenty of downsides.
>
> Here's an alternative.  I think it's what Andrew was
> suggesting  here:
>
>        http://lkml.org/lkml/2009/7/2/518

Looks like a useful library abstraction.

As far as using it for the cgroups tasks files, it would be possible,
although I was leaning towards an approach that I expressed in the
thread on Ben's patch to add the "procs" file:

- make css_set and its various linked lists RCU-safe
- make it possible for the cgroup iterator to pause/resume scanning by
leaving a cursor at the relevant point in the css_set lists.

Then we can avoid any memory allocations at all.

The downside is that we lose the current sorted output for the tasks
file; http://www.google.com/codesearch?q=cpuset+tasks suggests that
current users of the tasks file don't expect it to be sorted (and in
fact libcpuset explicitly sorts it after reading) so it's not clear if
this would be a problem. I don't think I can see a plausible scenario
where userspace would be relying on sorted output, but maybe others
can.

Paul

      parent reply	other threads:[~2009-07-21 20:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 16:03 Dave Hansen
2009-07-21 16:47 ` Mike Waychison
2009-07-21 17:22   ` Dave Hansen
2009-07-21 16:57 ` Denys Vlasenko
2009-07-21 17:25   ` Dave Hansen
2009-07-21 20:18 ` Andrew Morton
2009-07-21 21:56   ` Dave Hansen
2009-07-21 22:33     ` Andrew Morton
2009-07-21 20:28 ` Paul Menage [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=6599ad830907211328w4ada3afboa8fcecfed980ffd0@mail.gmail.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=bblum@google.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®