* Re: [patch 4/4] hpet: factor timer allocate from open [not found] <20120305230755.35019A02EB@akpm.mtv.corp.google.com> @ 2012-03-06 12:52 ` Thomas Gleixner 2012-03-06 15:04 ` Clemens Ladisch 0 siblings, 1 reply; 3+ messages in thread From: Thomas Gleixner @ 2012-03-06 12:52 UTC (permalink / raw) To: akpm; +Cc: maglyx, Arnd Bergmann, clemens, John Stultz, LKML On Mon, 5 Mar 2012, akpm@linux-foundation.org wrote: > From: Magnus Lynch <maglyx@gmail.com> > Subject: hpet: factor timer allocate from open > > The current implementation of the /dev/hpet driver couples opening the > device with allocating one of the (scarce) timers (aka comparators). This > is a limitation in that the main counter may be valuable to applications > seeking a high-resolution timer who have no use for the interrupt > generating functionality of the comparators. > > This patch alters the open semantics so that when the device is opened, no > timer is allocated. Operations that depend on a timer being in context > implicitly attempt allocating a timer, to maintain backward compatibility. AFAICT, there is only fasync which calls hpet_alloc_timer(). All other functions are broken by this chage. > There is also an IOCTL (HPET_ALLOC_TIMER _IO) added so that the > allocation may be done explicitly. (I prefer the explicit open then And that IOCTL does what? Return 0 is not really useful functionality. Thanks, tglx ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 4/4] hpet: factor timer allocate from open 2012-03-06 12:52 ` [patch 4/4] hpet: factor timer allocate from open Thomas Gleixner @ 2012-03-06 15:04 ` Clemens Ladisch 2012-03-06 18:38 ` Andrew Morton 0 siblings, 1 reply; 3+ messages in thread From: Clemens Ladisch @ 2012-03-06 15:04 UTC (permalink / raw) To: Thomas Gleixner; +Cc: akpm, maglyx, Arnd Bergmann, John Stultz, LKML Thomas Gleixner wrote: > On Mon, 5 Mar 2012, akpm@linux-foundation.org wrote: >> From: Magnus Lynch <maglyx@gmail.com> >> Subject: hpet: factor timer allocate from open >> >> The current implementation of the /dev/hpet driver couples opening the >> device with allocating one of the (scarce) timers (aka comparators). This >> is a limitation in that the main counter may be valuable to applications >> seeking a high-resolution timer who have no use for the interrupt >> generating functionality of the comparators. >> >> This patch alters the open semantics so that when the device is opened, no >> timer is allocated. Operations that depend on a timer being in context >> implicitly attempt allocating a timer, to maintain backward compatibility. > > AFAICT, there is only fasync which calls hpet_alloc_timer(). All other > functions are broken by this chage. Indeed. There was another call in hpet_ioctl_common(), but it appears that one somehow got dropped. Magnus, is this the patch that you submitted and have tested? Regards, Clemens ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 4/4] hpet: factor timer allocate from open 2012-03-06 15:04 ` Clemens Ladisch @ 2012-03-06 18:38 ` Andrew Morton 0 siblings, 0 replies; 3+ messages in thread From: Andrew Morton @ 2012-03-06 18:38 UTC (permalink / raw) To: Clemens Ladisch; +Cc: Thomas Gleixner, maglyx, Arnd Bergmann, John Stultz, LKML On Tue, 06 Mar 2012 16:04:21 +0100 Clemens Ladisch <clemens@ladisch.de> wrote: > Thomas Gleixner wrote: > > On Mon, 5 Mar 2012, akpm@linux-foundation.org wrote: > >> From: Magnus Lynch <maglyx@gmail.com> > >> Subject: hpet: factor timer allocate from open > >> > >> The current implementation of the /dev/hpet driver couples opening the > >> device with allocating one of the (scarce) timers (aka comparators). This > >> is a limitation in that the main counter may be valuable to applications > >> seeking a high-resolution timer who have no use for the interrupt > >> generating functionality of the comparators. > >> > >> This patch alters the open semantics so that when the device is opened, no > >> timer is allocated. Operations that depend on a timer being in context > >> implicitly attempt allocating a timer, to maintain backward compatibility. > > > > AFAICT, there is only fasync which calls hpet_alloc_timer(). All other > > functions are broken by this chage. > > Indeed. There was another call in hpet_ioctl_common(), but it appears > that one somehow got dropped. > > Magnus, is this the patch that you submitted and have tested? I've been carrying this patch since March 2010 - perhaps it rotted. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-06 18:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20120305230755.35019A02EB@akpm.mtv.corp.google.com>
2012-03-06 12:52 ` [patch 4/4] hpet: factor timer allocate from open Thomas Gleixner
2012-03-06 15:04 ` Clemens Ladisch
2012-03-06 18:38 ` Andrew Morton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox