Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Neil Horman <nhorman@xxxxxxxxxxxxx>
- Date: Tue, 25 Jul 2006 14:22:08 -0400
On Tue, Jul 25, 2006 at 07:55:39PM +0200, Arjan van de Ven wrote:
Actually, I was curious about that. I had initially planned on using xchg to@@ -265,6 +269,7 @@ irqreturn_t rtc_interrupt(int irq, void
kill_fasync (&rtc_async_queue, SIGIO, POLL_IN);
+ *count_ptr = (*count_ptr)++;
Hi,
it's a cute idea, however 3 questions:
1) you probably want to add a few memory barriers around this, right?
update the counter on the mmaped page, but then it occured to me that an
unsigned long would always be an atomic update (or so I thought). Is there a
case in which userspace will read a munged value the way the code is now?
2) why use the rtc and not the regular timer interrupt?Honestly, because it seemed to be a quick way forward. The real time clock
driver was there, and its infrastructure lent itself rather easily toward adding
this functionality. If you can elaborate on a better suggestion, I'll happily
take a crack at it.
(andThat is true, but only in the case where someone opens up /dev/rtc, and if they
3) this will negate the power gain you get for tickless kernels, since
now they need to start ticking again ;( )
open that driver and send it a UIE or PIE ioctl, it will start ticking
regardless of this patch (or that is at least my impression).
Regards
Neil
Greetings,
Arjan van de Ven
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
--
/***************************************************
*Neil Horman
*Software Engineer
*gpg keyid: 1024D / 0x92A74FA1 - http://pgp.mit.edu
***************************************************/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Arjan van de Ven
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- References:
- [PATCH] RTC: Add mmap method to rtc character driver
- From: Neil Horman
- Re: [PATCH] RTC: Add mmap method to rtc character driver
- From: Arjan van de Ven
- [PATCH] RTC: Add mmap method to rtc character driver
- Prev by Date: Re: ACPI bombing, ACPI Exception (acpi_bus-0071): AE_NOT_FOUND
- Next by Date: Re: CFQ will be the new default IO scheduler - why?
- Previous by thread: Re: [PATCH] RTC: Add mmap method to rtc character driver
- Next by thread: Re: [PATCH] RTC: Add mmap method to rtc character driver
- Index(es):
Relevant Pages
|