Skip to content

Commit 1467559

Browse files
Jay Lanjwessel
authored andcommitted
kdb: fix incorrect counts in KDB summary command output
The output of KDB 'summary' command should report MemTotal, MemFree and Buffers output in kB. Current codes report in unit of pages. A define of K(x) as is defined in the code, but not used. This patch would apply the define to convert the values to kB. Please include me on Cc on replies. I do not subscribe to linux-kernel. Signed-off-by: Jay Lan <jlan@sgi.com> Cc: <stable@vger.kernel.org> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
1 parent bfa76d4 commit 1467559

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/debug/kdb/kdb_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2583,7 +2583,7 @@ static int kdb_summary(int argc, const char **argv)
25832583
#define K(x) ((x) << (PAGE_SHIFT - 10))
25842584
kdb_printf("\nMemTotal: %8lu kB\nMemFree: %8lu kB\n"
25852585
"Buffers: %8lu kB\n",
2586-
val.totalram, val.freeram, val.bufferram);
2586+
K(val.totalram), K(val.freeram), K(val.bufferram));
25872587
return 0;
25882588
}
25892589

0 commit comments

Comments
 (0)