Heya,

just wanted to let everybody know that I reverted the logic in
pam_sytemd which automatically creates a cgroup in the 'cpu' hierarchy
for every user/session, since it makes it impossible to use RT
scheduling from user/session processes then. For a longer explanation
see the patch I commited (attachment).

This probably needs to be fixed in the kernel before we can enable this
by default again in systemd.

This is related to the issue reported in LWN about JACK+cgroups. Also,
this issue breaks my 4 line bash patch as known from slashdot, and I am
wondering if the auto-grouping kernel patch is affected by this too.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
--- Begin Message ---
 src/pam-module.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5e4ef5e0d2f53a143122a41f3990011b9a3bf628
Author: Lennart Poettering <lenn...@poettering.net>
Date:   Fri Dec 24 10:48:20 2010 +0100

    pam: do not sort user sessions into their own cgroups in the 'cpu' 
hierarchy by default
    
    While this offers quite a few benefits for normally scheduled processes
    this breaks RT scheduling for all user processes, since we do not assign
    an RT share to the cgroups created via this mechanism. If the user
    cgroups have no RT share assigned no member process can make use of RT
    functionality. However, software like JACK and PA/rtkit assume that RT
    is available in some way or another, either via RLIMIT_RTPRIO or via
    some privileged service. Creating implicit cpu cgroups but not adding
    RT shares to them hence breaks these applications.
    
    There is no sane way to implicitly add RT shares to these groups, since
    they are pulled from a global, limited pool and it would hence be very
    hard to make this work without limiting the number of concurrent
    sessions, or constantly rewriting the cpu share settings of already
    logged in session cgroups.
    
    Most likely this issue needs to be fixed in-kernel because we can enable
    this feature by default again.

diff --git a/src/pam-module.c b/src/pam-module.c
index 54a7b45..6fbaecf 100644
--- a/src/pam-module.c
+++ b/src/pam-module.c
@@ -102,6 +102,7 @@ static int parse_argv(pam_handle_t *handle,
                 }
         }
 
+#if 0
         if (!controller_set && controllers) {
                 char **l;
 
@@ -112,6 +113,7 @@ static int parse_argv(pam_handle_t *handle,
 
                 *controllers = l;
         }
+#endif
 
         if (controllers)
                 strv_remove(*controllers, "name=systemd");

_______________________________________________
systemd-commits mailing list
systemd-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-commits

--- End Message ---
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to