mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Jan Niehusmann <jan@gondor.com>
Cc: Andi Kleen <ak@suse.de>, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Error in x86 CPU capabilities starting with test5/6
Date: Fri, 17 Nov 2000 13:22:37 +0100	[thread overview]
Message-ID: <20001117132237.A4525@gruyere.muc.suse.de> (raw)
In-Reply-To: <3A14FF48.E554BE1B@home.com> <14869.6415.500026.432150@harpo.it.uu.se> <20001117130418.B3572@gruyere.muc.suse.de> <20001117131430.B29836@gondor.com>
In-Reply-To: <20001117131430.B29836@gondor.com>; from jan@gondor.com on Fri, Nov 17, 2000 at 01:14:30PM +0100

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/

  reply	other threads:[~2000-11-17 12:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-17  9:50 Jordan
2000-11-17 11:39 ` Mikael Pettersson
2000-11-17 11:58   ` Tigran Aivazian
2000-11-17 12:10     ` Alan Cox
2000-11-17 12:51       ` Christoph Rohland
2000-11-17 13:08         ` Jeff Garzik
2000-11-17 13:21           ` Christoph Rohland
2000-11-17 13:31             ` Andi Kleen
2000-11-17 13:40               ` Jeff Garzik
2000-11-17 13:54                 ` Andi Kleen
2000-11-17 14:02                   ` Tigran Aivazian
2000-11-17 14:30                     ` Christoph Rohland
2000-11-17 14:50                       ` Alan Cox
2000-11-17 14:00                 ` Arjan van de Ven
2000-11-17 15:18         ` Andrea Arcangeli
2000-11-17 16:06           ` Christoph Rohland
2000-11-17 18:28             ` Andrea Arcangeli
2000-11-18  9:57               ` Christoph Rohland
2000-11-19 10:31               ` Albert D. Cahalan
2000-11-17 13:38     ` Mikael Pettersson
2000-11-17 12:04   ` Andi Kleen
2000-11-17 12:14     ` Jan Niehusmann
2000-11-17 12:22       ` Andi Kleen [this message]
2000-11-17 13:26 ` Mohammad A. Haque

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001117132237.A4525@gruyere.muc.suse.de \
    --to=ak@suse.de \
    --cc=jan@gondor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®