From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31219 invoked by alias); 22 Apr 2011 19:17:08 -0000 Received: (qmail 31211 invoked by uid 22791); 22 Apr 2011 19:17:07 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-px0-f182.google.com (HELO mail-px0-f182.google.com) (209.85.212.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Apr 2011 19:16:53 +0000 Received: by pxi20 with SMTP id 20so523768pxi.13 for ; Fri, 22 Apr 2011 12:16:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.29.166 with SMTP id l6mr2224981pbh.294.1303499813056; Fri, 22 Apr 2011 12:16:53 -0700 (PDT) Received: by 10.68.43.72 with HTTP; Fri, 22 Apr 2011 12:16:53 -0700 (PDT) In-Reply-To: <4DB0C1AD.6080802@redhat.com> References: <4DAF3D59.7020609@redhat.com> <4DB0B049.8070806@redhat.com> <4DB0C1AD.6080802@redhat.com> Date: Fri, 22 Apr 2011 19:17:00 -0000 Message-ID: Subject: Re: Linux VFS cache hit rate script From: Jake Maul To: Josh Stone Cc: William Cohen , systemtap@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q2/txt/msg00148.txt.bz2 On Thu, Apr 21, 2011 at 4:45 PM, Josh Stone wrote: > Oy - it's possible that the "dev" is meaningless (or means something > different) when the name is returned "N/A" (bdev=3D=3D0), so we may be > caching noise as the index. =A0Or in any case, caching "N/A" in so many > different forms is not helpful. =A0Would you be willing to try this > modified function? > > function __find_bdevname:string(dev:long, bdev:long) > { > =A0 =A0 =A0 =A0if (bdev =3D=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return "N/A" > =A0 =A0 =A0 =A0if (dev in __devnames) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return __devnames[dev] > =A0 =A0 =A0 =A0return __devnames[dev] =3D bdevname(bdev) > } No problem... seems to have no effect though: 339869 dev: 16 devname: N/A 345 dev: 18 devname: N/A 4569 dev: 22 devname: N/A 5 dev: 23 devname: N/A 798 dev: 265289728 devname: dm-0 640 dev: 3 devname: N/A 2594 dev: 5 devname: N/A 250861 dev: 6 devname: N/A I just commented out the existing version in /usr/share/systemtap/tapsets/vfs.stp, and put your function in instead. Do I need to do anything more than that, like rebuild something? (not a systemtap dev) Jake