MINOR: activity: report context switch counts instead of rates
It's not logical to report context switch rates per thread in show activity
because everything else is a counter and it's not even possible to compare
values. Let's only report counts. Further, this simplifies the scheduler's
code.
diff --git a/include/types/activity.h b/include/types/activity.h
index 0c23f76..605fe7a 100644
--- a/include/types/activity.h
+++ b/include/types/activity.h
@@ -50,12 +50,12 @@
/* one cache line */
struct freq_ctr cpust_1s; // avg amount of half-ms stolen over last second
struct freq_ctr_period cpust_15s; // avg amount of half-ms stolen over last 15s
- struct freq_ctr ctxsw_rate;// context switching rate over last second
- struct freq_ctr tasks_rate;// task wakeup rate over last second
unsigned int avg_loop_us; // average run time per loop over last 1024 runs
unsigned int accepted; // accepted incoming connections
unsigned int accq_pushed; // accept queue connections pushed
unsigned int accq_full; // accept queue connection not pushed because full
+ unsigned int ctxsw; // total number of context switches
+ unsigned int tasksw; // total number of task switches
char __pad[0]; // unused except to check remaining room
char __end[0] __attribute__((aligned(64))); // align size to 64.
};