lkml.org 
[lkml]   [2005]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectRe: keventd gives exceptional priority to usermode helpers
Signed-off-by: Jan Engelhardt <jengelh@linux01.gwdg.de>


--- linux-2.6.8-20041204030200/kernel/kmod.c 2004-12-06 14:28:44.000000000 +0100
+++ linux-2.6.8-20041204030200/kernel/kmod.c 2005-01-06 11:44:04.130600000 +0100
@@ -165,6 +165,7 @@ static int ____call_usermodehelper(void

/* We can run anywhere, unlike our parent keventd(). */
set_cpus_allowed(current, CPU_MASK_ALL);
+ set_user_nice(current, 0);

retval = -EPERM;
if (current->fs->root)



Jan Engelhardt
--
ENOSPC#==============================================================================
# Linux 2.6-HX MODIFICATION
# Copyright (C) Jan Engelhardt <jengelh [at] linux01 gwdg de>, 2004
# -- License restrictions apply (GPL2)
# -- For details see doc/GPL2.txt.
# http://linux01.org:2222/prog-hxtools.php
#==============================================================================
#
# - udev and friends need a fair amount of CPU, and really bring down the
# system when they run -- usually in nice -5
# Fix it in that usermode helpers always get nice 0 by default
#
#------------------------------------------------------------------------------
diff -dpu usr_A/src/kotd/linux-2.6.8-20041204030200/kernel/kmod.c usr_B/src/kotd/linux-2.6.8-20041204030200/kernel/kmod.c
--- linux-2.6.8-20041204030200/kernel/kmod.c 2004-12-06 14:28:44.000000000 +0100
+++ linux-2.6.8-20041204030200/kernel/kmod.c 2005-01-06 11:44:04.130600000 +0100
@@ -165,6 +165,7 @@ static int ____call_usermodehelper(void

/* We can run anywhere, unlike our parent keventd(). */
set_cpus_allowed(current, CPU_MASK_ALL);
+ set_user_nice(current, 0);

retval = -EPERM;
if (current->fs->root)
\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.608 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site