+ mm-only-sched-add-a-few-scheduler-event-counters.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     sched: few scheduler event counters
has been added to the -mm tree.  Its filename is
     mm-only-sched-add-a-few-scheduler-event-counters.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: sched: few scheduler event counters
From: Christoph Lameter <clameter@xxxxxxx>

Add a few counters to be able to see how the softirq affects the scheduler. 
This patch should not go into mainline and maybe also not into mm.

(akpm: heh.  Bad boy)

New counters in /proc/vmstat

sched_tick_balance	Ticks that required invokation of the softirq
sched_tick_no_balance	Ticks that did not require the softirq
sched_load_balance	# invocations of load_balance().
sched_balance_softirq	# of softirq executions
sched_balance_running	# of times that serialization prevented
			load balancing of a sched_domain.

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>
Cc: Peter Williams <pwil3058@xxxxxxxxxxxxxx>
Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx>
Cc: Christoph Lameter <clameter@xxxxxxx>
Cc: "Siddha, Suresh B" <suresh.b.siddha@xxxxxxxxx>
Cc: "Chen, Kenneth W" <kenneth.w.chen@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/vmstat.h |    2 ++
 kernel/sched.c         |   12 ++++++++++--
 mm/vmstat.c            |    5 +++++
 3 files changed, 17 insertions(+), 2 deletions(-)

diff -puN include/linux/vmstat.h~mm-only-sched-add-a-few-scheduler-event-counters include/linux/vmstat.h
--- a/include/linux/vmstat.h~mm-only-sched-add-a-few-scheduler-event-counters
+++ a/include/linux/vmstat.h
@@ -47,6 +47,8 @@ enum vm_event_item { PGPGIN, PGPGOUT, PS
 		FOR_ALL_ZONES(PGSCAN_DIRECT),
 		PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL,
 		PAGEOUTRUN, ALLOCSTALL, PGROTATED,
+		SCHED_TICK_NO_BALANCE, SCHED_TICK_BALANCE, SCHED_BALANCE_SOFTIRQ,
+		SCHED_LOAD_BALANCE, SCHED_BALANCE_RUNNING,
 		NR_VM_EVENT_ITEMS
 };
 
diff -puN kernel/sched.c~mm-only-sched-add-a-few-scheduler-event-counters kernel/sched.c
--- a/kernel/sched.c~mm-only-sched-add-a-few-scheduler-event-counters
+++ a/kernel/sched.c
@@ -2897,6 +2897,8 @@ static void run_rebalance_domains(struct
 	/* Earliest time when we have to call run_rebalance_domains again */
 	unsigned long next_balance = jiffies + 60*HZ;
 
+	__count_vm_event(SCHED_BALANCE_SOFTIRQ);
+
 	for_each_domain(this_cpu, sd) {
 		if (!(sd->flags & SD_LOAD_BALANCE))
 			continue;
@@ -2911,11 +2913,14 @@ static void run_rebalance_domains(struct
 			interval = 1;
 
 		if (sd->flags & SD_SERIALIZE) {
-			if (!spin_trylock(&balancing))
+			if (!spin_trylock(&balancing)) {
+				__count_vm_event(SCHED_BALANCE_RUNNING);
 				goto out;
+			}
 		}
 
 		if (time_after_eq(jiffies, sd->last_balance + interval)) {
+			__count_vm_event(SCHED_LOAD_BALANCE);
 			if (load_balance(this_cpu, this_rq, sd, idle)) {
 				/*
 				 * We've pulled tasks over so either we're no
@@ -3185,8 +3190,11 @@ void scheduler_tick(void)
 		task_running_tick(rq, p);
 #ifdef CONFIG_SMP
 	update_load(rq);
-	if (time_after_eq(jiffies, rq->next_balance))
+	if (time_after_eq(jiffies, rq->next_balance)) {
+		__count_vm_event(SCHED_TICK_BALANCE);
 		raise_softirq(SCHED_SOFTIRQ);
+	}
+		__count_vm_event(SCHED_TICK_NO_BALANCE);
 #endif
 }
 
diff -puN mm/vmstat.c~mm-only-sched-add-a-few-scheduler-event-counters mm/vmstat.c
--- a/mm/vmstat.c~mm-only-sched-add-a-few-scheduler-event-counters
+++ a/mm/vmstat.c
@@ -509,6 +509,11 @@ static char *vmstat_text[] = {
 	"allocstall",
 
 	"pgrotated",
+	"sched_tick_no_balance",
+	"sched_tick_balance",
+	"sched_balance_softirq",
+	"sched_load_balance",
+	"sched_balance_running",
 #endif
 };
 
_

Patches currently in -mm which might be from clameter@xxxxxxx are

memory-page-alloc-minor-cleanups.patch
memory-page-alloc-minor-cleanups-fix.patch
get-rid-of-zone_table.patch
deal-with-cases-of-zone_dma-meaning-the-first-zone.patch
get-rid-of-zone_table-fix-3.patch
introduce-config_zone_dma.patch
optional-zone_dma-in-the-vm.patch
optional-zone_dma-in-the-vm-no-gfp_dma-check-in-the-slab-if-no-config_zone_dma-is-set.patch
optional-zone_dma-in-the-vm-no-gfp_dma-check-in-the-slab-if-no-config_zone_dma-is-set-reduce-config_zone_dma-ifdefs.patch
optional-zone_dma-for-ia64.patch
remove-zone_dma-remains-from-parisc.patch
remove-zone_dma-remains-from-sh-sh64.patch
set-config_zone_dma-for-arches-with-generic_isa_dma.patch
zoneid-fix-up-calculations-for-zoneid_pgshift.patch
radix-tree-rcu-lockless-readside.patch
sched-domain-move-sched-group-allocations-to-percpu-area.patch
sched-avoid-taking-rq-lock-in-wake_priority_sleeper.patch
sched-remove-staggering-of-load-balancing.patch
sched-disable-interrupts-for-locking-in-load_balance.patch
sched-extract-load-calculation-from-rebalance_tick.patch
sched-move-idle-status-calculation-into-rebalance_tick.patch
sched-use-softirq-for-load-balancing.patch
sched-call-tasklet-less-frequently.patch
sched-add-option-to-serialize-load-balancing.patch
mm-only-sched-add-a-few-scheduler-event-counters.patch
zvc-support-nr_slab_reclaimable--nr_slab_unreclaimable-swap_prefetch.patch
reduce-max_nr_zones-swap_prefetch-remove-incorrect-use-of-zone_highmem.patch
numa-add-zone_to_nid-function-swap_prefetch.patch
readahead-state-based-method-aging-accounting.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux