kernel: msm_sysstats: Account DMA32 zone memory in taskstats
Account DMA32 zone memory in taskstats. Since our systems will always have atleast 32bit capable devices, ZONE DMA is most unlikely to be enabled thus DMA32 zone info is accounted in stats->dma_nr_xxx inplace of creating additional structure variables. Change-Id: I90c108824afe2e3246fc62d4c1a911a5b8f6e523 Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
This commit is contained in:
parent
54bac704a3
commit
45fb36e967
@ -416,21 +416,27 @@ static void sysstats_fill_zoneinfo(struct sysstats_mem *stats)
|
||||
pgdat = NODE_DATA(0);
|
||||
node_zones = pgdat->node_zones;
|
||||
|
||||
/* Ensure that dma_nr_xxx are zero before filling. */
|
||||
stats->dma_nr_active_anon = stats->dma_nr_inactive_anon = 0;
|
||||
stats->dma_nr_active_file = stats->dma_nr_inactive_file = 0;
|
||||
stats->dma_nr_free = 0;
|
||||
|
||||
for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; ++zone) {
|
||||
if (!populated_zone(zone))
|
||||
continue;
|
||||
|
||||
zspages += zone_page_state(zone, NR_ZSPAGES);
|
||||
if (!strcmp(zone->name, "DMA")) {
|
||||
stats->dma_nr_free =
|
||||
if (!strcmp(zone->name, "DMA") ||
|
||||
!strcmp(zone->name, "DMA32")) {
|
||||
stats->dma_nr_free +=
|
||||
K(zone_page_state(zone, NR_FREE_PAGES));
|
||||
stats->dma_nr_active_anon =
|
||||
stats->dma_nr_active_anon +=
|
||||
K(zone_page_state(zone, NR_ZONE_ACTIVE_ANON));
|
||||
stats->dma_nr_inactive_anon =
|
||||
stats->dma_nr_inactive_anon +=
|
||||
K(zone_page_state(zone, NR_ZONE_INACTIVE_ANON));
|
||||
stats->dma_nr_active_file =
|
||||
stats->dma_nr_active_file +=
|
||||
K(zone_page_state(zone, NR_ZONE_ACTIVE_FILE));
|
||||
stats->dma_nr_inactive_file =
|
||||
stats->dma_nr_inactive_file +=
|
||||
K(zone_page_state(zone, NR_ZONE_INACTIVE_FILE));
|
||||
} else if (!strcmp(zone->name, "Normal")) {
|
||||
stats->normal_nr_free =
|
||||
|
Loading…
Reference in New Issue
Block a user