diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-06-27 05:35:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-06-27 05:35:02 -0400 |
commit | 630741fb60ac4e286f5396403c0d864d924c02bc (patch) | |
tree | 16eb952c3653386c6d1ad99e369615dfe65e4d67 /tools | |
parent | 807e5b80687c06715d62df51a5473b231e3e8b15 (diff) | |
parent | ea1dc6fc6242f991656e35e2ed3d90ec1cd13418 (diff) |
Merge branch 'sched/urgent' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc | 9 | ||||
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc | 9 | ||||
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc | 9 | ||||
-rw-r--r-- | tools/testing/selftests/vm/compaction_test.c | 2 | ||||
-rw-r--r-- | tools/virtio/ringtest/Makefile | 4 | ||||
-rw-r--r-- | tools/virtio/ringtest/README | 4 | ||||
-rw-r--r-- | tools/virtio/ringtest/noring.c | 69 | ||||
-rwxr-xr-x | tools/virtio/ringtest/run-on-all.sh | 4 | ||||
-rw-r--r-- | tools/vm/slabinfo.c | 2 |
9 files changed, 92 insertions, 20 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc index c2b61c4fda11..0bf5085281f3 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc | |||
@@ -23,15 +23,14 @@ if [ ! -f events/sched/sched_process_fork/trigger ]; then | |||
23 | exit_unsupported | 23 | exit_unsupported |
24 | fi | 24 | fi |
25 | 25 | ||
26 | reset_tracer | 26 | if [ ! -f events/sched/sched_process_fork/hist ]; then |
27 | do_reset | ||
28 | |||
29 | FEATURE=`grep hist events/sched/sched_process_fork/trigger` | ||
30 | if [ -z "$FEATURE" ]; then | ||
31 | echo "hist trigger is not supported" | 27 | echo "hist trigger is not supported" |
32 | exit_unsupported | 28 | exit_unsupported |
33 | fi | 29 | fi |
34 | 30 | ||
31 | reset_tracer | ||
32 | do_reset | ||
33 | |||
35 | echo "Test histogram with execname modifier" | 34 | echo "Test histogram with execname modifier" |
36 | 35 | ||
37 | echo 'hist:keys=common_pid.execname' > events/sched/sched_process_fork/trigger | 36 | echo 'hist:keys=common_pid.execname' > events/sched/sched_process_fork/trigger |
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc index b2902d42a537..a00184cd9c95 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc | |||
@@ -23,15 +23,14 @@ if [ ! -f events/sched/sched_process_fork/trigger ]; then | |||
23 | exit_unsupported | 23 | exit_unsupported |
24 | fi | 24 | fi |
25 | 25 | ||
26 | reset_tracer | 26 | if [ ! -f events/sched/sched_process_fork/hist ]; then |
27 | do_reset | ||
28 | |||
29 | FEATURE=`grep hist events/sched/sched_process_fork/trigger` | ||
30 | if [ -z "$FEATURE" ]; then | ||
31 | echo "hist trigger is not supported" | 27 | echo "hist trigger is not supported" |
32 | exit_unsupported | 28 | exit_unsupported |
33 | fi | 29 | fi |
34 | 30 | ||
31 | reset_tracer | ||
32 | do_reset | ||
33 | |||
35 | echo "Test histogram basic tigger" | 34 | echo "Test histogram basic tigger" |
36 | 35 | ||
37 | echo 'hist:keys=parent_pid:vals=child_pid' > events/sched/sched_process_fork/trigger | 36 | echo 'hist:keys=parent_pid:vals=child_pid' > events/sched/sched_process_fork/trigger |
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc index 03c4a46561fc..3478b00ead57 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc | |||
@@ -23,15 +23,14 @@ if [ ! -f events/sched/sched_process_fork/trigger ]; then | |||
23 | exit_unsupported | 23 | exit_unsupported |
24 | fi | 24 | fi |
25 | 25 | ||
26 | reset_tracer | 26 | if [ ! -f events/sched/sched_process_fork/hist ]; then |
27 | do_reset | ||
28 | |||
29 | FEATURE=`grep hist events/sched/sched_process_fork/trigger` | ||
30 | if [ -z "$FEATURE" ]; then | ||
31 | echo "hist trigger is not supported" | 27 | echo "hist trigger is not supported" |
32 | exit_unsupported | 28 | exit_unsupported |
33 | fi | 29 | fi |
34 | 30 | ||
31 | reset_tracer | ||
32 | do_reset | ||
33 | |||
35 | reset_trigger | 34 | reset_trigger |
36 | 35 | ||
37 | echo "Test histogram multiple tiggers" | 36 | echo "Test histogram multiple tiggers" |
diff --git a/tools/testing/selftests/vm/compaction_test.c b/tools/testing/selftests/vm/compaction_test.c index 932ff577ffc0..00c4f65d12da 100644 --- a/tools/testing/selftests/vm/compaction_test.c +++ b/tools/testing/selftests/vm/compaction_test.c | |||
@@ -136,7 +136,7 @@ int check_compaction(unsigned long mem_free, unsigned int hugepage_size) | |||
136 | printf("No of huge pages allocated = %d\n", | 136 | printf("No of huge pages allocated = %d\n", |
137 | (atoi(nr_hugepages))); | 137 | (atoi(nr_hugepages))); |
138 | 138 | ||
139 | if (write(fd, initial_nr_hugepages, sizeof(initial_nr_hugepages)) | 139 | if (write(fd, initial_nr_hugepages, strlen(initial_nr_hugepages)) |
140 | != strlen(initial_nr_hugepages)) { | 140 | != strlen(initial_nr_hugepages)) { |
141 | perror("Failed to write to /proc/sys/vm/nr_hugepages\n"); | 141 | perror("Failed to write to /proc/sys/vm/nr_hugepages\n"); |
142 | goto close_fd; | 142 | goto close_fd; |
diff --git a/tools/virtio/ringtest/Makefile b/tools/virtio/ringtest/Makefile index 6ba745529833..6173adae9f08 100644 --- a/tools/virtio/ringtest/Makefile +++ b/tools/virtio/ringtest/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | all: | 1 | all: |
2 | 2 | ||
3 | all: ring virtio_ring_0_9 virtio_ring_poll virtio_ring_inorder | 3 | all: ring virtio_ring_0_9 virtio_ring_poll virtio_ring_inorder noring |
4 | 4 | ||
5 | CFLAGS += -Wall | 5 | CFLAGS += -Wall |
6 | CFLAGS += -pthread -O2 -ggdb | 6 | CFLAGS += -pthread -O2 -ggdb |
@@ -15,11 +15,13 @@ ring: ring.o main.o | |||
15 | virtio_ring_0_9: virtio_ring_0_9.o main.o | 15 | virtio_ring_0_9: virtio_ring_0_9.o main.o |
16 | virtio_ring_poll: virtio_ring_poll.o main.o | 16 | virtio_ring_poll: virtio_ring_poll.o main.o |
17 | virtio_ring_inorder: virtio_ring_inorder.o main.o | 17 | virtio_ring_inorder: virtio_ring_inorder.o main.o |
18 | noring: noring.o main.o | ||
18 | clean: | 19 | clean: |
19 | -rm main.o | 20 | -rm main.o |
20 | -rm ring.o ring | 21 | -rm ring.o ring |
21 | -rm virtio_ring_0_9.o virtio_ring_0_9 | 22 | -rm virtio_ring_0_9.o virtio_ring_0_9 |
22 | -rm virtio_ring_poll.o virtio_ring_poll | 23 | -rm virtio_ring_poll.o virtio_ring_poll |
23 | -rm virtio_ring_inorder.o virtio_ring_inorder | 24 | -rm virtio_ring_inorder.o virtio_ring_inorder |
25 | -rm noring.o noring | ||
24 | 26 | ||
25 | .PHONY: all clean | 27 | .PHONY: all clean |
diff --git a/tools/virtio/ringtest/README b/tools/virtio/ringtest/README index 34e94c46104f..d83707a336c9 100644 --- a/tools/virtio/ringtest/README +++ b/tools/virtio/ringtest/README | |||
@@ -1,2 +1,6 @@ | |||
1 | Partial implementation of various ring layouts, useful to tune virtio design. | 1 | Partial implementation of various ring layouts, useful to tune virtio design. |
2 | Uses shared memory heavily. | 2 | Uses shared memory heavily. |
3 | |||
4 | Typical use: | ||
5 | |||
6 | # sh run-on-all.sh perf stat -r 10 --log-fd 1 -- ./ring | ||
diff --git a/tools/virtio/ringtest/noring.c b/tools/virtio/ringtest/noring.c new file mode 100644 index 000000000000..eda2f4824130 --- /dev/null +++ b/tools/virtio/ringtest/noring.c | |||
@@ -0,0 +1,69 @@ | |||
1 | #define _GNU_SOURCE | ||
2 | #include "main.h" | ||
3 | #include <assert.h> | ||
4 | |||
5 | /* stub implementation: useful for measuring overhead */ | ||
6 | void alloc_ring(void) | ||
7 | { | ||
8 | } | ||
9 | |||
10 | /* guest side */ | ||
11 | int add_inbuf(unsigned len, void *buf, void *datap) | ||
12 | { | ||
13 | return 0; | ||
14 | } | ||
15 | |||
16 | /* | ||
17 | * skb_array API provides no way for producer to find out whether a given | ||
18 | * buffer was consumed. Our tests merely require that a successful get_buf | ||
19 | * implies that add_inbuf succeed in the past, and that add_inbuf will succeed, | ||
20 | * fake it accordingly. | ||
21 | */ | ||
22 | void *get_buf(unsigned *lenp, void **bufp) | ||
23 | { | ||
24 | return "Buffer"; | ||
25 | } | ||
26 | |||
27 | void poll_used(void) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | void disable_call() | ||
32 | { | ||
33 | assert(0); | ||
34 | } | ||
35 | |||
36 | bool enable_call() | ||
37 | { | ||
38 | assert(0); | ||
39 | } | ||
40 | |||
41 | void kick_available(void) | ||
42 | { | ||
43 | assert(0); | ||
44 | } | ||
45 | |||
46 | /* host side */ | ||
47 | void disable_kick() | ||
48 | { | ||
49 | assert(0); | ||
50 | } | ||
51 | |||
52 | bool enable_kick() | ||
53 | { | ||
54 | assert(0); | ||
55 | } | ||
56 | |||
57 | void poll_avail(void) | ||
58 | { | ||
59 | } | ||
60 | |||
61 | bool use_buf(unsigned *lenp, void **bufp) | ||
62 | { | ||
63 | return true; | ||
64 | } | ||
65 | |||
66 | void call_used(void) | ||
67 | { | ||
68 | assert(0); | ||
69 | } | ||
diff --git a/tools/virtio/ringtest/run-on-all.sh b/tools/virtio/ringtest/run-on-all.sh index 52b0f71ffa8d..2e69ca812b4c 100755 --- a/tools/virtio/ringtest/run-on-all.sh +++ b/tools/virtio/ringtest/run-on-all.sh | |||
@@ -3,10 +3,10 @@ | |||
3 | #use last CPU for host. Why not the first? | 3 | #use last CPU for host. Why not the first? |
4 | #many devices tend to use cpu0 by default so | 4 | #many devices tend to use cpu0 by default so |
5 | #it tends to be busier | 5 | #it tends to be busier |
6 | HOST_AFFINITY=$(cd /dev/cpu; ls|grep -v '[a-z]'|sort -n|tail -1) | 6 | HOST_AFFINITY=$(lscpu -p=cpu | tail -1) |
7 | 7 | ||
8 | #run command on all cpus | 8 | #run command on all cpus |
9 | for cpu in $(cd /dev/cpu; ls|grep -v '[a-z]'|sort -n); | 9 | for cpu in $(seq 0 $HOST_AFFINITY) |
10 | do | 10 | do |
11 | #Don't run guest and host on same CPU | 11 | #Don't run guest and host on same CPU |
12 | #It actually works ok if using signalling | 12 | #It actually works ok if using signalling |
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c index 1889163f2f05..7cf6e1769903 100644 --- a/tools/vm/slabinfo.c +++ b/tools/vm/slabinfo.c | |||
@@ -492,7 +492,7 @@ static void slab_stats(struct slabinfo *s) | |||
492 | s->deactivate_to_head + s->deactivate_to_tail + s->deactivate_bypass; | 492 | s->deactivate_to_head + s->deactivate_to_tail + s->deactivate_bypass; |
493 | 493 | ||
494 | if (total) { | 494 | if (total) { |
495 | printf("\nSlab Deactivation Ocurrences %%\n"); | 495 | printf("\nSlab Deactivation Occurrences %%\n"); |
496 | printf("-------------------------------------------------\n"); | 496 | printf("-------------------------------------------------\n"); |
497 | printf("Slab full %7lu %3lu%%\n", | 497 | printf("Slab full %7lu %3lu%%\n", |
498 | s->deactivate_full, (s->deactivate_full * 100) / total); | 498 | s->deactivate_full, (s->deactivate_full * 100) / total); |