Welcome to gem5 Q&A, where you can ask questions and receive answers from other members of the community.

Writeback stats problem in 'Mostly Exclusive' cache

0 votes

Dear All,
                 I have created 'Mostly_exclusive' cache just below Data cache. This cache stores dirty victims coming out of data cache.

                 I found one problem in stats file that dirty 'writebacks' out of this 'Mostly_exclusive' cache are more than dirty 'writebacks' into 'Mostly_exclusive' cache. This stats seems misleading

                 While debugging,I found that extra 'writebacks' from 'Mostly_exclusive' cache are being generated in "recvTimingResp" function in cache.cc. Following code is generating extra writebacks. 

                 if (blk == tempBlock && tempBlock->isValid()) {
        // We use forwardLatency here because we are copying
        // Writebacks/CleanEvicts to write buffer. It specifies the latency to
        // allocate an internal buffer and to schedule an event to the
        // queued port.
        if (blk->isDirty() || writebackClean) {
        DPRINTF(Cache, "/////////////%s %s\n", pkt->print(),
                    __func__);
            PacketPtr wbPkt = writebackBlk(blk);
            allocateWriteBuffer(wbPkt, forward_time);
            // Set BLOCK_CACHED flag if cached above.
            if (isCachedAbove(wbPkt))
                wbPkt->setBlockCached();
        } else {
            PacketPtr wcPkt = cleanEvictBlk(blk);
            // Check to see if block is cached above. If not allocate
            // write buffer
            if (isCachedAbove(wcPkt))
                delete wcPkt;
            else
                allocateWriteBuffer(wcPkt, forward_time);
        }
        invalidateBlock(blk);
    }

While normal 'writebacks' are generated by "allocateblock" function

                   Can any one suggest problem in 'Mostly_exclusive' 

 

Thanks

asked Jun 16 in Source Layout by maq.uetian (680 points)

Please log in or register to answer this question.

...