[Crash-utility] spanned vs. present

Per Fransson per.fransson.ml at gmail.com
Fri Oct 22 09:40:56 UTC 2010


Hi,

I'm wondering why kmem -f uses the spanned pages of every zone when
reporting its size. Wouldn't it be more informative to get a value
which excludes any holes?

This is the code from memory.c I'm thinking of:

/*
 *  Same as dump_free_pages_zones_v1(), but updated for numerous 2.6 zone
 *  and free_area related data structure changes.
 */
static void
dump_free_pages_zones_v2(struct meminfo *fi)
{
	[...]
	if (VALID_MEMBER(zone_spanned_pages))
		zone_size_offset =  OFFSET(zone_spanned_pages);
	else
		error(FATAL, "zone struct has no spanned_pages field\n");
	[...]
}


Regards,
Per




More information about the Crash-utility mailing list