Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752562AbbKKM3e (ORCPT ); Wed, 11 Nov 2015 07:29:34 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:33555 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752160AbbKKM3d (ORCPT ); Wed, 11 Nov 2015 07:29:33 -0500 Date: Wed, 11 Nov 2015 21:28:07 +0900 From: Sergey Senozhatsky To: David Rientjes Cc: Andrew Morton , Christoph Lameter , Pekka Enberg , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , Sergey Senozhatsky Subject: Re: [PATCH 1/3] tools/vm: fix Makefile multi-targets Message-ID: <20151111122807.GB654@swordfish> References: <1447162326-30626-1-git-send-email-sergey.senozhatsky@gmail.com> <1447162326-30626-2-git-send-email-sergey.senozhatsky@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1447162326-30626-2-git-send-email-sergey.senozhatsky@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6348 Lines: 137 Hello, On (11/10/15 17:20), David Rientjes wrote: >>On (11/10/15 22:32), Sergey Senozhatsky wrote: >> >> Build all of the $(TARGETS), not just the first one. >> >> Without the patch (make -n) >> ============================== >> >> make -C ../lib/api >> gcc -Wall -Wextra -I../lib/ -o page-types page-types.c ... >> >> Only 'page-types' target was built. >> >> With the patch (make -n) >> =========================== >> >> make -C ../lib/api >> gcc -Wall -Wextra -O2 -I../lib/ -o page-types page-types.c ... >> gcc -Wall -Wextra -O2 -I../lib/ -o slabinfo slabinfo.c ... >> gcc -Wall -Wextra -O2 -I../lib/ -o page_owner_sort page_owner_sort.c ... >> >> All 3 targets ('page-types', 'slabinfo', 'page_owner_sort') were >> built. >> >> Signed-off-by: Sergey Senozhatsky >> --- > > This doesn't purport to explain why -O2 was added or why it's needed for← > these tools. Hm, that was a sem-automatic action I saw no issues with (besides, I considered this to be too small for a separate patch). `slabinfo' can be used to collected extended '-X' measurements for gnuplot script e.g. `while [ 1 ]; do slabinfo -X >> stats; sleep 0.1s; done` so making it a bit lighter is sort of positive change, though I'm not married to this option. perf stats: -- OLD Performance counter stats for './slabinfo.old -X -B -N 100': 197.879348 task-clock (msec) # 0.969 CPUs utilized 22 context-switches # 0.111 K/sec 0 cpu-migrations # 0.000 K/sec 2,276 page-faults # 0.012 M/sec 182,916,015 cycles # 0.924 GHz stalled-cycles-frontend stalled-cycles-backend 259,843,733 instructions # 1.42 insns per cycle 53,949,755 branches # 272.640 M/sec 157,607 branch-misses # 0.29% of all branches 0.204190648 seconds time elapsed -- NEW (-O2) Performance counter stats for './slabinfo.new -X -B -N 100': 169.963546 task-clock (msec) # 0.977 CPUs utilized 9 context-switches # 0.053 K/sec 0 cpu-migrations # 0.000 K/sec 2,276 page-faults # 0.013 M/sec 153,582,826 cycles # 0.904 GHz stalled-cycles-frontend stalled-cycles-backend 218,505,232 instructions # 1.42 insns per cycle 45,410,422 branches # 267.177 M/sec 114,126 branch-misses # 0.25% of all branches 0.173921887 seconds time elapsed ./scripts/bloat-o-meter tools/vm/slabinfo.old tools/vm/slabinfo.new add/remove: 5/23 grow/shrink: 7/7 up/down: 6434/-9495 (-3061) function old new delta main 878 3699 +2821 output_slabs 307 2075 +1768 report 781 1905 +1124 rename_slabs 167 333 +166 read_slab_obj.isra - 131 +131 ops.isra - 104 +104 set_obj.isra - 102 +102 read_obj 145 236 +91 sort_slabs 414 478 +64 slab_empty.part - 32 +32 get_obj.part - 17 +17 slab_numa 542 556 +14 decode_numa_list 235 230 -5 fatal 176 160 -16 usage 17 - -17 onoff 27 - -27 show_tracking 193 162 -31 get_obj_and_str 157 124 -33 slab_size 43 - -43 slab_mismatch 47 - -47 get_obj 48 - -48 slab_waste 56 - -56 link_slabs 226 169 -57 slab_activity 60 - -60 slab_validate 63 - -63 slab_shrink 63 - -63 slab_empty 74 - -74 first_line 74 - -74 store_size 271 191 -80 xtotals 142 - -142 ops 145 - -145 set_obj 162 - -162 read_slab_obj 182 - -182 find_one_alias 187 - -187 sort_aliases 288 - -288 alias 298 - -298 debug_opt_scan 355 - -355 slab_debug 870 - -870 totals 4136 3198 -938 slabcache 1289 - -1289 read_slab_dir 1798 - -1798 slab_stats 2047 - -2047 I believe the remaining tools will not `suffer' as well. Do you prefer to remove -O2? -ss -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/