aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNigel Cunningham <ncunningham@crca.org.au>2008-12-09 06:40:20 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-12-09 13:34:33 -0500
commitec9a13cdbfc8cf29502096ca69b65f07184a9b2c (patch)
tree82657074c8585eea943f20d41866784a4f79d45f /drivers
parent437f2f91d6597c67662f847d9ed4c99cb3c440cd (diff)
ieee1394: node manager causes up to ~3.25s delay in freezing tasks
The firewire nodemanager function "nodemgr_host_thread" contains a loop that calls try_to_freeze near the top of the loop, but then delays for up to 3.25 seconds (plus time to do work) before getting back to the top of the loop. When starting a cycle post-boot, this doesn't seem to bite, but it is causing a noticeable delay at boot time, when freezing processes prior to starting to read the image. The following patch adds invocation of try_to_freeze to the subloops that are used in the body of this function. With these additions, the time to freeze when starting to resume at boot time is virtually zero. I'm no expert on firewire, and so don't know that we shouldn't check the return value and jump back to the top of the loop or such like after being frozen, but I submit it for your consideration. Signed-off-by: Nigel Cunningham <nigel@tuxonice.net> The delay until nodemgr freezes was up to 0.25s (plus time for node probes) in Linux 2.6.27 and older and up to 3.25s (plus ~) since Linux 2.6.28-rc1, hence much more noticeable. try_to_freeze() without any jump is correct. The surrounding code in the respective loops will catch whether another bus reset happens during the freeze and handle it. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee1394/nodemgr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 9e39f73282ee..d333ae22459c 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -1685,6 +1685,7 @@ static int nodemgr_host_thread(void *data)
1685 g = get_hpsb_generation(host); 1685 g = get_hpsb_generation(host);
1686 for (i = 0; i < 4 ; i++) { 1686 for (i = 0; i < 4 ; i++) {
1687 msleep_interruptible(63); 1687 msleep_interruptible(63);
1688 try_to_freeze();
1688 if (kthread_should_stop()) 1689 if (kthread_should_stop())
1689 goto exit; 1690 goto exit;
1690 1691
@@ -1725,6 +1726,7 @@ static int nodemgr_host_thread(void *data)
1725 /* Sleep 3 seconds */ 1726 /* Sleep 3 seconds */
1726 for (i = 3000/200; i; i--) { 1727 for (i = 3000/200; i; i--) {
1727 msleep_interruptible(200); 1728 msleep_interruptible(200);
1729 try_to_freeze();
1728 if (kthread_should_stop()) 1730 if (kthread_should_stop())
1729 goto exit; 1731 goto exit;
1730 1732