On Thu, 2008-05-15 at 13:57 +0300, Avi Kivity wrote:
> Subrata Modak wrote:
> > Avi,
> >
> > Are you using some test cases to test this CPU Hotplug issue ? If yes, 
> > can you please share them with us.
> >
> 
> I'm running the attached script to exercise hotplug.  As load I run 7 
> kvm guests  (each an FC6 x86_64), a few of which are running a bash spin 
> loop (while :; do :; done).

Thanks Avi for sharing the script. I am of the idea to get CPU and
Memory Hotplug test cases for LTP. Somebody needs to figure out how we
can integrate this to LTP either the same vanilla script or change in
some form or the other. Also, how we should be doing the testing:
Standalone tests or integrated tests.

Regards--
Subrata

> 
> plain text document attachment (toggle-processors)
> #!/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)
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft 
> Defy all challenges. Microsoft(R) Visual Studio 2008. 
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________ Ltp-list mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/ltp-list


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to