Skip to content

Please enable method to disable tickless kernel and to enable kernel PPS #1218

Closed

Description

I've been following the "Change to 250hz and voluntary preemption" thread with interest, as it has potential benefits for NTP server applications. I was wondering if it would also be possible to enable the disabling of the tickless kernel ('nohz=off' in cmdline.txt or config.txt) that works for other distros but for some reason doesn't appear to work on the Pi, and also to enable the 'Device Drivers > PPS support > PPS kernel consumer support' option, which allows full kernel pulse-per-second ability (assuming these have no knock-on effect to stability, speed etc).

These two changes, coupled with any increase in timer frequency, would save on custom kernel compiling with, I hope, little or no impact on other uses.

Activity

  1. Ferroin commented on Dec 7, 2015

    @Ferroin
    Contributor

    The default kernel shouldn't be running tickless on at least the original Pi's (you can't safely run tickless on a single processor system and still have working accounting). I'm not 100% certain, but I think that even tickless idle is turned off at compile time anyway.

    It might be worth noting that where I work our DHCP servers are RPi's, and they run as NTP peers, and I've never seen them more than a dozen PPM out of sync with each other or the local NTP servers after the initial sync, despite using stock Raspbian kernels.

  2. Ferroin commented on Dec 7, 2015

    @Ferroin
    Contributor

    OK, I'm actually kind of curious how much tickless idle would impact jitter, you're getting woken up once per second anyway by the PPS interfafce, which would start the scheduler tick.

    Secondarily, unless you're doing scientific work, you almost certainly don't need better than millisecond accuracy for a local time server, so the argument is really for people who want to use it as an open NTP server.

    I can't really personally argue how much impact the PPS support might have on normal users, but you should keep in mind that even a few kilobytes of extra ram being used by the kernel does have an impact for regular users.

    Regardless, I'm not personally a developer (just someone who has a lot of experience with the Linux kernel in general), so I'm not the person you would need to convince.

  3. Ferroin commented on Dec 8, 2015

    @Ferroin
    Contributor

    I'm not 100% certain about how PPS interacts with tickless idle. Absolute best case scenario, it just gets offset by the amount of time it takes to get the tick running again (not sure how long this is on the Pi, but probably much less than 1ms), worst case there's jitter in the wakeup routine because of tickless idle.

    As far as just enabling it, the issue is not as likely to be processor usage, but memory usage. Absolute best case scenario, this all fits such that the memory footprint at runtime is no bigger. However, that's pretty unlikely, and I would expect at least a 4k increase in memory consumption. Whether that would be enough to make the developers not want to include this or not, I can't say.

    Like I said though, I'm not the one you need to convince.

  4. P33M commented on Dec 8, 2015

    @P33M
    Contributor

    Is PPS input (on a GPIO) from e.g. a GPS module or radio time decoder?

  5. Ferroin commented on Dec 8, 2015

    @Ferroin
    Contributor

    @P33M Usually I've seen some people do up custom high precision timers for it, and it's sometimes driven directly by an atomic clock, but both cases are usually expensive and time consuming to do right, and as such aren't anywhere near as common as a GPS/GLONASS/Galileo module or a radio time decoder.

  6. ghost closed this as completedon Dec 10, 2015
  7. Martin-HiPi commented on Feb 19, 2022

    @Martin-HiPi

    This is the current work-around, but it doesn't solve the issue. Every time a new kernel is released, it has to be recompiled with non-default options by external intervention.

    Having the ability to enable those settings via command-line or config file would make it possible to set and forget. The newly released kernel would pick up the settings automatically.

    Martin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions