This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linux VFS cache hit rate script


On 04/21/2011 04:17 PM, Jake Maul wrote:
> New version of the script uploaded to War Stories, incorporating your
> suggested changes. I have no problem with the GPLv2, so I took your
> wording exactly. :)
> 
> http://sourceware.org/systemtap/wiki/WSCacheHitRate
> 
> Of course there's still the concern about devname "N/A", but I
> clarified the comment so as to make it obvious where I got that
> assumption from. At least then if does turn out to be incorrect, it
> will be obvious that something other than just this one script needs
> to be fixed.
> 
> Jake

Hi Jake,

I traced through vfs.stp and found where the "N/A" is coming from:

function bdevname:string(bdev:long)
{
	if (bdev == 0)
		return "N/A"
...
}


Whether "N/A" always indicated things are cached I don't know. Need to explore further.

Found a possible reason got the overflow for the associative array; there is an associative array used for caching names in vfs.stp:

global __devnames
function __find_bdevname:string(dev:long, bdev:long)
{
	if (dev in __devnames)
		return __devnames[dev]
	else
		return __devnames[dev] = bdevname(bdev)
}

The only way that is going to fill up is if there are a lot of different values for dev.

-Will


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