Re: CGroups and pthreads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kernel version is 2.6.32 stock kernel for Red Hat Enterprise Linux 6.

Is there anyone on this list with good knowledge of how the memory subsystem
behaves?


On 27 January 2014 16:36, Dermot McGahon <dmcgahon@xxxxxxxxxxx> wrote:
> Is it possible to apply cgroup memory subsystem controls to threads created
> with
> pthread_create() / clone or only tasks that have been created using fork and
> exec?
>
> In testing, we seem to be seeing that all allocations are accounted for
> against the
> PPID / TGID and never the pthread_create()'d TID, even though the TID is an
> LWP
> and can be seen using top (though RSS is aggregate and global of course).
>
> Attached is a simple test program used to print PID / TID and allocate
> memory
> from a cloned TID. After setting breakpoints in child and parent and setting
> up a
> cgroups hierarchy of 'parent' and 'child', apply memory.limit_in_bytes and
> memory.memsw.limit_in_bytes to the child cgroup only and adding the PID to
> the parent group and the TID to the child group we see that behaviour.
>
> Is that expected? I realise that the subsystems are all different but what
> is confusing
> us slightly is that we have previously used the CPU subsystem to set
> cpu_shares
> and adding LWP / TID's to individual cgroups worked just fine for that
>
> Am I misconfiguring somehow or is this a known difference between CPU and
> MEMORY subsystems?
>
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux