Rusty Russell wrote:Hm, yeah. But in this case, it's tricky. CPU time is an inherently per-cpu quantity. If cpu A is waiting for cpu B, and wants to do the timeout in cpu-seconds, then it has to be in *B*s cpu-seconds (and if A is waiting on B,C,D,E,F... it needs to measure separate timeouts with separate timebases for each other CPU). It also means that if B is unresponsive but also not consuming any time (blocked in IO, administratively paused, etc), then the timeout will never trigger. So I think monotonic wallclock time actually makes the most sense here. The other issue is whether cpu_relax() is the right thing to put in the busywait. We don't hook it in pvops, so it's just an x86 "pause" instruction, so from the hypervisor's perspective it just looks like a spinning CPU. We could either hook cpu_relax() into a hypervisor yield, or come up with a heavier-weight cpu_snooze() (cpu_relax() is often used in loops which are expected to have a short duration, where doing a hypercall+yield would be overkill). J --
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Eric W. Biederman | [PATCH 02/10] sysfs: Support for preventing unmounts. |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Re: LSM conversion to static interface |
git: | |
| Antonio Almeida | HTB accuracy for high speed |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 18/37] dccp: Support for Mandatory options |
| Timo Teräs | Re: xfrm_state locking regression... |
