Re: [PATCH] stopmachine: add stopmachine_timeout

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rusty Russell <rusty@...>
Cc: Christian Borntraeger <borntraeger@...>, Hidetoshi Seto <seto.hidetoshi@...>, <linux-kernel@...>, Heiko Carstens <heiko.carstens@...>, <virtualization@...>, Zachary Amsden <zach@...>
Date: Monday, July 14, 2008 - 2:56 pm

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] stopmachine: add stopmachine_timeout, Hidetoshi Seto, (Mon Jul 14, 3:52 am)
[PATCH] stopmachine: add stopmachine_timeout v4, Hidetoshi Seto, (Thu Jul 17, 2:12 am)
Re: [PATCH] stopmachine: add stopmachine_timeout v4, Max Krasnyansky, (Thu Jul 17, 3:09 am)
[PATCH] stopmachine: add stopmachine_timeout v2, Hidetoshi Seto, (Wed Jul 16, 12:27 am)
Re: [PATCH] stopmachine: add stopmachine_timeout v2, Jeremy Fitzhardinge, (Wed Jul 16, 6:11 am)
Re: [PATCH] stopmachine: add stopmachine_timeout v2, Hidetoshi Seto, (Wed Jul 16, 11:40 pm)
Re: [PATCH] stopmachine: add stopmachine_timeout v2, Rusty Russell, (Fri Jul 18, 12:18 am)
Re: [PATCH] stopmachine: add stopmachine_timeout v2, Jeremy Fitzhardinge, (Thu Jul 17, 1:37 am)
Re: [PATCH] stopmachine: add stopmachine_timeout v2, Max Krasnyansky, (Wed Jul 16, 2:23 am)
Re: [PATCH] stopmachine: add stopmachine_timeout v2, Hidetoshi Seto, (Wed Jul 16, 2:35 am)
[PATCH] stopmachine: add stopmachine_timeout v3, Hidetoshi Seto, (Wed Jul 16, 2:51 am)
Re: [PATCH] stopmachine: add stopmachine_timeout v3, Peter Zijlstra, (Wed Jul 16, 3:33 am)
Re: [PATCH] stopmachine: add stopmachine_timeout v3, Hidetoshi Seto, (Wed Jul 16, 4:12 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Christian Borntraeger, (Mon Jul 14, 7:51 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Rusty Russell, (Mon Jul 14, 8:34 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Jeremy Fitzhardinge, (Mon Jul 14, 2:56 pm)
Re: [PATCH] stopmachine: add stopmachine_timeout, Heiko Carstens, (Mon Jul 14, 5:20 pm)
Re: [PATCH] stopmachine: add stopmachine_timeout, Hidetoshi Seto, (Mon Jul 14, 10:24 pm)
Re: [PATCH] stopmachine: add stopmachine_timeout, Max Krasnyansky, (Mon Jul 14, 10:37 pm)
Re: [PATCH] stopmachine: add stopmachine_timeout, Max Krasnyansky, (Mon Jul 14, 10:24 pm)
Re: [PATCH] stopmachine: add stopmachine_timeout, Rusty Russell, (Tue Jul 15, 4:09 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Christian Borntraeger, (Wed Jul 16, 5:15 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Max Krasnyansky, (Tue Jul 15, 4:51 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Heiko Carstens, (Tue Jul 15, 4:39 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Heiko Carstens, (Tue Jul 15, 2:09 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Rusty Russell, (Mon Jul 14, 9:14 pm)
Re: [PATCH] stopmachine: add stopmachine_timeout, Rusty Russell, (Mon Jul 14, 6:43 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Hidetoshi Seto, (Mon Jul 14, 9:11 pm)
Re: [PATCH] stopmachine: add stopmachine_timeout, Rusty Russell, (Tue Jul 15, 3:50 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Hidetoshi Seto, (Wed Jul 16, 12:05 am)
Re: [PATCH] stopmachine: add stopmachine_timeout, Rusty Russell, (Sun Jul 20, 5:45 am)
[PATCH] stopmachine: allow force progress on timeout, Hidetoshi Seto, (Mon Jul 21, 11:28 pm)
Re: [PATCH] stopmachine: add stopmachine_timeout, Hidetoshi Seto, (Mon Jul 14, 4:19 am)