lkml.org 
[lkml]   [2015]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched, autogroup: Fix failure when writing to cpu.rt_runtime_us
On Thu, Feb 05, 2015 at 04:33:24PM +0800, Zefan Li wrote:
> This is how to reproduce the bug:
>
> int main() {
> struct sched_param param = {.sched_priority=1};
>
> if (fork() > 0)
> exit(0);
>
> setsid();
>
> if (sched_setscheduler(0, SCHED_RR, &param) < 0){
> perror("failed to sched_setscheduler()");
> return -1;
> }
>
> while(1)
> ;
> }
>
> # ./test
> # mount -t cgroup -o cpu xxx /cgroup
> # cat /cgroup/cpu.rt_runtime_us
> 950000
> # echo 940000 > /cgroup/cpu.rt_runtime_us
> Device or Resource busy

That's -EBUSY, but you're changing an -EPERM condition. Neither your
patch nor explanation of the matter make sense.



\
 
 \ /
  Last update: 2015-02-05 15:41    [W:0.117 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site