Alexander Graf wrote:
Please make sure cpu hotplug/hotunplug (and this suspend/resume)
still work.
Make sure as in test?
I use this:
#!/usr/bin/python
import commands, time, random
processors = int(commands.getoutput('getconf _NPROCESSORS_CONF'))
def fname(cpu):
return '/sys/devices/system/cpu/cpu%s/online' % (cpu,)
def get_state(cpu):
return int(file(fname(cpu)).read())
def set_state(cpu, state):
file(fname(cpu), 'w').write(str(state))
try:
while True:
cpu = random.randint(1, processors - 1)
state = 1 - get_state(cpu)
set_state(cpu, state)
time.sleep(1)
except KeyboardInterrupt:
for cpu in range(1, processors):
if not get_state(cpu):
set_state(cpu, 1)
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html