From: jw schultz <jw@pegasys.ws>
To: linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCE] CMOV emulation for 2.4.19-rc1
Date: Thu, 18 Jul 2002 13:44:13 -0700 [thread overview]
Message-ID: <20020718204413.GB26536@pegasys.ws> (raw)
In-Reply-To: <8ff9ed84695e27db@mayday.cix.co.uk>
On Thu, Jul 18, 2002 at 08:15:05PM +0100, Robert de Bath wrote:
> On Tue, 2 Jul 2002, jw schultz wrote:
[something causing printk every n emulation hits]
>
> > wouldn't add too much more overhead than
> >
> > if (!emulation_notice)
> > {
> > emulation_notice = 1;
> > printk(...);
> > }
> >
> > after all this is only supposed to happen under rescue
> > situations. That way it will be sure to be in the logs and
> > maybe even on the console and we won't have to hunt for it.
> >
> > Also, the message should say you are doing instruction
> > emulation. "wrong model cpu, emulating instruction XXX" I
> > doubt indicating the program is helpful unless the tracking
> > is done per task or the printk every time you emulate.
>
> I'd suggest this message could be so frequent that you want to
> link it's display to real time. Check the jiffy counter each
> time and if it's been less that X seconds since the last message
> just up a counter. Plus in the message say how many instructions
> have been emulated since the last one ... eg if it's only five
> I don't care, but five million would be a problem!
If a jiffies check (need only be low order word) isn't too
expensive, fine. My concern hear is that while i don't want
the printk overhead of emulation to swamp the system i do want
it to pepper the log so if someone is foolish enough to be
miscompiled with this in they will know it.
Emulating advanced instructions via traps is slow, very slow
i would be willing to put up with an extra 5% time overhead
to tell the user he shouldn't be doing it. This emulation
should only be done long enough to rescue and/or recompile.
period. It occurs to me now that if it comes from user-mode
(can we tell?) we should always printk with ARGV[0], not
PID, to identify the faulty executable.
As such i'm more concerned with codesize than speed. If it
is too big i wouldn't enable it in *config.
>
> One other thing ... should the FPU emulator also display messages
> like these if it's used?
Absolutely not. The kernel never uses FPU instructions and
there are legitimate situations for running on systems
without an FPU where user-level floating point will be used.
The distinction between these two emulations is clear.
FPU emulation allows user-mode code to do floating point
without coding around the (now corner) case of not having a
FPU. CMOV et al emulation allows you to move a HD from a
dead MB to another with a different CPU type or at least
boot a kernel that was configured for the wrong CPU type
without crashing on an "illegal instruction". One is
long-term normal operation, the other is short-term crash
avoidance.
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw@pegasys.ws
Remember Cernan and Schmitt
next prev parent reply other threads:[~2002-07-18 20:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-30 4:39 [ANNOUNCE] CMOV emulation for 2.4.19-rc1 Willy TARREAU
2002-07-01 13:58 ` Denis Vlasenko
2002-07-01 13:03 ` willy tarreau
2002-07-01 15:55 ` Bill Davidsen
2002-07-02 10:46 ` Denis Vlasenko
2002-07-02 6:31 ` willy tarreau
2002-07-02 12:03 ` Denis Vlasenko
2002-07-01 16:25 ` Gabriel Paubert
2002-07-01 17:08 ` willy tarreau
2002-07-01 18:16 ` Denis Vlasenko
2002-07-01 13:25 ` willy tarreau
2002-07-02 20:00 ` Willy TARREAU
2002-07-03 0:36 ` jw schultz
2002-07-18 19:15 ` Robert de Bath
2002-07-18 20:44 ` jw schultz [this message]
2002-07-01 18:25 ` Denis Vlasenko
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=20020718204413.GB26536@pegasys.ws \
--to=jw@pegasys.ws \
--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