lkml.org 
[lkml]   [2000]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Error in x86 CPU capabilities starting with test5/6
On Fri, Nov 17, 2000 at 01:14:30PM +0100, Jan Niehusmann wrote:
> On Fri, Nov 17, 2000 at 01:04:18PM +0100, Andi Kleen wrote:
> > The program would be broken if it executed CPUID itself, because it has no way to guarantee
> > that the CPUID is executed on all CPUs the scheduler may later move the task too.
>
> I wonder what's the right way for an app to ask the kernel if, for example,
> tsc is available. As you stated above, executing CPUID is probably wrong.
> But if the process parses /proc/cpuinfo, it has to make sure tsc is available
> on all cpus it may run on, doesn't it?

Just check all the flags and fall back to the code not using the feature
if any doesn't support it.

>
> What about some system call stating 'I want to use feature XYZ'. If all CPUs
> implement XYZ, the system call simply returns some ACK, and NACK if no CPU
> implements it (and no emulation is available).

That would strike me as overkill.

>
> If only some CPUs implement the feature, the kernel may return NACK,
> or it may make sure the process will only run on CPUs implementing the
> feature and return ACK. Is this usefull? It's just an idea ;-) I wonder
> if there are many features that may be available only on some CPUs in an
> 'SMP' system.

Generally it is probably a rare case, otherwise there would be more bug reports
on it (because e.g. for the FXSR case a lot of SSE supporting kernels panic
on boot)



-Andi


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:47    [W:0.123 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site