From: Tom Hughes (thh_at_cyberscience.com)
Date: Wed Jan 09 2002 - 10:33:17 GMT
In message <3C3C16F4.8B8CE156_at_ccieurope.com> Flemming Madsen <fma_at_ccieurope.com> wrote: > I have always wondered why Ups would take up all CPU on linux > while the target is running. In my experience that _is_ happening. It was only taking around 20-30% on my machine, but it is a dual 1.33GHz Athlon and slower systems might see somewhat higher utilisation. > Why not usleep() for maybe 10ms for each iteration. That would most > probably take the CPU load down to a sub-percent level. I had considered that actually ;-) It is a bit hacky, but it does indeed seem to have the desired effect. Here's a patch for anyone that wants to try it: --- ups-3.37-beta4/ups/ao_ptrace.c.orig Wed Jan 9 10:30:00 2002 +++ ups-3.37-beta4/ups/ao_ptrace.c Wed Jan 9 10:30:10 2002 @@ -257,6 +257,7 @@ want_timer = 0; } } + usleep(10); continue; } else if (user_wants_stop(FALSE)) /* RGA so Stop button breaks */ Tom -- Tom Hughes (thh_at_cyberscience.com) Software Engineer, Cyberscience Corporation http://www.cyberscience.com/
This archive was generated by hypermail 2.1.4 : Wed Feb 13 2002 - 21:51:34 GMT