[linux-mm-cc] CurrentMem in /proc/compcache

Baghdadi Riyadh baghdadi13 at gmail.com
Tue Apr 1 17:13:15 EDT 2008


Hi,

In the compcache_make_request function :

static int compcache_make_request(struct request_queue *queue, struct bio
*bio)
{
....
....
....

// go to the end of this function

/* Update stats */
        stat_inc(&stats.curr_pages);

            stat_set(&stats.curr_mem, stats.curr_mem + clen); <<<<**********

        stat_setmax(&stats.peak_mem, stats.curr_mem);

...
...
}

I assume that
stat_set(&stats.curr_mem, stats.curr_mem + clen);
means that each time there is a "write" operation to the CompCache the
stats.curr_mem  will grow up,
but in "compcache.h"   curr_mem   is described as "current total size of
compressed pages"

    size_t curr_mem;    /* current total size of compressed pages */

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
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"

this is an example of what I want to say :

DiskSize:         180000 kB
NumReads:         329124
NumWrites:        149598
FailedReads:           0
FailedWrites:          0
InvalidIO:             0
GoodCompress:         76 %
NoCompress:            1 %
CurrentPages:      44995
CurrentMem:       208874 kB
PeakMem:          208874 kB


here the DiskSize is 180Mb  and  CurrentMem is 208MB,  but CurrentMem should
never be more than DiskSize  :)

Best regard,

-- 
- Baghdadi Riyadh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/linux-mm-cc/attachments/20080401/a74334e7/attachment.htm 


More information about the linux-mm-cc mailing list