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 10/25/2013 06:08 PM, Doug Evans wrote:

> OTOH, there's no point in having a 256 byte line size of the
> memory-read-packet-size is 64.

That's an excellent point.  I think that we could also address that
in another way, without having the dcache code query the target
(or targets!) for maximum sizes -- currently, each cache line has a
fixed size, but instead, dcache could treat the line
size as the _maximum_ line size.  That is, 'struct dcache_block' would
gain a new field that recorded much much data actually is stored
in the block.  Then, when filling the block, dcache would use
target_xfer_partial instead of target_read/write, and if if the target
returns less than the block size, record how much it was read in the
block, and return to the dcache caller.  Further partial transfers
would fill the rest of the dcache line (up until it was full).  In
essence, dcache works at the target_xfer level, but has its own
loop that sort of "breaks" the partial transfer logic.

-- 
Pedro Alves


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