This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] Read memory in multiple lines in dcache_xfer_memory.


On Mon, Oct 21, 2013 at 5:48 PM, Yao Qi <yao@codesourcery.com> wrote:
>> The data for cache line sizes less than the default (64 bytes)
>> is nice but not compelling.
>> E.g., What if we just increase the cache line size to 256, say?
>> Or 1024?  And/or maybe auto-adjust it based on
>
>
> In this case, it is useful to increase the cache line size.  Increase the
> cache line size to 256 can save 0.1 (1.16 -> 1.06) in my experiment, which
> is a good improvement.
>
> When people are doing remote debugging, and find it is slow.  The reason of
> slowness is usually unclear, so it may not be useful advise them to increase
> data cache line size.

If the cache line size is set based on the remote packet size (and all
else being equal, that's a reasonable thing to do),
then we don't have to tell them anything.
OTOH, I'm not entirely thrilled with changing the cache-line size automagically.

OTOOH, how many users even know that they *can* change the cache line size?
We don't have to advise them to change the cache line size (with the
word "advise" implying the end result is necessarily an improvement),
but I'm totally ok with suggesting it as something to *try*.


>> "remote memory-read-packet-size" or some such?
>
>
> "remote memory-read-packet-size" is not useful in this case, I am afraid.
> GDB reads one data cache line by a single 'm' packet, and the size (data
> cache line size) is less than the memory read packet size. Changing "remote
> memory-read-packet-size" doesn't have effects.

You misparsed what I wrote, sorry for being unclear.

Putting the sentence back together:
And/or maybe auto-adjust it based on "remote memory-read-packet-size"
or some such?
["it" being the cache line size]

When I connect to gdbserver on my amd64-linux box the cache line size
is 64 but the memory-read-packet-size is 16383.
Those are wildly different numbers.  I'm not suggesting setting the
cache line size to 16K, but it does suggest that 64 is a bit small.
OTOH, there's no point in having a 256 byte line size of the
memory-read-packet-size is 64.
OTOOH, with your patch to read multiple cache lines at once the cost
of smaller cache line sizes is mitigated.

It's not my favorite choice, I just mentioned it for discussion's sake.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]