aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-12-11 22:01:01 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-12-12 14:14:41 -0500
commitc8483ef0959672310bf4ebb72e1a308b00543f74 (patch)
tree9cb306009b01c5226178f69172738026431d37f2 /kernel
parentfbd9574e298157b54c38f82f536e5cea8f766dff (diff)
make klmirqd work like aux tasks. checkpoint.
this code is untested!
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c8
-rw-r--r--kernel/softirq.c14
2 files changed, 14 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 251c89eaf24e..840f87bce097 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4340,10 +4340,6 @@ need_resched:
4340 rcu_note_context_switch(cpu); 4340 rcu_note_context_switch(cpu);
4341 prev = rq->curr; 4341 prev = rq->curr;
4342 4342
4343#ifdef CONFIG_LITMUS_SOFTIRQD
4344 release_klitirqd_lock(prev);
4345#endif
4346
4347 /* LITMUS^RT: quickly re-evaluate the scheduling decision 4343 /* LITMUS^RT: quickly re-evaluate the scheduling decision
4348 * if the previous one is no longer valid after CTX. 4344 * if the previous one is no longer valid after CTX.
4349 */ 4345 */
@@ -4444,10 +4440,6 @@ litmus_need_resched_nonpreemptible:
4444 if (need_resched()) 4440 if (need_resched())
4445 goto need_resched; 4441 goto need_resched;
4446 4442
4447#ifdef LITMUS_SOFTIRQD
4448 reacquire_klitirqd_lock(prev);
4449#endif
4450
4451#ifdef CONFIG_LITMUS_PAI_SOFTIRQD 4443#ifdef CONFIG_LITMUS_PAI_SOFTIRQD
4452 litmus->run_tasklets(prev); 4444 litmus->run_tasklets(prev);
4453#endif 4445#endif
diff --git a/kernel/softirq.c b/kernel/softirq.c
index b013046e8c36..053aec196a50 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -403,11 +403,13 @@ void open_softirq(int nr, void (*action)(struct softirq_action *))
403/* 403/*
404 * Tasklets 404 * Tasklets
405 */ 405 */
406/*
406struct tasklet_head 407struct tasklet_head
407{ 408{
408 struct tasklet_struct *head; 409 struct tasklet_struct *head;
409 struct tasklet_struct **tail; 410 struct tasklet_struct **tail;
410}; 411};
412*/
411 413
412static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec); 414static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec);
413static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec); 415static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec);
@@ -522,6 +524,11 @@ void __tasklet_hi_schedule(struct tasklet_struct *t)
522#ifdef CONFIG_LITMUS_NVIDIA 524#ifdef CONFIG_LITMUS_NVIDIA
523 if(is_nvidia_func(t->func)) 525 if(is_nvidia_func(t->func))
524 { 526 {
527#if 1
528 // do nvidia tasklets right away and return
529 if(__do_nv_now(t))
530 return;
531#else
525 u32 nvidia_device = get_tasklet_nv_device_num(t); 532 u32 nvidia_device = get_tasklet_nv_device_num(t);
526 // TRACE("%s: Handling NVIDIA tasklet for device\t%u\tat\t%llu\n", 533 // TRACE("%s: Handling NVIDIA tasklet for device\t%u\tat\t%llu\n",
527 // __FUNCTION__, nvidia_device,litmus_clock()); 534 // __FUNCTION__, nvidia_device,litmus_clock());
@@ -564,6 +571,7 @@ void __tasklet_hi_schedule(struct tasklet_struct *t)
564 } 571 }
565 } 572 }
566 unlock_nv_registry(nvidia_device, &flags); 573 unlock_nv_registry(nvidia_device, &flags);
574#endif
567 } 575 }
568#endif 576#endif
569 577
@@ -590,6 +598,11 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t)
590#ifdef CONFIG_LITMUS_NVIDIA 598#ifdef CONFIG_LITMUS_NVIDIA
591 if(is_nvidia_func(t->func)) 599 if(is_nvidia_func(t->func))
592 { 600 {
601#if 1
602 // do nvidia tasklets right away and return
603 if(__do_nv_now(t))
604 return;
605#else
593 u32 nvidia_device = get_tasklet_nv_device_num(t); 606 u32 nvidia_device = get_tasklet_nv_device_num(t);
594 // TRACE("%s: Handling NVIDIA tasklet for device\t%u\tat\t%llu\n", 607 // TRACE("%s: Handling NVIDIA tasklet for device\t%u\tat\t%llu\n",
595 // __FUNCTION__, nvidia_device,litmus_clock()); 608 // __FUNCTION__, nvidia_device,litmus_clock());
@@ -632,6 +645,7 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t)
632 } 645 }
633 } 646 }
634 unlock_nv_registry(nvidia_device, &flags); 647 unlock_nv_registry(nvidia_device, &flags);
648#endif
635 } 649 }
636#endif 650#endif
637 651