public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* Re: modeling latency (fwd)
@ 2001-06-17 20:28 Ben Elliston
  2001-06-20 23:23 ` Ben Elliston
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Elliston @ 2001-06-17 20:28 UTC (permalink / raw)
  To: sid

I recently asked about modeling memory latency, which sid does not
currently accommodate.  Let's pick up the discussion on this list.


fche wrote:

[...]

"hops" are not very meaningful.  "cycles" and "time" are, and may be
converted one-to-one by some knowledgeable component.

: If so, would I be right to think aobut modelling latency by making
: the sid::bus::status type into a first-class object that components
: may manipulate as they return their status down the chain?

I would advise against making it a big object, or giving it a
complicated API.  After all, it's passed by value/copy all the time.
Also, there is no library to put the API implementation into - see
what's done in sidtypes.h (all inline functions).  (Remember to bump
up API_MAJOR_VERSION!)

[...]

So, the idea is to allow the sid::bus::status structure to return to
the caller not just an overall "ok"/"unmapped" indication, but also a
generic latency-count value (probably a 16-bit unsigned int).  This
value would originate from memory components (who would need a
configurable parameter for this), through mappers (ditto, to
optionally account for address decoding delays), through the cache
(ditto, to account for cache hit times & miss penalties), all the way
to the CPU.  (The "sid::bus::delayed" indication can finally die.)

The CPU would accumulate all the penalty cycles incoming from *all*
GETIMEM/GETMEM/SETMEM calls (well, their lower-level counterparts), in
much the same way that basic_cpu::total_insn_count is, though in a
separate counter.  Then, after the end of the step_insns() loop, this
memory latency accumulator would be converted by the CPU to
instruction-cycles units (likely through a target-specific linear
function), and pass the sum of converted memory latencies and
instruction cycles to the target scheduler in the basic_cpu::stepped()
function.

(Tracing etc. may require hanging on to these statistics beyond their
use in target scheduling, but that's a separate matter.)

Is this a plausible story & design?


- FChE

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-06-24 18:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-17 20:28 modeling latency (fwd) Ben Elliston
2001-06-20 23:23 ` Ben Elliston
2001-06-21  4:21   ` Frank Ch. Eigler
2001-06-24 17:06     ` Ben Elliston
2001-06-24 17:46       ` Frank Ch. Eigler
2001-06-24 18:52         ` Ben Elliston

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 read-only IMAP folder(s) and NNTP newsgroup(s).