On Fri, Aug 22, 2008 at 04:45:09PM +0530, Sharyathi Nagesh wrote:
> more error checks, but if it is moving vsyscall way I dont think there 
> is any scope for error checking. I will remove this test
> >
> >More interesting would be to test on more CPUs for example, 
> >as in extending getcpu1 to cycle through all CPUs.
> I Dont understand, why we should keep a test like that. This test case 
> is arbitrarily assigns the cpu id of the maximum number, of on line cpu, 
> and test that with the return value of getcpu()

>   I am not understanding what we are trying to achieve by testing on 
> all online CPUs.

That would catch e.g. the case when some CPU is not correctly initialized.
Bonus points when you also do a cpu hot unplug/hot add inbetween
(there have been bugs in the past when something was not correctly
reinitialized then. Also S3 suspend/resume, but  that's more difficult
because it doesn't always work) 


> >Also measuring how long the data stays valid and error out 
> >if it's too long, but that would be likely not quite trivial
> >to test.
>   Can you explain more on this

getcpu() is advisory as there is no guarantee that the value stays
valid because the process could be rescheduled to another CPU any time.
But normally scheduler CPU affinity should avoid that.

So one possible test would be to start a lot of processes (far more
than there are CPUs to create overscheduling) and then measure how
long the getcpu value stays valid and report if it's not long enough.
Or another test start as many processes as there are CPus and check
that the getcpu stays the same for some longer time (say at least a minute)

That might catch bugs in the scheduler CPU affinity code for example,
not necessarily in getcpu(), but I still think it would be a useful
sanity check.

The later check might be need to be made conditional on the system
being otherwise idle.

> I had this question, if we are moving to vsyscall will node_id will 
> still be returned by the i386 code or will it go x86_64 way

Not sure what you mean with x86_64 way?  They both should have
the same semantics in theory.

The main difference of the vsyscall is that
it is faster and that it will segfault instead of EFAULT on a 
invalid address.

-Andi


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to