]> git.baikalelectronics.ru Git - kernel.git/commit
execve: improve interactivity with large arguments
authorRoland McGrath <roland@redhat.com>
Wed, 8 Sep 2010 02:36:28 +0000 (19:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Sep 2010 15:10:26 +0000 (08:10 -0700)
commit0ac950f1b645a617586ecaca9e8b54a30e9e7212
treed283304f635cc5c36d8fa3319dd663209138988e
parent2c8137129063288c2118ef06e4c34de01387ba6f
execve: improve interactivity with large arguments

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>
fs/exec.c