[Crash-utility] Thoughts on swap_usage Crash extension?

Bryn M. Reeves bmr at redhat.com
Wed Jan 30 13:51:35 UTC 2013


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




More information about the Crash-utility mailing list