From: Alex Chiang Date: Tue, 15 Dec 2009 01:57:54 +0000 (-0800) Subject: page-types: exit early when invoked with -d|--describe X-Git-Tag: v2.6.33-rc1~266 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb86a7338b7a864c03e1736a8d370b10254b0300;p=pandora-kernel.git page-types: exit early when invoked with -d|--describe On a system with large amount of memory (256GB), invoking page-types can take quite a long time, which is unreasonable considering the user only wants a description of the flags: # time ./page-types -d 0x10 0x0000000000000010 ____D_____________________________ dirty real 0m34.285s user 0m1.966s sys 0m32.313s This is because we still walk the entire address range. Exiting early seems like a reasonble solution: # time ./page-types -d 0x10 0x0000000000000010 ____D_____________________________ dirty real 0m0.007s user 0m0.001s sys 0m0.005s Signed-off-by: Alex Chiang Cc: Andi Kleen Cc: Haicheng Li Acked-by: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed