From dfacda3b8b51e9d0207ddcf6f4c8f9e2f231d4f7 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Mon, 12 Apr 2010 23:18:32 -0400 Subject: Access WSSs with interrupts disabled --- bin/pm_task.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'bin/pm_task.c') diff --git a/bin/pm_task.c b/bin/pm_task.c index 40f3fb9..71d5690 100644 --- a/bin/pm_task.c +++ b/bin/pm_task.c @@ -107,6 +107,7 @@ int main(int argc, char **argv) saved_ctrl_page_ptr = ctrl; #endif + iopl(3); /* Enter loop that measures preemption and migration costs. */ while (curr_job_count * task_period < SIMRUNTIME) { #ifdef DEBUG @@ -119,6 +120,9 @@ int main(int argc, char **argv) #endif if (curr_job_count != ctrl->job_count) { + /* G-EDF with np sections while reading our samples */ + cli(); + /* ok, this is a new job. Get info from kernel */ curr_job_count = ctrl->job_count; @@ -208,10 +212,21 @@ int main(int argc, char **argv) data_count = (data_count+1) % DATAPOINTS; } + /* C, H, H, now exit the NP section + * FIXME this is a very long np section, we may think + * about splitting it in two: C + H,H + */ + sti(); + } else if (mem_ptr && mem_ptr_end && (curr_sched_count != ctrl->sched_count || curr_cpu != ctrl->cpu)) { + /* we are after a preemption / migration: + * enter NP before reading + */ + cli(); + /* we have done at least one go in the "best case". * job is the same => preempted / migrated */ @@ -244,6 +259,9 @@ int main(int argc, char **argv) /* okay */ data_points[data_count].access_type = 'P'; + /* exit NP now */ + sti(); + data_points[data_count].access_time = end_time - start_time; data_points[data_count].cpu = curr_cpu; -- cgit v1.2.2