Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1376481
| From | "Bill Huey (hui)" <bill.huey@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH RFC v0 02/12] Reroute rtc update irqs to the cyclic scheduler handler |
| Date | 2016-04-12 07:40 +0200 |
| Message-ID | <rmZdo-1UI-11@gated-at.bofh.it> (permalink) |
| References | <rmZ3H-1MB-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Redirect rtc update irqs so that it drives the cyclic scheduler timer
handler instead. Let the handler determine which slot to activate next.
Similar to scheduler tick handling but just for the cyclic scheduler.
Signed-off-by: Bill Huey (hui) <bill.huey@gmail.com>
---
drivers/rtc/interface.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 9ef5f6f..6d39d40 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -17,6 +17,10 @@
#include <linux/log2.h>
#include <linux/workqueue.h>
+#ifdef CONFIG_RTC_CYCLIC
+#include "../kernel/sched/cyclic.h"
+#endif
+
static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer);
static void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer);
@@ -488,6 +492,9 @@ EXPORT_SYMBOL_GPL(rtc_update_irq_enable);
void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode)
{
unsigned long flags;
+#ifdef CONFIG_RTC_CYCLIC
+ int handled = 0;
+#endif
/* mark one irq of the appropriate mode */
spin_lock_irqsave(&rtc->irq_lock, flags);
@@ -500,7 +507,23 @@ void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode)
rtc->irq_task->func(rtc->irq_task->private_data);
spin_unlock_irqrestore(&rtc->irq_task_lock, flags);
+#ifdef CONFIG_RTC_CYCLIC
+ /* wake up slot_curr if overrun task */
+ if (RTC_PF) {
+ if (rt_overrun_rq_admitted()) {
+ /* advance the cursor, overrun report */
+ rt_overrun_timer_handler(rtc);
+ handled = 1;
+ }
+ }
+
+ if (!handled) {
+ wake_up_interruptible(&rtc->irq_queue);
+ }
+#else
wake_up_interruptible(&rtc->irq_queue);
+#endif
+
kill_fasync(&rtc->async_queue, SIGIO, POLL_IN);
}
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC v0 00/12] Cyclic Scheduler Against RTC "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:30 +0200
[PATCH RFC v0 01/12] Kconfig change "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:40 +0200
[PATCH RFC v0 03/12] Add cyclic support to rtc-dev.c "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:40 +0200
[PATCH RFC v0 10/12] Export SCHED_FIFO/RT requeuing functions "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:40 +0200
[PATCH RFC v0 07/12] kernel/userspace additions for addition ioctl() support for rtc "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:40 +0200
[PATCH RFC v0 08/12] Compilation support "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:40 +0200
[PATCH RFC v0 02/12] Reroute rtc update irqs to the cyclic scheduler handler "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:40 +0200
[PATCH RFC v0 12/12] Cyclic/rtc documentation "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:40 +0200
[PATCH RFC v0 06/12] Add anonymous struct to sched_rt_entity "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:40 +0200
[PATCH RFC v0 05/12] Task tracking per file descriptor "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-12 07:40 +0200
Re: [PATCH RFC v0 00/12] Cyclic Scheduler Against RTC Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-04-12 08:00 +0200
Re: [PATCH RFC v0 00/12] Cyclic Scheduler Against RTC Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-04-12 08:10 +0200
Re: [PATCH RFC v0 00/12] Cyclic Scheduler Against RTC Juri Lelli <juri.lelli@arm.com> - 2016-04-13 11:00 +0200
Re: [PATCH RFC v0 00/12] Cyclic Scheduler Against RTC "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-13 11:40 +0200
Re: [PATCH RFC v0 00/12] Cyclic Scheduler Against RTC Juri Lelli <juri.lelli@arm.com> - 2016-04-13 12:10 +0200
Re: [PATCH RFC v0 00/12] Cyclic Scheduler Against RTC "Bill Huey (hui)" <bill.huey@gmail.com> - 2016-04-13 12:40 +0200
csiph-web