Commit fe9f6db6 authored by Alessandro Rubini's avatar Alessandro Rubini

kernel config: change in timing setup

This changes the kernel configuration, in two ways:

1- It uses CONFIG_NOHZ, which enables Hight Resolution Timers

Unfortunately this has no effect, as the timeevent device for AT91
doesn't support oneshot mode.  This means that if you usleep(100)
you'll wait 10ms.  Thus, we can't remove the busy-looping in libwr/util.c .

This is the output of my libstamp sample program:

     0.003 -- stamping overhead
    12.243 -- usleep     1 usec
    10.005 -- usleep     1 usec
     9.963 -- usleep     2 usec
    10.037 -- usleep     5 usec
    10.083 -- usleep    10 usec
     9.905 -- usleep   100 usec
    10.394 -- usleep  1000 usec
    19.775 -- usleep 10000 usec
   109.925 -- usleep 100000 usec

2- It moves CONFIG_HZ from 100 to 1000. Thus, we have 1000 timer interrupts
per second.

This means, in practice, that if you usleep(100) you wait 1ms.  This
costs around 2% of CPU power (measured by running a cpu-busy program
before and after the change, in both cases after killing all
processes), but makes stuff millisecond-grained instead of
10ms-grained. This is a benefit for the PTP daemon and everything uses
timeouts in system calls.

This is libstamp again:

     0.003 -- stamping overhead
     0.662 -- usleep     1 usec
     0.869 -- usleep     1 usec
     0.976 -- usleep     2 usec
     0.951 -- usleep     5 usec
     0.993 -- usleep    10 usec
     0.999 -- usleep   100 usec
     1.999 -- usleep  1000 usec
    11.006 -- usleep 10000 usec
   101.043 -- usleep 100000 usec
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 56891b34
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.39 Kernel Configuration
# Fri Jun 13 11:38:49 2014
# Fri Nov 21 09:48:02 2014
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
......@@ -281,7 +281,7 @@ CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16=y
# AT91 Feature Selections
#
# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
CONFIG_AT91_TIMER_HZ=100
CONFIG_AT91_TIMER_HZ=1000
CONFIG_AT91_EARLY_DBGU=y
# CONFIG_AT91_EARLY_USART0 is not set
# CONFIG_AT91_EARLY_USART1 is not set
......@@ -326,8 +326,9 @@ CONFIG_ARM_L1_CACHE_SHIFT=5
#
# Kernel Features
#
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_VMSPLIT_3G=y
# CONFIG_VMSPLIT_2G is not set
......@@ -336,7 +337,7 @@ CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_HZ=100
CONFIG_HZ=1000
CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment