Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120747
b: refs/heads/master
c: 94d6a5f
h: refs/heads/master
i:
  120745: 73c5d98
  120743: 3f5e5cc
v: v3
  • Loading branch information
Serge E. Hallyn authored and James Morris committed Dec 8, 2008
1 parent ad0bc83 commit c777109
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7657d90497f98426af17f0ac633a9b335bb7a8fb
refs/heads/master: 94d6a5f7341ebaff53d4e41cc81fab37f0d9fbed
21 changes: 21 additions & 0 deletions trunk/Documentation/scheduler/sched-design-CFS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,24 @@ task groups and modify their CPU share using the "cgroups" pseudo filesystem.

# #Launch gmplayer (or your favourite movie player)
# echo <movie_player_pid> > multimedia/tasks

8. Implementation note: user namespaces

User namespaces are intended to be hierarchical. But they are currently
only partially implemented. Each of those has ramifications for CFS.

First, since user namespaces are hierarchical, the /sys/kernel/uids
presentation is inadequate. Eventually we will likely want to use sysfs
tagging to provide private views of /sys/kernel/uids within each user
namespace.

Second, the hierarchical nature is intended to support completely
unprivileged use of user namespaces. So if using user groups, then
we want the users in a user namespace to be children of the user
who created it.

That is currently unimplemented. So instead, every user in a new
user namespace will receive 1024 shares just like any user in the
initial user namespace. Note that at the moment creation of a new
user namespace requires each of CAP_SYS_ADMIN, CAP_SETUID, and
CAP_SETGID.
8 changes: 7 additions & 1 deletion trunk/kernel/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,13 @@ static struct kobj_type uids_ktype = {
.release = uids_release,
};

/* create /sys/kernel/uids/<uid>/cpu_share file for this user */
/*
* Create /sys/kernel/uids/<uid>/cpu_share file for this user
* We do not create this file for users in a user namespace (until
* sysfs tagging is implemented).
*
* See Documentation/scheduler/sched-design-CFS.txt for ramifications.
*/
static int uids_user_create(struct user_struct *up)
{
struct kobject *kobj = &up->kobj;
Expand Down

0 comments on commit c777109

Please sign in to comment.