public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: Always cache memory and registers
Date: Sun, 22 Jun 2003 22:55:00 -0000	[thread overview]
Message-ID: <3EF633B8.4030009@redhat.com> (raw)
In-Reply-To: <20030622223412.GA15860@nevyn.them.org>


>> The only proviso being that the the current cache and target vector 
>> would need to be modified so that the cache only ever requested the data 
>> needed, leaving it to the target to supply more if available (much like 
>> registers do today).  The current dcache doesn't do this, it instead 
>> pads out small reads :-(
> 
> 
> It needs tweaking for other reasons too.  It should probably have a
> much higher threshold before it starts throwing out data, for one
> thing.
> 
> Padding out small reads isn't such a bad idea.  It generally seems to
> be the latency that's a real problem, esp. for remote targets.  I think
> both NetBSD and GNU/Linux do fast bulk reads native now?  I'd almost
> want to increase the padding.

No, other way.

Having GDB pad out small reads can be a disaster - read one too many 
bytes and ``foomp''.  This is one of the reasons why the dcache was 
never enabled.

However, it is totally reasonable for the target (not GDB) to supply 
megabytes of memory mapped data when GDB only asked for a single byte! 
The key point is that it is the target that makes any padding / transfer 
decisions, and not core GDB.  If the remote target fetches too much data 
and `foomp' then, hey not our fault, we didn't tell it to read that 
address :-^

>> One thing that could be added to this is the idea of a sync point.
>> When supplying data, the target could mark it as volatile.  Such 
>> volatile data would then be drawn from the cache but only up until the 
>> next sync point.  After that a fetch would trigger a new read. 
>> Returning to the command line, for instance, could be a sync point. 
>> Individual x/i commands on a volatile region would be separated by sync 
>> points, and hence would trigger separate reads.
>> 
>> Thoughts.  I think this provides at least one techical reason for 
>> enabling the cache.
> 
> 
> Interesting idea there.  I'm not quite sure how much work vs. return it
> would be.

There needs to at least be a contingency plan (if someone finds a 
technical problem :-).  I also think its relatively easy to implement. 
Reach a sync point, flush volatile data from the cache.

Andrew


  reply	other threads:[~2003-06-22 22:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-22 22:26 Andrew Cagney
2003-06-22 22:34 ` Daniel Jacobowitz
2003-06-22 22:55   ` Andrew Cagney [this message]
2003-06-23  3:57     ` Daniel Jacobowitz
2003-06-23 14:13       ` Andrew Cagney
2003-06-23 19:02 ` Discrepency between gdbarch_frame_locals_address and get_frame_locals_address? Paul N. Hilfinger
2003-06-23 19:47   ` Andrew Cagney
     [not found] <1056381193.18735.ezmlm@sources.redhat.com>
2003-06-23 20:11 ` Always cache memory and registers John S. Yates, Jr.

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=3EF633B8.4030009@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).