From: "Kevin D. Kissell" <kevink@mips.com>
To: "Jun Sun" <jsun@mvista.com>, <linux-mips@oss.sgi.com>
Subject: Re: config option vs. run-time detection (the debate continues ...)
Date: Thu, 8 Feb 2001 23:06:33 +0100 [thread overview]
Message-ID: <01bf01c0921b$6de26620$0deca8c0@Ulysses> (raw)
In-Reply-To: 3A830135.B1304041@mvista.com
> I love this topic!
Well, I'm glad *you're* having fun! ;-)
> Instead of replying to 10 different emails, I decide to sort out my best
> understanding of this topic and list them here, including some of MY
responses
> to some of the issues.
>
> Definition:
> ------------
>
> 1. Config option approach :
>
> In the kernel config menu, one picks one or more CPUs. One also specifies
> whether the CPU(s) have a FPU.
>
> All FPU related code in kernel is configured in or out based on the CONFIG
> setting.
As has been noted in other messages in this exchange, whether one
has an FPU or not isn't really the determining factor in including FP
support code in the kernel. The bulk of it is the emulator, and the
emulator needs to be there if you want to execute binaries built
to include MIPS FP instructions, whether in full emulation or using
the FPU (for the denormal cases, etc.).
So your CONFIG option would really be to say, regardless of
the CPU, whether your kernel can handle an FPU-ful userland,
or is stripped down to support only 100% integer binaries.
> 2. run-time detection approach:
>
> CPU probing code probes CPU and sets has_fpu field in the mips_cpu
structure.
>
> All FPU related code is on a conditional branch based on has_fpu value.
Again, the FPU-related code has to be there any time you're
going to run FP binaries. The MIPS_CPU_FPU bit simply
tells the kernel how/when to use it.
...
> My Conclusion
> --------------
>
> Clearly, it is a trade-off decision based how much one values the minuses
and
> pluses of both approaches.
>
> While I do agree the minus for run-time detection are not serious ones, I
> think the minus for config option is even less serious. Having the same
> kernel image runs on multiple CPUs is very nice. I just doubt about the
> usefulness of requiring the same kernel image to run on CPUs both with a
FPU
> and without a FPU.
If you're building kernels for a workstation, that may be
true. If you're building kernels for a testbed where you're
swapping CPU modules, it's actually rather nice to have
a single kernel that boots on any of them. I personally
find myself in this situation. Or to provide a less lab-oriented
example, NEC has the R43xx family which have FPUs,
and Toshiba markets some R49xx parts that are pin-compatible
but cheaper - because they have no FPU. If I were building
a Linux-based system around either one, memory permitting,
I would want to have a kernel that could cope with either of
them, to simplify the product management problem if I ever
ended up wanting to cut over from one to the other.
Kevin K.
WARNING: multiple messages have this Message-ID (diff)
From: "Kevin D. Kissell" <kevink@mips.com>
To: Jun Sun <jsun@mvista.com>, linux-mips@oss.sgi.com
Subject: Re: config option vs. run-time detection (the debate continues ...)
Date: Thu, 8 Feb 2001 23:06:33 +0100 [thread overview]
Message-ID: <01bf01c0921b$6de26620$0deca8c0@Ulysses> (raw)
Message-ID: <20010208220633.8forkBq9dkj2Q8RLm218M1lprToAfkDDNHKPYB0di3w@z> (raw)
In-Reply-To: 3A830135.B1304041@mvista.com
> I love this topic!
Well, I'm glad *you're* having fun! ;-)
> Instead of replying to 10 different emails, I decide to sort out my best
> understanding of this topic and list them here, including some of MY
responses
> to some of the issues.
>
> Definition:
> ------------
>
> 1. Config option approach :
>
> In the kernel config menu, one picks one or more CPUs. One also specifies
> whether the CPU(s) have a FPU.
>
> All FPU related code in kernel is configured in or out based on the CONFIG
> setting.
As has been noted in other messages in this exchange, whether one
has an FPU or not isn't really the determining factor in including FP
support code in the kernel. The bulk of it is the emulator, and the
emulator needs to be there if you want to execute binaries built
to include MIPS FP instructions, whether in full emulation or using
the FPU (for the denormal cases, etc.).
So your CONFIG option would really be to say, regardless of
the CPU, whether your kernel can handle an FPU-ful userland,
or is stripped down to support only 100% integer binaries.
> 2. run-time detection approach:
>
> CPU probing code probes CPU and sets has_fpu field in the mips_cpu
structure.
>
> All FPU related code is on a conditional branch based on has_fpu value.
Again, the FPU-related code has to be there any time you're
going to run FP binaries. The MIPS_CPU_FPU bit simply
tells the kernel how/when to use it.
...
> My Conclusion
> --------------
>
> Clearly, it is a trade-off decision based how much one values the minuses
and
> pluses of both approaches.
>
> While I do agree the minus for run-time detection are not serious ones, I
> think the minus for config option is even less serious. Having the same
> kernel image runs on multiple CPUs is very nice. I just doubt about the
> usefulness of requiring the same kernel image to run on CPUs both with a
FPU
> and without a FPU.
If you're building kernels for a workstation, that may be
true. If you're building kernels for a testbed where you're
swapping CPU modules, it's actually rather nice to have
a single kernel that boots on any of them. I personally
find myself in this situation. Or to provide a less lab-oriented
example, NEC has the R43xx family which have FPUs,
and Toshiba markets some R49xx parts that are pin-compatible
but cheaper - because they have no FPU. If I were building
a Linux-based system around either one, memory permitting,
I would want to have a kernel that could cope with either of
them, to simplify the product management problem if I ever
ended up wanting to cut over from one to the other.
Kevin K.
next prev parent reply other threads:[~2001-02-08 22:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-08 20:27 config option vs. run-time detection (the debate continues ...) Jun Sun
2001-02-08 22:06 ` Kevin D. Kissell [this message]
2001-02-08 22:06 ` Kevin D. Kissell
2001-02-08 22:58 ` Jun Sun
2001-02-09 0:25 ` Kevin D. Kissell
2001-02-09 0:25 ` Kevin D. Kissell
2001-02-09 11:48 ` Maciej W. Rozycki
2001-02-09 12:56 ` Kevin D. Kissell
2001-02-09 12:56 ` Kevin D. Kissell
2001-02-09 13:06 ` Maciej W. Rozycki
2001-02-09 19:59 ` Jun Sun
2001-02-09 20:39 ` Maciej W. Rozycki
2001-02-09 21:31 ` Jun Sun
2001-02-10 9:01 ` Maciej W. Rozycki
2001-02-12 18:21 ` Jun Sun
2001-02-13 18:31 ` Maciej W. Rozycki
2001-02-09 22:12 ` Kevin D. Kissell
2001-02-09 22:12 ` Kevin D. Kissell
2001-02-10 9:05 ` Maciej W. Rozycki
2001-02-09 19:58 ` Florian Lohoff
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='01bf01c0921b$6de26620$0deca8c0@Ulysses' \
--to=kevink@mips.com \
--cc=jsun@mvista.com \
--cc=linux-mips@oss.sgi.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