* [PATCH] Remove CLOCK_TICK_RATE from ACTHZ definition
@ 2011-08-04 0:00 Deepak Saxena
2011-08-05 10:21 ` john stultz
0 siblings, 1 reply; 2+ messages in thread
From: Deepak Saxena @ 2011-08-04 0:00 UTC (permalink / raw)
To: Thomas Gleixner, John Stultz; +Cc: linux-kernel, Linus Torvalds, patches
As per https://lkml.org/lkml/2011/2/21/323, we remove
CLOCK_TICK_RATE from the definition of ACTHZ as the
majority of CLOCK_TICK_RATE values are no longer valid
or needed for proper operation of the time code.
Signed-off-by: Deepak Saxena <dsaxena@linaro.org>
---
include/linux/jiffies.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index f97672a..d232f00 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -55,7 +55,7 @@
+ ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN))
/* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */
-#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
+#define ACTHZ (HZ << 8)
/* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */
#define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8))
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove CLOCK_TICK_RATE from ACTHZ definition
2011-08-04 0:00 [PATCH] Remove CLOCK_TICK_RATE from ACTHZ definition Deepak Saxena
@ 2011-08-05 10:21 ` john stultz
0 siblings, 0 replies; 2+ messages in thread
From: john stultz @ 2011-08-05 10:21 UTC (permalink / raw)
To: dsaxena; +Cc: Thomas Gleixner, linux-kernel, Linus Torvalds, patches
On Wed, 2011-08-03 at 17:00 -0700, Deepak Saxena wrote:
> As per https://lkml.org/lkml/2011/2/21/323, we remove
> CLOCK_TICK_RATE from the definition of ACTHZ as the
> majority of CLOCK_TICK_RATE values are no longer valid
> or needed for proper operation of the time code.
>
> Signed-off-by: Deepak Saxena <dsaxena@linaro.org>
> ---
> include/linux/jiffies.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
> index f97672a..d232f00 100644
> --- a/include/linux/jiffies.h
> +++ b/include/linux/jiffies.h
> @@ -55,7 +55,7 @@
> + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN))
>
> /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */
> -#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
> +#define ACTHZ (HZ << 8)
>
> /* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */
> #define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8))
So I'm hesitant about this patch, since the whole point of ACTHZ is to
provide a higher precision value for the actual irq frequency (as
hardware won't be able to do exactly 100/250/300/1000HZ).
One could argue that with highres timers, jiffies is usually updated by
the timekeeping code, which for the most part isn't affected by irq freq
error. So we could reasonably forgo this minor error correction, only
hurting systems that use the jiffies clocksource, or require
ARCH_USES_GETTIMEOFFSET.
However, we would probably want to kill off all the ACTHZ usage as well
since we're at that point gaining nothing from the extra complexity.
thanks
-john
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-05 10:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-04 0:00 [PATCH] Remove CLOCK_TICK_RATE from ACTHZ definition Deepak Saxena
2011-08-05 10:21 ` john stultz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox