From: Andrea Arcangeli <andrea@suse.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "Udo A. Steinberg" <sorisor@Hell.WH8.TU-Dresden.De>,
Andi Kleen <ak@suse.de>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.4.1-pre1 breaks XFree 4.0.2 and "w"
Date: Fri, 12 Jan 2001 17:02:34 +0100 [thread overview]
Message-ID: <20010112170234.A2766@athlon.random> (raw)
In-Reply-To: <20010112044554.A809@athlon.random> <Pine.LNX.4.10.10101112018220.28973-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.10.10101112018220.28973-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Thu, Jan 11, 2001 at 08:26:04PM -0800
On Thu, Jan 11, 2001 at 08:26:04PM -0800, Linus Torvalds wrote:
>
>
> On Fri, 12 Jan 2001, Andrea Arcangeli wrote:
> >
> > Note that there was a precise reason for not implementing it as the TSC disable
> > (infact at first in 2.2.x I was clearing the bigflag in x86_capabilities too).
> > The reason is that the way TSC gets disabled breaks /proc/cpuinfo.
>
> No.
>
> It FIXES /proc/cpuinfo.
>
> Your alternative patch is the thing that breaks.
In 2.2.*, 2.4.0, 2.4.1-pre[12] and 2.4.0ac* `fxsr' and `xmm' in /proc/cpuinfo
means "cpu_has", you changed their meaning in 2.4.1-pre3 to "can_I_use". So now
unless you check the `uname -r` first you don't know anymore what fxsr and xmm
means (if either "cpu_has" or "can_I_use").
This means 2.4.1-pre3 broke /proc/cpuinfo IMHO (while pre2 plus my patch
didn't break anything).
> We _want_ /proc/cpuinfo to reflect the fact that the kernel considers
> FSXR/XMM to not exist. That is true information, and is in fact something
> that install scripts etc can find extremely useful.
The "cpu_has" is true information as well (certainly it's less interesting than
the "can_I_use" but that that's not a good reason for dropping the "cpu_has"
information while breaking the semantics of fxsr/xmm in /proc/cpuinfo).
> In particular, imagine an installation script that wants to install the
> proper optimized version of a library on a machine. How is it supposed to
> know whether it should use the mmx version, the xmm version, or the
> integer version?
Any userspace software that will use `fxsr' and `xmm' information in
/proc/cpuinfo as "can_I_use" will work correctly _only_ in 2.4.1-pre3 and later
kernels (unless it does checks on the kernel revision it's running on first)
and it will break in all 2.2.x, 2.4.0 and 2.4.1-pre[12] (if it's not
checking the kernel revision). This is also a proof of what I said above.
Nobody should ever consider fxsr and xmm as "can_I_use" for backwards
compatibilty reasons with 2.4.0 and 2.2.*.
> This is _exactly_ the kind of thing that /proc/cpuinfo was supposed to be
> able to deal with, and that means that if the kernel doesn't like to use
/proc/cpuinfo shows per-cpu infos, it's always been the "cpu_has" _per-cpu_
info (not the _global_ "can_I_use").
It doesn't make much sense to me to put the "can_I_use" global information in
the per-cpu slots, that's obviously the wrong place for it. We simply need to
add a new entry to /proc (say "/proc/osinfo") to provide the "can_I_use"
informations instead (TSC included). Breaking /proc/cpuinfo isn't the way to
go IMHO.
> xmm for some reason (ie the user explicitly told it to), then it shouldn't
> show up in /proc/cpuinfo - because on that machine XMM simply does not
> exist as far as user-land is concerned.
So then why does bogomips and and f00f_bug and similar things show up in
/proc/cpuinfo if they aren't useful to user-land either?
/proc/cpuinfo is providing info that isn't just useful for user-land software
agreed, but it's useful for the user to see the details of his hw. That's
always been the case. In 2.2.x and 2.4.0 the user wasn't allowed to use xmm but
he _wanted_ to see "xmm" in the flags field to know the details of his
hardware. That's not an information for userland software but just for the
user.
> Similarly, when we disable TSC, it's also telling user-land that this
> machine does not appear to have a working TSC for some reason. User-land
And IMHO that's wrong too.
> After all, a user can always do a "cpuid" to get to know what the CPU
> itself reports. /proc/cpuinfo is supposed to be a higher-level interface,
> where the buggy bits have been removed or renamed (ie AMD extensions are
> properly renamed and can be easily recognized as such, without each
> user-mode application having to know about the magic meaning of bits in
> "cpuid" on different machines).
cpuid says the "cpu_has" not the "can_I_use" too.
Andrea
-
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/
next prev parent reply other threads:[~2001-01-12 16:04 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-10 13:31 2.4.1-pre1 breaks XFree 4.0.2 and "w" Udo A. Steinberg
2001-01-10 17:15 ` Ingo Oeser
2001-01-10 17:07 ` Udo A. Steinberg
2001-01-10 20:00 ` Jonathan Hudson
2001-01-11 8:41 ` Linus Torvalds
2001-01-11 12:54 ` Alan Cox
[not found] ` <200101110841.AAA01652@penguin.transmeta.com>
2001-01-11 10:05 ` Udo A. Steinberg
2001-01-11 10:11 ` Andi Kleen
2001-01-11 10:31 ` Udo A. Steinberg
2001-01-11 17:36 ` Andrea Arcangeli
2001-01-11 17:46 ` Andrea Arcangeli
2001-01-11 17:48 ` Andrea Arcangeli
2001-01-11 18:53 ` Andrea Arcangeli
2001-01-12 2:08 ` Linus Torvalds
2001-01-12 3:45 ` Andrea Arcangeli
2001-01-12 4:26 ` Linus Torvalds
2001-01-12 16:02 ` Andrea Arcangeli [this message]
2001-01-12 16:42 ` Richard A Nelson
2001-01-12 17:05 ` Andrea Arcangeli
2001-01-12 17:35 ` Linus Torvalds
2001-01-12 17:54 ` Alan Cox
2001-01-12 18:35 ` Linus Torvalds
2001-01-12 18:57 ` Andrea Arcangeli
2001-01-12 19:19 ` Laramie Leavitt
2001-01-12 20:39 ` Mark Hahn
2001-01-12 18:24 ` Andrea Arcangeli
2001-01-15 20:33 ` [PATCH] i386/setup.c cpuinfo notsc Hugh Dickins
2001-01-15 20:48 ` H. Peter Anvin
2001-01-15 21:38 ` Maciej W. Rozycki
2001-01-15 21:41 ` H. Peter Anvin
2001-01-15 21:51 ` Maciej W. Rozycki
2001-01-16 3:47 ` H. Peter Anvin
2001-01-15 21:34 ` Maciej W. Rozycki
2001-01-18 16:39 ` [PATCH] udf writepage UnlockPage Hugh Dickins
2001-01-28 14:43 ` Hugh Dickins
2001-01-12 4:28 ` 2.4.1-pre1 breaks XFree 4.0.2 and "w" TimO
2001-01-12 6:06 ` Udo A. Steinberg
2001-01-12 9:47 ` Harold Oga
-- strict thread matches above, loose matches on Subject: below --
2001-01-11 4:58 Floating point broken between 2.4.0-ac4 and -ac5? junio
2001-01-11 12:42 ` Alan Cox
2001-01-11 17:16 ` junio
2001-01-12 3:27 ` Aaron Lehmann
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=20010112170234.A2766@athlon.random \
--to=andrea@suse.de \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sorisor@Hell.WH8.TU-Dresden.De \
--cc=torvalds@transmeta.com \
/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