Hi,<br><br>In the compcache_make_request function :<br><br>static int compcache_make_request(struct request_queue *queue, struct bio *bio)<br>{<br>....<br>....<br>....<br><br>// go to the end of this function<br><br>/* Update stats */<br>
stat_inc(&stats.curr_pages);<br> <br> stat_set(&stats.curr_mem, stats.curr_mem + clen); <<<<**********<br> <br> stat_setmax(&stats.peak_mem, stats.curr_mem);<br>
<br>...<br>... <br>}<br><br>I assume that <br>stat_set(&stats.curr_mem, stats.curr_mem + clen);<br>means that each time there is a "write" operation to the CompCache the stats.curr_mem will grow up, <br>
but in "compcache.h" curr_mem is described as "current total size of compressed pages" <br><br> size_t curr_mem; /* current total size of compressed pages */<br><br>so it's I understand the current size of CompCache, in this case compcache should take in consideration pages that are no longer under it's control<br>
but if you mean by this the total size of all compressed pages since the loading of CompCache, so its ak, but I think It's less ambiguous (at least for me:) ) to use for example : "totalCmpressedPages_Size" in /proc/compcache instead of using "CurrentMem"<br>
<br>this is an example of what I want to say :<br><br>DiskSize: 180000 kB<br>NumReads: 329124<br>NumWrites: 149598<br>FailedReads: 0<br>FailedWrites: 0<br>InvalidIO: 0<br>
GoodCompress: 76 %<br>NoCompress: 1 %<br>CurrentPages: 44995<br>CurrentMem: 208874 kB<br>PeakMem: 208874 kB<br><br><br>here the DiskSize is 180Mb and CurrentMem is 208MB, but CurrentMem should never be more than DiskSize :)<br>
<br>Best regard,<br clear="all"><br>-- <br>- Baghdadi Riyadh