Re: [PATCH] lguest-fix-divide-error-implement-sched_clock

2007-06-05 Thread Andi Kleen
On Tuesday 05 June 2007 23:15:28 H. Peter Anvin wrote: > Andi Kleen wrote: > > > > I don't think it's a good idea for the TSC. There are various > > setups where it is unreliable and also often simulators don't > > implement it correctly. And it's always a valuable workaround > > to be able to tu

Re: [PATCH] lguest-fix-divide-error-implement-sched_clock

2007-06-05 Thread H. Peter Anvin
Andi Kleen wrote: > > I don't think it's a good idea for the TSC. There are various > setups where it is unreliable and also often simulators don't > implement it correctly. And it's always a valuable workaround > to be able to turn it off. > For all I can tell, if this is the case, then CONFIG

Re: [PATCH] lguest-fix-divide-error-implement-sched_clock

2007-06-05 Thread Andi Kleen
> > That's a vendor check foul. That should be a CPU feature flag. > > Looks like there is some work to be done here. No. That would just move that code elsewhere, but there is still only a single caller who actually uses this. Besides there are further checks to be done here (see x86-64) whic

Re: [PATCH] lguest-fix-divide-error-implement-sched_clock

2007-06-05 Thread H. Peter Anvin
Andi Kleen wrote: > > I don't think it's a good idea for the TSC. There are various > setups where it is unreliable and also often simulators don't > implement it correctly. And it's always a valuable workaround > to be able to turn it off. > I dug some more into the TSC code, and found some ot

Re: [PATCH] lguest-fix-divide-error-implement-sched_clock

2007-06-05 Thread H. Peter Anvin
Andi Kleen wrote: > > I don't think it's a good idea for the TSC. There are various > setups where it is unreliable and also often simulators don't > implement it correctly. And it's always a valuable workaround > to be able to turn it off. > > Except possibly for the FPU only features used by t

Re: [PATCH] lguest-fix-divide-error-implement-sched_clock

2007-06-05 Thread Andi Kleen
On Tuesday 05 June 2007 18:16, H. Peter Anvin wrote: > Yes. Since there is now a mechanism to get a clean message out, it > seemed like a good idea to extend the benefit of static determination. > Andi already had in his tree -- and I copied it -- code to deal with > stuff like "cpu_has_tsc" as a

Re: [PATCH] lguest-fix-divide-error-implement-sched_clock

2007-06-05 Thread H. Peter Anvin
Andrew Morton wrote: > On Tue, 5 Jun 2007 16:24:52 +0200 Andi Kleen <[EMAIL PROTECTED]> wrote: > >> On Tuesday 05 June 2007 15:11, Rusty Russell wrote: >>> On Tue, 2007-06-05 at 12:01 +0200, Andi Kleen wrote: > But TSC is a "required feature", so "cpu_has_tsc" is always true. Hmm? It isn'

Re: [PATCH] lguest-fix-divide-error-implement-sched_clock

2007-06-05 Thread Andrew Morton
On Tue, 5 Jun 2007 16:24:52 +0200 Andi Kleen <[EMAIL PROTECTED]> wrote: > On Tuesday 05 June 2007 15:11, Rusty Russell wrote: > > On Tue, 2007-06-05 at 12:01 +0200, Andi Kleen wrote: > > > > But TSC is a "required feature", so "cpu_has_tsc" is always true. > > > > > > Hmm? It isn't. What makes you

Re: [PATCH] lguest-fix-divide-error-implement-sched_clock

2007-06-05 Thread Andi Kleen
On Tuesday 05 June 2007 15:11, Rusty Russell wrote: > On Tue, 2007-06-05 at 12:01 +0200, Andi Kleen wrote: > > > But TSC is a "required feature", so "cpu_has_tsc" is always true. > > > > Hmm? It isn't. What makes you think so? > > Interestingly it seems to be only in -mm. If it is then it doesn't