summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 22:42:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 22:42:40 -0500
commit7c225c69f86c934e3be9be63ecde754e286838d7 (patch)
treeff2df419b0c4886b37407235f7d21215e4cf45e4 /tools
parent6363b3f3ac5be096d08c8c504128befa0c033529 (diff)
parent1b7176aea0a924ac59c6a283129d3e8eb00aa915 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton: - a few misc bits - ocfs2 updates - almost all of MM * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (131 commits) memory hotplug: fix comments when adding section mm: make alloc_node_mem_map a void call if we don't have CONFIG_FLAT_NODE_MEM_MAP mm: simplify nodemask printing mm,oom_reaper: remove pointless kthread_run() error check mm/page_ext.c: check if page_ext is not prepared writeback: remove unused function parameter mm: do not rely on preempt_count in print_vma_addr mm, sparse: do not swamp log with huge vmemmap allocation failures mm/hmm: remove redundant variable align_end mm/list_lru.c: mark expected switch fall-through mm/shmem.c: mark expected switch fall-through mm/page_alloc.c: broken deferred calculation mm: don't warn about allocations which stall for too long fs: fuse: account fuse_inode slab memory as reclaimable mm, page_alloc: fix potential false positive in __zone_watermark_ok mm: mlock: remove lru_add_drain_all() mm, sysctl: make NUMA stats configurable shmem: convert shmem_init_inodecache() to void Unify migrate_pages and move_pages access checks mm, pagevec: rename pagevec drained field ...
Diffstat (limited to 'tools')
-rw-r--r--tools/include/linux/kmemcheck.h8
-rw-r--r--tools/perf/builtin-kmem.c2
-rw-r--r--tools/testing/radix-tree/multiorder.c2
-rw-r--r--tools/vm/slabinfo.c11
4 files changed, 11 insertions, 12 deletions
diff --git a/tools/include/linux/kmemcheck.h b/tools/include/linux/kmemcheck.h
index 2bccd2c7b897..ea32a7d3cf1b 100644
--- a/tools/include/linux/kmemcheck.h
+++ b/tools/include/linux/kmemcheck.h
@@ -1,9 +1 @@
1/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LIBLOCKDEP_LINUX_KMEMCHECK_H_
3#define _LIBLOCKDEP_LINUX_KMEMCHECK_H_
4
5static inline void kmemcheck_mark_initialized(void *address, unsigned int n)
6{
7}
8
9#endif
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 557d391f564a..ae11e4c3516a 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -641,7 +641,6 @@ static const struct {
641 { "__GFP_ATOMIC", "_A" }, 641 { "__GFP_ATOMIC", "_A" },
642 { "__GFP_IO", "I" }, 642 { "__GFP_IO", "I" },
643 { "__GFP_FS", "F" }, 643 { "__GFP_FS", "F" },
644 { "__GFP_COLD", "CO" },
645 { "__GFP_NOWARN", "NWR" }, 644 { "__GFP_NOWARN", "NWR" },
646 { "__GFP_RETRY_MAYFAIL", "R" }, 645 { "__GFP_RETRY_MAYFAIL", "R" },
647 { "__GFP_NOFAIL", "NF" }, 646 { "__GFP_NOFAIL", "NF" },
@@ -655,7 +654,6 @@ static const struct {
655 { "__GFP_RECLAIMABLE", "RC" }, 654 { "__GFP_RECLAIMABLE", "RC" },
656 { "__GFP_MOVABLE", "M" }, 655 { "__GFP_MOVABLE", "M" },
657 { "__GFP_ACCOUNT", "AC" }, 656 { "__GFP_ACCOUNT", "AC" },
658 { "__GFP_NOTRACK", "NT" },
659 { "__GFP_WRITE", "WR" }, 657 { "__GFP_WRITE", "WR" },
660 { "__GFP_RECLAIM", "R" }, 658 { "__GFP_RECLAIM", "R" },
661 { "__GFP_DIRECT_RECLAIM", "DR" }, 659 { "__GFP_DIRECT_RECLAIM", "DR" },
diff --git a/tools/testing/radix-tree/multiorder.c b/tools/testing/radix-tree/multiorder.c
index 06c71178d07d..59245b3d587c 100644
--- a/tools/testing/radix-tree/multiorder.c
+++ b/tools/testing/radix-tree/multiorder.c
@@ -618,7 +618,7 @@ static void multiorder_account(void)
618 __radix_tree_insert(&tree, 1 << 5, 5, (void *)0x12); 618 __radix_tree_insert(&tree, 1 << 5, 5, (void *)0x12);
619 __radix_tree_lookup(&tree, 1 << 5, &node, &slot); 619 __radix_tree_lookup(&tree, 1 << 5, &node, &slot);
620 assert(node->count == node->exceptional * 2); 620 assert(node->count == node->exceptional * 2);
621 __radix_tree_replace(&tree, node, slot, NULL, NULL, NULL); 621 __radix_tree_replace(&tree, node, slot, NULL, NULL);
622 assert(node->exceptional == 0); 622 assert(node->exceptional == 0);
623 623
624 item_kill_tree(&tree); 624 item_kill_tree(&tree);
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index b0b7ef6d0de1..f82c2eaa859d 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm/slabinfo.c
@@ -84,6 +84,7 @@ int output_lines = -1;
84int sort_loss; 84int sort_loss;
85int extended_totals; 85int extended_totals;
86int show_bytes; 86int show_bytes;
87int unreclaim_only;
87 88
88/* Debug options */ 89/* Debug options */
89int sanity; 90int sanity;
@@ -133,6 +134,7 @@ static void usage(void)
133 "-L|--Loss Sort by loss\n" 134 "-L|--Loss Sort by loss\n"
134 "-X|--Xtotals Show extended summary information\n" 135 "-X|--Xtotals Show extended summary information\n"
135 "-B|--Bytes Show size in bytes\n" 136 "-B|--Bytes Show size in bytes\n"
137 "-U|--Unreclaim Show unreclaimable slabs only\n"
136 "\nValid debug options (FZPUT may be combined)\n" 138 "\nValid debug options (FZPUT may be combined)\n"
137 "a / A Switch on all debug options (=FZUP)\n" 139 "a / A Switch on all debug options (=FZUP)\n"
138 "- Switch off all debug options\n" 140 "- Switch off all debug options\n"
@@ -569,6 +571,9 @@ static void slabcache(struct slabinfo *s)
569 if (strcmp(s->name, "*") == 0) 571 if (strcmp(s->name, "*") == 0)
570 return; 572 return;
571 573
574 if (unreclaim_only && s->reclaim_account)
575 return;
576
572 if (actual_slabs == 1) { 577 if (actual_slabs == 1) {
573 report(s); 578 report(s);
574 return; 579 return;
@@ -1347,6 +1352,7 @@ struct option opts[] = {
1347 { "Loss", no_argument, NULL, 'L'}, 1352 { "Loss", no_argument, NULL, 'L'},
1348 { "Xtotals", no_argument, NULL, 'X'}, 1353 { "Xtotals", no_argument, NULL, 'X'},
1349 { "Bytes", no_argument, NULL, 'B'}, 1354 { "Bytes", no_argument, NULL, 'B'},
1355 { "Unreclaim", no_argument, NULL, 'U'},
1350 { NULL, 0, NULL, 0 } 1356 { NULL, 0, NULL, 0 }
1351}; 1357};
1352 1358
@@ -1358,7 +1364,7 @@ int main(int argc, char *argv[])
1358 1364
1359 page_size = getpagesize(); 1365 page_size = getpagesize();
1360 1366
1361 while ((c = getopt_long(argc, argv, "aAd::Defhil1noprstvzTSN:LXB", 1367 while ((c = getopt_long(argc, argv, "aAd::Defhil1noprstvzTSN:LXBU",
1362 opts, NULL)) != -1) 1368 opts, NULL)) != -1)
1363 switch (c) { 1369 switch (c) {
1364 case '1': 1370 case '1':
@@ -1439,6 +1445,9 @@ int main(int argc, char *argv[])
1439 case 'B': 1445 case 'B':
1440 show_bytes = 1; 1446 show_bytes = 1;
1441 break; 1447 break;
1448 case 'U':
1449 unreclaim_only = 1;
1450 break;
1442 default: 1451 default:
1443 fatal("%s: Invalid option '%c'\n", argv[0], optopt); 1452 fatal("%s: Invalid option '%c'\n", argv[0], optopt);
1444 1453