Skip to content

Commit

Permalink
Fix kevent's childs priority greediness
Browse files Browse the repository at this point in the history
Fix kevent's childs priority greediness.  Such tasks were always scheduled
at nice level -5 and, at that time, udev stole us the CPU time with -5.

Already posted at http://lkml.org/lkml/2005/1/10/85

[akpm@linux-foundation.org: add comment]
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jan Engelhardt authored and Linus Torvalds committed May 8, 2007
1 parent 6672f76 commit b73a7e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/kmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ static int ____call_usermodehelper(void *data)
/* We can run anywhere, unlike our parent keventd(). */
set_cpus_allowed(current, CPU_MASK_ALL);

/*
* Our parent is keventd, which runs with elevated scheduling priority.
* Avoid propagating that into the userspace child.
*/
set_user_nice(current, 0);

retval = -EPERM;
if (current->fs->root)
retval = kernel_execve(sub_info->path,
Expand Down

0 comments on commit b73a7e7

Please sign in to comment.