[Disksim-users] FIFO, RANDOM, and LIFO replacement in the smart controller

Nobody Nobody Nobody n080di at yahoo.com
Thu Apr 26 21:43:45 EDT 2007


Same here. When replacement policy is FIFO, and once the cache is
full, cache_replace_waitforline( ) is the fate of every request. It appears that the
cache stops functioning after that; perhaps cache_get_replace_startpoint( ) returns NULL for FIFO when the cache is full.

Here's some debugging output (cache size 640, FIFO):

Enter cache_get_block: opid 66, devno 1, blkno 160, bcount 8
==> disksim_cachemem.c(314): cachemem_get_cachetype (cache_def *cache)
==> disksim_cachemem.c(1892): (**donefunc)(void *, ioreq_event *), void *doneparam)
Entered cache_get_block:  totalreqs = 68 cachereadssofar 256
Entered cache_get_block: rw 1, devno 1, blkno 160, size 8
==> disksim_cachemem.c(1620): cache_read_continue (cache_def *cache, cache_event *readdesc)
==> disksim_cachemem.c(412): cache_find_atom (cache_def *cache, int devno, int lbn)
==> disksim_cachemem.c(1386): cache_allocate_space (cache_def *cache, int lbn, int size, cache_event *rwdesc)
==> disksim_cachemem.c(1287): *cache_allocate_space_continue (cache_def *cache, cache_event *allocdesc)
==> disksim_cachemem.c(1267): cache_get_free_atom (cache_def *cache, int lbn, cache_atom **ret, cache_event *allocdesc)
==> disksim_cachemem.c(1196): cache_replace (cache_def *cache, int set, cache_event *allocdesc)
==> disksim_cachemem.c(625): *cache_get_replace_startpoint (cache_def *cache, int set)
==> disksim_cachemem.c(607): cache_replace_waitforline (cache_def *cache, cache_event *allocdesc)
entered cache_replace_waitforline: linelocked 0


Enter cache_get_block: opid 67, devno 3, blkno 160, bcount 8, mj_lbn 640,
==> disksim_cachemem.c(314): cachemem_get_cachetype (cache_def *cache)
==> disksim_cachemem.c(1892): (**donefunc)(void *, ioreq_event *), void *doneparam)
Entered cache_get_block:  totalreqs = 68 cachereads 256
Entered cache_get_block: rw 1, devno 3, blkno 160, size 8
==> disksim_cachemem.c(1620): cache_read_continue (cache_def *cache, cache_event *readdesc)

(repeats ...)


Greg Ganger <ganger at ece.cmu.edu> wrote: 
hmm, that is strange.  Here is what I get:

% grep FIFO *
grep: CVS: Is a directory
disksim_bus.c:#define FIFO_ARB          2
disksim_bus.c:      case FIFO_ARB:
disksim_cachemem.c:      } else if ((cache->replacepolicy != CACHE_REPLACE_FIFO) && (cache->replacepolicy != CACHE_REPLACE_SLRU)) {
disksim_cachemem.h:#define CACHE_REPLACE_FIFO   1

(The bus stuff is not relevant.)

Greg


On Thu, 26 Apr 2007, Nobody Nobody Nobody wrote:

> In fact, a careful reading of the code in disksim_cachemem.c does not reveal any such, let alone grepping.
>
> Greg Ganger  wrote:
> I'd suggest grepping the code for words like FIFO before drawing
> that conclusion... there is definitely code there (in disksim_cachemem.c),
> but I can't vouch for the implementation's correctness.
>
> Greg
>
>
> On Thu, 26 Apr 2007, Nobody Nobody Nobody wrote:
>
>> Thanks. I'd go further and hazard a guess that there does not even exist any
>> code within DiskSim that implements these (everything except LRU)
>> policies although they can be "enabled" through the parameter file.
>>
>> Thanks again.
>>
>>
>>
>> ---------------------------------
>> Ahhh...imagining that irresistible "new car" smell?
>> Check outnew cars at Yahoo! Autos.
>
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.


       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/disksim-users/attachments/20070426/eb282458/attachment.html>


More information about the Disksim-users mailing list