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


Groups > linux.kernel > #1328055

Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack of an arbitrary thread.

From Andrew Morton <akpm@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack of an arbitrary thread.
Date 2016-02-05 21:40 +0100
Message-ID <qYVkB-572-5@gated-at.bofh.it> (permalink)
References <qYSZu-3G7-21@gated-at.bofh.it> <qYV1g-4ZA-15@gated-at.bofh.it> <qYVaX-53w-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 5 Feb 2016 12:23:13 -0800 John Stultz <john.stultz@linaro.org> wrote:

> On Fri, Feb 5, 2016 at 12:13 PM, Andrew Morton
> <akpm@linux-foundation.org> wrote:
> > On Fri,  5 Feb 2016 10:08:43 -0800 John Stultz <john.stultz@linaro.org> wrote:
> >> @@ -2218,6 +2222,27 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
> >>       case PR_GET_TID_ADDRESS:
> >>               error = prctl_get_tid_address(me, (int __user **)arg2);
> >>               break;
> >> +     case PR_SET_TIMERSLACK_PID:
> >> +             rcu_read_lock();
> >> +             tsk = find_task_by_vpid((pid_t)arg3);
> >
> > hm, as far as I can tell this is the first instance in which prctl() is
> > used to play with a task other than "current".  Maybe this isn't a good
> > precedent.
> >
> > If you look at all the other diddle-other-task functions in
> > kernel/sys.c, you'll see that they are standalone syscalls.  What
> > you've done here is just a bit lazy: added what is effectively a new
> > standalone syscall, only it has been hidden within the prctl() switch
> > statement.
> >
> > I don't see a practical problem with this - we could have implemented
> > all those other syscalls as prctl submodes as well.  But we didn't...
> >
> > IOW, it would be more consistent to add sys_set_timer_slack()?
> 
> I'm fine with moving this way.
> 
> Ruchi/Rom: Any objections to that idea?
> 
> Thomas/Arjan: Any other functionality we should consider including
> when adding a syscall to tweak timer slack?

A syscall is quite a bit more fuss - implement it on x86_64, provide a
no-op default in sys_ni.c, add a test suite into
tools/testing/selftests (mainly for arch maintainers), wait for the
various arch maintainers to wire it up.

Fortunately the build system now emits little messages which tell
maintainers that there's a new syscall which needs looking at.

And a manpage will be needed, but a prctl manpage patch would have been
needed anyway.

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


Thread

[PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack of an arbitrary thread. John Stultz <john.stultz@linaro.org> - 2016-02-05 19:10 +0100
  Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. Kees Cook <keescook@chromium.org> - 2016-02-05 21:20 +0100
    Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. John Stultz <john.stultz@linaro.org> - 2016-02-05 21:20 +0100
  Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer  slack of an arbitrary thread. Andrew Morton <akpm@linux-foundation.org> - 2016-02-05 21:20 +0100
    Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. John Stultz <john.stultz@linaro.org> - 2016-02-05 21:30 +0100
      Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer  slack of an arbitrary thread. Andrew Morton <akpm@linux-foundation.org> - 2016-02-05 21:40 +0100
        Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. John Stultz <john.stultz@linaro.org> - 2016-02-05 21:40 +0100
          Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. Kees Cook <keescook@chromium.org> - 2016-02-05 21:50 +0100
            Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer  slack of an arbitrary thread. Andrew Morton <akpm@linux-foundation.org> - 2016-02-05 22:00 +0100
              Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. John Stultz <john.stultz@linaro.org> - 2016-02-05 23:40 +0100
                Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. John Stultz <john.stultz@linaro.org> - 2016-02-06 02:00 +0100
                Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer  slack of an arbitrary thread. Andrew Morton <akpm@linux-foundation.org> - 2016-02-06 03:00 +0100
                Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. John Stultz <john.stultz@linaro.org> - 2016-02-06 03:50 +0100
                Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. Arjan van de Ven <arjan@linux.intel.com> - 2016-02-06 03:20 +0100
                Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. Arjan van de Ven <arjan@linux.intel.com> - 2016-02-06 04:00 +0100
                Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack  of an arbitrary thread. John Stultz <john.stultz@linaro.org> - 2016-02-06 04:00 +0100

csiph-web