[lkml]   [2011]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH v3 3/4] limit nr_dentries per superblock
    On 08/15/2011 03:14 PM, Pekka Enberg wrote:
    > Hi Pavel,
    > On Mon, Aug 15, 2011 at 2:05 PM, Pavel Emelyanov <> wrote:
    >> This will make sense, since the kernel memory management per-cgroup is one of the
    >> things we'd live to have, but this particular idea will definitely not work in case
    >> we keep the containers' files on one partition keeping each container in its own
    >> chroot environment.
    > And you want a per-container dcache limit?

    To be more specific - we want to protect the node with >1 containers from one of
    them growing the dcache infinitely. One of the solutions to this - per container
    dcache limit.

    > Will the containers share the same superblock?

    Yes, this is typical scenario for both OpenVZ and LXC now.

    > Couldn't you simply do per-container "struct kmem_accounted_cache" in struct superblock?

    If by this you mean "account for all the kmem associated with particular superblock" then
    this is OK for us, but this can't be done in a simple

    if (used + size > limit)
    return -ENOMEM
    else {
    used += size;
    return 0;

    manner, since once we hit the limit we should shrink the unused dentries. And most of the
    patches are about this.

    > Pekka
    > .

     \ /
      Last update: 2011-08-15 13:41    [W:0.020 / U:75.680 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site