9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: jmk@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Performance
Date: Fri, 11 May 2001 09:52:39 -0400	[thread overview]
Message-ID: <20010511135552.0DB18199D7@mail.cse.psu.edu> (raw)

On Fri May 11 04:42:36 EDT 2001, DAGwyn@null.net wrote:
> jmk@plan9.bell-labs.com wrote:
> > I think the correct kludge is to wait for the clock interrupt.
> 
> Also the most portable.

You learn something new every day. Charles Forsyth pointed out to me
that had I read the x86 description of the STI command as well as HLT
I would see there is no possibility of an interrupt occurring between
the sequence
	STI
	HLT
as the STI allows interrupts to be responded to after the completion
of the following instruction, and HLT is deemed to have completed when
it enters its halt state. Therefore, I think a possible way to close
the window on the x86 is

TEXT halt(SB), $0
	CLI
	CMPL	nrdy(SB), $0
	JEQ	_nothingready
	STI
	RET

_nothingready:
	STI
	HLT
	RET

Whether this is coded correctly or makes a difference is left as an
exercise for the student.

--jim


             reply	other threads:[~2001-05-11 13:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-11 13:52 jmk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-05-10 17:21 jmk
2001-05-11  8:33 ` Douglas A. Gwyn
2001-05-09 14:47 Richard Miller
2001-05-10 15:14 ` Douglas A. Gwyn
2001-05-09 13:03 presotto
2001-05-09 12:57 jmk
2001-05-09  8:58 forsyth
2001-05-09  6:03 nemo
2001-05-08 21:33 Russ Cox
2001-05-09  2:09 ` Ronald G Minnich
2001-05-10 15:15 ` Douglas A. Gwyn
2001-05-08 21:25 jmk
2001-05-08 18:20 jmk
2001-05-09  8:29 ` Peter Schay
2001-05-08 17:54 nemo
2001-05-08 18:46 ` Scott Schwartz
2001-05-08 17:42 Fariborz 'Skip' Tavakkolian
2001-05-08 18:07 ` aam396
2001-05-08 22:38 ` Boyd Roberts
2001-05-08 17:40 presotto
2001-05-08 18:45 ` Scott Schwartz
2001-05-09  5:35 ` Franklin Robert Araujo Fran€a
2001-05-10  8:43   ` Juhani Forsman

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=20010511135552.0DB18199D7@mail.cse.psu.edu \
    --to=jmk@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).