This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: RFA: dcache corruption bug


>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>> Other related issues:
>> 
>> * dcache makes no attempt to remove the least-recently-used block when
>> a cache line is recycled.  When a new cache-line is allocated it is
>> added to the tail of the valid list.  If there aren't any cache-lines
>> in the free list, the one from the head of the valid list is recycled.
>> Anyone have any reasons why making this a LRU cache is a bad idea?

Andrew> From memory, that algorithm isn't totally bad, just less
Andrew> efficient on average than LRU.  To notice this you must be
Andrew> maxing out the data cache.

The case I was thinking of was user-defined functions used to walk
large complicated data structures.  Typically the 'core' nodes are
going to be accessed more often then the leaves.  This assumes, of
course, that someone's going to write traversal scripts, which is
somewhat difficult given today's command language limitations.

Given that, I'll let this sit until it's clear that this is a problem.

>> * Is there a generic set of list manipulation macros in libiberty?  I
>> thought there was, but couldn't find anything.

Andrew> GDB's bcache?

I was thinking of macros like those in *BSD's <sys/queue.h>.  But I'll
think of bcache the next time I need a hash table...  

Thanks,

        --jtc

-- 
J.T. Conklin
RedBack Networks

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