]> git.karo-electronics.de Git - karo-tx-linux.git/commit
execve: improve interactivity with large arguments
authorRoland McGrath <roland@redhat.com>
Wed, 8 Sep 2010 02:36:28 +0000 (19:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:43:26 +0000 (12:43 -0700)
commit43bcb928c27f7a0fc53b95fac85354ee73b6cd1b
tree40b08b48f09dff03427f7badce46761fe30b27b1
parentb48366b5f84c8a52dca99b241c444793ec6dd771
execve: improve interactivity with large arguments

commit 7993bc1f4663c0db67bb8f0d98e6678145b387cd upstream.

This adds a preemption point during the copying of the argument and
environment strings for execve, in copy_strings().  There is already
a preemption point in the count() loop, so this doesn't add any new
points in the abstract sense.

When the total argument+environment strings are very large, the time
spent copying them can be much more than a normal user time slice.
So this change improves the interactivity of the rest of the system
when one process is doing an execve with very large arguments.

Signed-off-by: Roland McGrath <roland@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/exec.c