[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071001144402.GA3505@elte.hu>
Date: Mon, 1 Oct 2007 16:44:02 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Dhaval Giani <dhaval@...ux.vnet.ibm.com>
Cc: Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
Mike Galbraith <efault@....de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Dmitry Adamushko <dmitry.adamushko@...il.com>,
lkml <linux-kernel@...r.kernel.org>, maneesh@...ux.vnet.ibm.com,
Andrew Morton <akpm@...ux-foundation.org>,
Sudhir Kumar <skumar@...ux.vnet.ibm.com>
Subject: Re: [RFC/PATCH] Add sysfs control to modify a user's cpu share
hi Dhaval,
* Dhaval Giani <dhaval@...ux.vnet.ibm.com> wrote:
> Hi Ingo,
>
> Adds tunables in sysfs to modify a user's cpu share.
>
> A directory is created in sysfs for each new user in the system.
>
> /sys/kernel/uids/<uid>/cpu_share
>
> Reading this file returns the cpu shares granted for the user.
> Writing into this file modifies the cpu share for the user. Only an
> administrator is allowed to modify a user's cpu share.
>
> Ex:
> # cd /sys/kernel/uids/
> # cat 512/cpu_share
> 1024
> # echo 2048 > 512/cpu_share
> # cat 512/cpu_share
> 2048
> #
looks good to me! I think this API is pretty straightforward. I've put
this into my tree and have updated the sched-devel git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel.git
but there seems to be a bug in it, i get this:
kobject_add failed for 500 with -EEXIST, don't try to register things with the same name in the same directory.
[<c01e1730>] kobject_shadow_add+0x13b/0x169
[<c01e1795>] kobject_set_name+0x28/0x91
[<c01299d5>] user_kobject_create+0x6a/0x90
[<c0129d3c>] alloc_uid+0x141/0x181
[<c012d05c>] set_user+0x1c/0x91
[<c012e4c7>] sys_setresuid+0xd9/0x17d
[<c0103cf6>] sysenter_past_esp+0x5f/0x85
=======================
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists