[Crash-utility] Thoughts on swap_usage Crash extension?

Dave Anderson anderson at redhat.com
Wed Jan 30 14:41:21 UTC 2013


Aaron,

Bryn's name change and pte_file() suggestion make good sense.

I also wonder if it's worth adding an option to alternatively display
the swap count in pages?  The only crash commands I can think of
off-hand that use kilobytes are the "ps" and "swap" commands, and
those were done that way because of the Linux commands of the same
name.  But when I want to see how much swap a process is using I 
do this to get a page count:

 crash> vm -p 1 | grep SWAP | wc -l
 382
 crash>

Or maybe just show both all the time?  Just a thought...

In any case, I've put the module in the crash extensions page as-is
for now.  When you're ready to update it, I'll just plug in your
latest-and-greatest version.

  http://people.redhat.com/anderson/extensions.html

Thanks,
  Dave

----- Original Message -----
> Hi Bryn,
> 
> Thanks for the feedback.
> I'll work on it. With regards to the name change, I think it's worth
> changing it to 'pswap'.
> 
> Cheers,
> Aaron
> 
> ----- Original Message -----
> From: "Bryn M. Reeves" <bmr at redhat.com>
> To: "Discussion list for crash utility usage, maintenance and
> development" <crash-utility at redhat.com>
> Cc: "Aaron Tomlin" <atomlin at redhat.com>
> Sent: Wednesday, January 30, 2013 1:51:35 PM
> Subject: Re: [Crash-utility] Thoughts on swap_usage Crash extension?
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 01/30/2013 01:17 PM, Aaron Tomlin wrote:
> > I've made some changes [1] and included the help page, as per your
> > request. It's still x86_64 specific for now. What do you think?
> > [1]:
> > https://github.com/aktlin115/crash-extension/blob/master/swap_usage.c
> 
> Hi
> > 
> Aaron,
> 
> Extension looks useful. I was wondering about the name - would you
> consider renaming it as 'pswap'? It's less to type than swap_usage (as
> there's already a 'swap' command but nothing 'psw*').
> 
> For the _PAGE_FILE problem it might be possible to address this by
> providing a wrapper like the pte_file() interface defined by arch
> headers in the kernel sources.
> 
> There seem to be 11 arches (inc. x86 and powerpc) using (pte_val(pte)
> & _PAGE_FILE) idiom. Of the rest s390 has a well-commented explanation
> of its special cases and ARM uses a different name for the bit:
> 
> #define pte_file(pte)		(pte_val(pte) & L_PTE_FILE)
> 
> It seems like these could all be handled quite reasonably (actually
> the number that are identical maybe it's the case that this could be
> tidied up in the kernel so that arches that really need custom
> versions can override pte_file() but that's not really my area).
> 
> Regards,
> Bryn.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAlEJJWcACgkQ6YSQoMYUY97PKwCfa6ZuC2MuTrYa2E42WSEkBPjM
> 234An1RQFlRxrDFgMu/cxdhEMzfsRGGZ
> =VY7a
> -----END PGP SIGNATURE-----
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list