linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	John Stultz <john.stultz@linaro.org>,
	Richard Cochran <richardcochran@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2) posix-timers: make it configurable
Date: Wed, 14 Sep 2016 13:58:12 -0700	[thread overview]
Message-ID: <20160914205812.GA11992@cloud> (raw)
In-Reply-To: <alpine.LFD.2.20.1609141624120.14769@knanqh.ubzr>

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

  reply	other threads:[~2016-09-14 20:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 20:46 [PATCH v2) posix-timers: make it configurable Nicolas Pitre
2016-09-14 20:58 ` Josh Triplett [this message]
2016-09-14 21:09   ` Nicolas Pitre
2016-09-14 22:16     ` Josh Triplett
2016-09-14 22:34 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160914205812.GA11992@cloud \
    --to=josh@joshtriplett.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=richardcochran@gmail.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).