public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Alexey Perevalov <a.perevalov@samsung.com>,
	linux-kernel@vger.kernel.org, tglx@linutronix.de
Cc: anton@nomsg.org, kyungmin.park@samsung.com,
	cw00.choi@samsung.com, akpm@linux-foundation.org
Subject: Re: [PATCH v3 2/6] hrtimer: Add support for deferrable timer into the hrtimer
Date: Thu, 20 Feb 2014 10:49:46 -0800	[thread overview]
Message-ID: <53064E4A.8030105@linaro.org> (raw)
In-Reply-To: <1392885633-7787-3-git-send-email-a.perevalov@samsung.com>

On 02/20/2014 12:40 AM, Alexey Perevalov wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
>
> This patch introduces new public CLOCKID constants for
> user space API, such as timerfd. It extends hrtimer API and makes
> possible to have unified interfaces where deferreble functionality is
> used. In-kernel users such as device drivers could find benefits too.
>
> High resolution timer now could work with CLOCK_REALTIME_DEFERRABLE,
> CLOCK_MONOTONIC_DEFERRABLE, CLOCK_BOOTTIME_DEFERRABLE.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
> ---
>  include/linux/hrtimer.h   |    3 +++
>  include/uapi/linux/time.h |    3 +++
>  kernel/hrtimer.c          |   62 +++++++++++++++++++++++++++++++++++----------
>  3 files changed, 55 insertions(+), 13 deletions(-)
>
> diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
> index d19a5c2..fe1159c 100644
> --- a/include/linux/hrtimer.h
> +++ b/include/linux/hrtimer.h
> @@ -158,6 +158,9 @@ enum  hrtimer_base_type {
>  	HRTIMER_BASE_REALTIME,
>  	HRTIMER_BASE_BOOTTIME,
>  	HRTIMER_BASE_TAI,
> +	HRTIMER_BASE_MONOTONIC_DEFERRABLE,
> +	HRTIMER_BASE_REALTIME_DEFERRABLE,
> +	HRTIMER_BASE_BOOTTIME_DEFERRABLE,
>  	HRTIMER_MAX_CLOCK_BASES,
>  };
>  
> diff --git a/include/uapi/linux/time.h b/include/uapi/linux/time.h
> index e75e1b6..bb8dc60 100644
> --- a/include/uapi/linux/time.h
> +++ b/include/uapi/linux/time.h
> @@ -56,6 +56,9 @@ struct itimerval {
>  #define CLOCK_BOOTTIME_ALARM		9
>  #define CLOCK_SGI_CYCLE			10	/* Hardware specific */
>  #define CLOCK_TAI			11
> +#define CLOCK_REALTIME_DEFERRABLE	12
> +#define CLOCK_MONOTONIC_DEFERRABLE	13
> +#define CLOCK_BOOTTIME_DEFERRABLE	14

Adding the deferrable HRTIMER bases above is right, but I don't think we
agreed on adding the _DEFERRABLE clockids.

I'd instead prefer you use add a new TIMER_DEFERABLE flags argument, and
use the combination of the clockid + flag to decide which HRTIMER base
is used.

thanks
-john


  reply	other threads:[~2014-02-20 18:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20  8:40 [PATCH v3 0/6] Deferrable timers support for hrtimers/timerfd API Alexey Perevalov
2014-02-20  8:40 ` [PATCH v3 1/6] tracing/trivial: Add CLOCK_BOOTIME and CLOCK_TAI for human readable clockid trace Alexey Perevalov
2014-02-20 11:01   ` Thomas Gleixner
2014-02-20 16:25     ` Alexey Perevalov
2014-02-20  8:40 ` [PATCH v3 2/6] hrtimer: Add support for deferrable timer into the hrtimer Alexey Perevalov
2014-02-20 18:49   ` John Stultz [this message]
2014-02-20 21:18     ` Thomas Gleixner
2014-02-20 21:20       ` John Stultz
2014-02-20 21:56         ` Thomas Gleixner
2014-02-20  8:40 ` [PATCH v3 3/6] kernel/time: Add new helpers to convert ktime to/from jiffies Alexey Perevalov
2014-02-20 10:34   ` Thomas Gleixner
2014-02-20  8:40 ` [PATCH v3 4/6] timerfd: Factor out timer-type unspecific timerfd_expire() Alexey Perevalov
2014-02-20 10:52   ` Thomas Gleixner
2014-02-20 16:30     ` Alexey Perevalov
2014-02-21  4:13     ` Anton Vorontsov
2014-02-21  7:04       ` Alexey Perevalov
2014-02-21 10:41       ` Thomas Gleixner
2014-02-20  8:40 ` [PATCH v3 5/6] timerfd: Add support for deferrable timers Alexey Perevalov
2014-02-20 11:09   ` Thomas Gleixner
2014-02-21  4:11     ` Anton Vorontsov
2014-02-21 10:40       ` Thomas Gleixner
2014-02-20  8:40 ` [PATCH v3 6/6] tracing/trivial: Add CLOCK_*_DEFERRABLE for tracing clockids Alexey Perevalov
2014-02-20 11:12 ` [PATCH v3 0/6] Deferrable timers support for hrtimers/timerfd API Thomas Gleixner
2014-02-20 16:53   ` Alexey Perevalov
2014-02-20 21:21     ` Thomas Gleixner

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=53064E4A.8030105@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=a.perevalov@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton@nomsg.org \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --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