From: Davide Libenzi <davidel@xmailserver.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: William Lee Irwin III <wli@holomorphy.com>
Subject: [patch 3/4] KMON - kmon scheduler instrumentation ...
Date: Sun, 06 May 2007 16:49:15 -0700 [thread overview]
Message-ID: <send-serie.davidel@xmailserver.org.27461.1178495357.3> (raw)
Hooks the kmon interface to the scheduler operations.
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
- Davide
Index: linux-2.6.21.scdev/kernel/sched.c
===================================================================
--- linux-2.6.21.scdev.orig/kernel/sched.c 2007-05-06 14:10:29.000000000 -0700
+++ linux-2.6.21.scdev/kernel/sched.c 2007-05-06 14:10:30.000000000 -0700
@@ -52,6 +52,7 @@
#include <linux/tsacct_kern.h>
#include <linux/kprobes.h>
#include <linux/delayacct.h>
+#include <linux/kmon-stats.h>
#include <asm/tlb.h>
#include <asm/unistd.h>
@@ -691,10 +692,12 @@
list_del(&p->run_list);
if (list_empty(array->queue + p->prio))
__clear_bit(p->prio, array->bitmap);
+ kmon_st_task_dequeue(p);
}
static void enqueue_task(struct task_struct *p, struct prio_array *array)
{
+ kmon_st_task_enqueue(p);
sched_info_queued(p);
list_add_tail(&p->run_list, array->queue + p->prio);
__set_bit(p->prio, array->bitmap);
@@ -1417,6 +1420,8 @@
int new_cpu;
#endif
+ kmon_st_task_wakeup(in_interrupt() ? NULL: current, p);
+
rq = task_rq_lock(p, &flags);
old_state = p->state;
if (!(old_state & state))
@@ -3412,6 +3417,7 @@
prev->timestamp = prev->last_ran = now;
sched_info_switch(prev, next);
+ kmon_st_task_switch(prev, next);
if (likely(prev != next)) {
next->timestamp = next->last_ran = now;
rq->nr_switches++;
reply other threads:[~2007-05-06 23:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=send-serie.davidel@xmailserver.org.27461.1178495357.3 \
--to=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®