Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1483656

Re: [PATCH v2) posix-timers: make it configurable

From Josh Triplett <josh@joshtriplett.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2) posix-timers: make it configurable
Date 2016-09-14 23:00 +0200
Message-ID <shprH-5Nt-5@gated-at.bofh.it> (permalink)
References <shpi1-5JB-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Sep 14, 2016 at 04:46:54PM -0400, Nicolas Pitre wrote:
> Many embedded systems typically don't need them.  This removes about
> 22KB from the kernel binary size on ARM when configured out.
> 
> Corresponding syscalls are routed to a stub logging the attempt to
> use those syscalls which should be enough of a clue if they were
> disabled without proper consideration. They are: timer_create,
> timer_gettime: timer_getoverrun, timer_settime, timer_delete,
> clock_adjtime.
> 
> The clock_settime, clock_gettime, clock_getres and clock_nanosleep syscalls
> are replaced by simple wrappers compatible with CLOCK_REALTIME,
> CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
> 
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
> ---
> 
> Changes from RFC/v1:
> 
> - Stubbed-out functions moved to static inlines.
> - The timer signal handling code is now removed.
> - The list of removed syscalls is explicitly documented.
> - The clock_settime, clock_gettime, clock_getres and clock_nanosleep 
>   syscalls are minimally preserved as this required very little code.
> 
> I'm now able to boot a copy of Fedora 21 with this patch and 
> CONFIG_POSIX_TIMERS=n with no apparent issues.

This looks quite reasonable.

Does booting a standard distro really require providing clock_settime?

I'd still prefer to see the special-case sys_ni support dropped,
especially since the most common syscalls now remain.  However, if
others want to see it kept, I won't object too strongly; whoever ends up
implementing a common (and optional) version of that infrastructure for
all syscalls can fold this into it.

- Josh Triplett

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-14 22:50 +0200
  Re: [PATCH v2) posix-timers: make it configurable Josh Triplett <josh@joshtriplett.org> - 2016-09-14 23:00 +0200
    Re: [PATCH v2) posix-timers: make it configurable Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-09-14 23:20 +0200
      Re: [PATCH v2) posix-timers: make it configurable Josh Triplett <josh@joshtriplett.org> - 2016-09-15 00:20 +0200
  Re: [PATCH v2) posix-timers: make it configurable kbuild test robot <lkp@intel.com> - 2016-09-15 00:40 +0200

csiph-web