Skip to content

Commit

Permalink
Fix for the "kmem -z" option output to show the zone structure's
Browse files Browse the repository at this point in the history
pages_scanned field as a unsigned integer.
(Alexandr_Terekhov@epam.com)

Fix for "kmem -z" option on Linux 2.6.30 and later kernels.  Without
the patch, the zone structure's all_unreclaimable and pages_scanned
fields are not dumped.
(anderson@redhat.com)
  • Loading branch information
Dave Anderson committed Jan 20, 2015
1 parent 3670cec commit a58a34e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions memory.c
@@ -1,8 +1,8 @@
/* memory.c - core analysis suite
*
* Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
* Copyright (C) 2002-2014 David Anderson
* Copyright (C) 2002-2014 Red Hat, Inc. All rights reserved.
* Copyright (C) 2002-2015 David Anderson
* Copyright (C) 2002-2015 Red Hat, Inc. All rights reserved.
* Copyright (C) 2002 Silicon Graphics, Inc.
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -15934,7 +15934,6 @@ dump_zone_stats(void)
OFFSET(zone_vm_stat));
} else
fprintf(fp, " FREE: %ld\n", value5);
goto next_zone;
}

if (VALID_MEMBER(zone_all_unreclaimable)) {
Expand All @@ -15954,7 +15953,7 @@ dump_zone_stats(void)
if (VALID_MEMBER(zone_pages_scanned)) {
value1 = ULONG(zonebuf +
OFFSET(zone_pages_scanned));
fprintf(fp, "PAGES_SCANNED: %ld ", value1);
fprintf(fp, "PAGES_SCANNED: %lu ", value1);
}
fprintf(fp, "\n");

Expand Down

0 comments on commit a58a34e

Please sign in to comment.