Re: [PATCH v3 4/6] timerfd: Factor out timer-type unspecific timerfd_expire()

2014-02-20 Thread Alexey Perevalov
iew. Thanks, Anton -- Best regards, Alexey Perevalov -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v3 0/6] Deferrable timers support for hrtimers/timerfd API

2014-02-20 Thread Alexey Perevalov
On 02/20/2014 03:12 PM, Thomas Gleixner wrote: On Thu, 20 Feb 2014, Alexey Perevalov wrote: Hello. This is a combo patch set for support defferability in timerfd. Due implementation of timerfd is based on hrtimers and only on hrtimers, it was necessary to add such deferrability into hrtimers

Re: [PATCH v3 4/6] timerfd: Factor out timer-type unspecific timerfd_expire()

2014-02-20 Thread Alexey Perevalov
On 02/20/2014 02:52 PM, Thomas Gleixner wrote: On Thu, 20 Feb 2014, Alexey Perevalov wrote: From: Anton Vorontsov There is nothing hrtimer-specific inside the timerfd_tmrproc(), except the function prototype. We're about to add other timer types, so factor out generic timerfd_expire() h

[PATCH v4 2/6] tracing/trivial: Add CLOCK_BOOTIME and CLOCK_TAI for human readable clockid trace

2014-02-20 Thread Alexey Perevalov
These clockids is also used in current hrtimer implementation. Signed-off-by: Alexey Perevalov --- include/trace/events/timer.h |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 185b2c6..547b79f 100644

Re: [PATCH v3 1/6] tracing/trivial: Add CLOCK_BOOTIME and CLOCK_TAI for human readable clockid trace

2014-02-20 Thread Alexey Perevalov
On 02/20/2014 03:01 PM, Thomas Gleixner wrote: On Thu, 20 Feb 2014, Alexey Perevalov wrote: These clockids is also used in current hrtimer implementation. Signed-off-by: Alexey Perevalov --- include/trace/events/timer.h |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v4 5/6] timerfd: Add support for deferrable timers

2014-02-20 Thread Alexey Perevalov
ution timers. It provides the same overrun count as for none deferrable timers. What's why it doesn't not bring any new functionality into timerfd implementation, except clockid validation. Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Perevalov --- fs/timerfd.c |7 +-- 1

[PATCH v4 4/6] timerfd: Move repeated logic into timerfd_rearm()

2014-02-20 Thread Alexey Perevalov
From: Anton Vorontsov This patch introduces timerfd_rearm(), this small helper is used to forward and restart the hrtimer. Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Perevalov --- fs/timerfd.c | 40 +++- 1 file changed, 19 insertions(+), 21

[PATCH v4 6/6] tracing/trivial: Add CLOCK_*_DEFERRABLE for tracing clockids

2014-02-20 Thread Alexey Perevalov
Signed-off-by: Alexey Perevalov --- include/trace/events/timer.h |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 547b79f..ea3119a 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events

[PATCH v4 1/6] Replace ternary operator to macro

2014-02-20 Thread Alexey Perevalov
For extensibility purpose it's better to have _switch_ type mechanism for representing human readable CLOCKID* and HRMODE. Signed-off-by: Alexey Perevalov --- include/trace/events/timer.h | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/include/

[PATCH v4 0/6] Deferrable timers support for hrtimers/timerfd API

2014-02-20 Thread Alexey Perevalov
nside hrtimers makes timerfd implemenation trivial for such case. It's based on github.com/torvalds/linux.git git repository on top of e95003c3f9ccbfa7ab9d265e6eb703ee2fa4cfe7 Alexey Perevalov (3): Replace ternary operator to macro tracing/trivial: Add CLOCK_BOOTIME and CLOCK_TAI for huma

[PATCH v4 3/6] hrtimer: Add support for deferrable timer into the hrtimer

2014-02-20 Thread Alexey Perevalov
resolution timer now could work with CLOCK_REALTIME_DEFERRABLE, CLOCK_MONOTONIC_DEFERRABLE, CLOCK_BOOTTIME_DEFERRABLE. Signed-off-by: Thomas Gleixner Signed-off-by: Alexey Perevalov --- include/linux/hrtimer.h |3 +++ include/uapi/linux/time.h |3 +++ kernel/hrtimer.c | 62

[PATCH v3 5/6] timerfd: Add support for deferrable timers

2014-02-20 Thread Alexey Perevalov
h-res external timers, since the deferred timer is tied to the system load, not just to some external decrementer source. Currently, the implementation is based on high resolution timers. Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Perevalov --- fs/timerfd.c |9 ++--- 1 file chang

[PATCH v3 3/6] kernel/time: Add new helpers to convert ktime to/from jiffies

2014-02-20 Thread Alexey Perevalov
clude jiffies.h after we defined ktime_t, this is because ktime.h needs some declarations from jiffies.h (e.g. TICK_NSEC). Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Perevalov --- include/linux/jiffies.h |4 +++- include/linux/ktime.h |3 ++- kernel/time.c |

[PATCH v3 6/6] tracing/trivial: Add CLOCK_*_DEFERRABLE for tracing clockids

2014-02-20 Thread Alexey Perevalov
Signed-off-by: Alexey Perevalov --- include/trace/events/timer.h |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 547b79f..ea3119a 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events

[PATCH v3 2/6] hrtimer: Add support for deferrable timer into the hrtimer

2014-02-20 Thread Alexey Perevalov
resolution timer now could work with CLOCK_REALTIME_DEFERRABLE, CLOCK_MONOTONIC_DEFERRABLE, CLOCK_BOOTTIME_DEFERRABLE. Signed-off-by: Thomas Gleixner Signed-off-by: Alexey Perevalov --- include/linux/hrtimer.h |3 +++ include/uapi/linux/time.h |3 +++ kernel/hrtimer.c | 62

[PATCH v3 1/6] tracing/trivial: Add CLOCK_BOOTIME and CLOCK_TAI for human readable clockid trace

2014-02-20 Thread Alexey Perevalov
These clockids is also used in current hrtimer implementation. Signed-off-by: Alexey Perevalov --- include/trace/events/timer.h |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 185b2c6..547b79f 100644

[PATCH v3 0/6] Deferrable timers support for hrtimers/timerfd API

2014-02-20 Thread Alexey Perevalov
d for in-kernel users who want to use hrtimer advantages. Alexey Perevalov (2): tracing/trivial: Add CLOCK_BOOTIME and CLOCK_TAI for human readable clockid trace tracing/trivial: Add CLOCK_*_DEFERRABLE for tracing clockids Anton Vorontsov (3): kernel/time: Add new helpers to convert kti

[PATCH v3 4/6] timerfd: Factor out timer-type unspecific timerfd_expire()

2014-02-20 Thread Alexey Perevalov
From: Anton Vorontsov There is nothing hrtimer-specific inside the timerfd_tmrproc(), except the function prototype. We're about to add other timer types, so factor out generic timerfd_expire() helper from timerfd_tmrproc(). Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Pere

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-02-18 Thread Alexey Perevalov
On 02/19/2014 02:33 AM, Thomas Gleixner wrote: On Tue, 18 Feb 2014, Alexey Perevalov wrote: On 02/16/2014 07:39 PM, Thomas Gleixner wrote: I figured out with deviation, I described before. Which is wrong to begin with. Using the wrong method does not justify the results. Are you actually

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-02-18 Thread Alexey Perevalov
On 02/16/2014 07:39 PM, Thomas Gleixner wrote: On Sun, 16 Feb 2014, Alexey Perevalov wrote: As I understand main idea in hrtimer.c was do not decrement expires_next in case of DEFERRABLE timers type. Such small average delay could be explained: it's due higher resolution, and cpu is not in

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-02-17 Thread Alexey Perevalov
On 02/16/2014 07:39 PM, Thomas Gleixner wrote: On Sun, 16 Feb 2014, Alexey Perevalov wrote: As I understand main idea in hrtimer.c was do not decrement expires_next in case of DEFERRABLE timers type. Such small average delay could be explained: it's due higher resolution, and cpu is not in

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-02-16 Thread Alexey Perevalov
On 02/07/2014 12:50 AM, Thomas Gleixner wrote: On Thu, 6 Feb 2014, Alexey Perevalov wrote: On 02/06/2014 02:16 AM, Thomas Gleixner wrote: As I truly understand, you decided - flags is better than new clockids, and internals of timerfd could be a mix of timer_list and hrtimer. NO, NO, NO, NO

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-02-07 Thread Alexey Perevalov
On 02/07/2014 12:50 AM, Thomas Gleixner wrote: On Thu, 6 Feb 2014, Alexey Perevalov wrote: On 02/06/2014 02:16 AM, Thomas Gleixner wrote: As I truly understand, you decided - flags is better than new clockids, and internals of timerfd could be a mix of timer_list and hrtimer. NO, NO, NO, NO

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-02-06 Thread Alexey Perevalov
On 02/06/2014 02:16 AM, Thomas Gleixner wrote: On Wed, 5 Feb 2014, John Stultz wrote: On 02/05/2014 01:41 PM, Thomas Gleixner wrote: On Wed, 5 Feb 2014, Alexey Perevalov wrote: On 02/04/2014 08:10 PM, Thomas Gleixner wrote: On Mon, 27 Jan 2014, Alexey Perevalov wrote: On 01/21/2014 11:12 PM

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-02-04 Thread Alexey Perevalov
On 02/04/2014 08:10 PM, Thomas Gleixner wrote: On Mon, 27 Jan 2014, Alexey Perevalov wrote: On 01/21/2014 11:12 PM, John Stultz wrote: Thomas: Any thought here? Should we be trying to unify the timerfd flags and the posix timer flags (specifically things like TIMER_CANCEL_ON_SET, which is

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-02-02 Thread Alexey Perevalov
Dear John, hello could we figure out without Thomas advice? Maybe it worth to propose timerfd and posix timer flag unification patch? On 01/21/2014 11:12 PM, John Stultz wrote: On 01/13/2014 02:43 AM, Alexey Perevalov wrote: Hello dear community. This is reworked patch set of original

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-01-26 Thread Alexey Perevalov
Dear Thomas, could you please comment John's question (see bellow) regarding flags. On 01/21/2014 11:12 PM, John Stultz wrote: On 01/13/2014 02:43 AM, Alexey Perevalov wrote: Hello dear community. This is reworked patch set of original Anton's Vorontsov proposal regarding unified

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-01-13 Thread Alexey Perevalov
On 01/13/2014 09:36 PM, Andi Kleen wrote: Alexey Perevalov writes: Hello all, one remark - timerfd is not documented in linux Documentation directory at all. I think it's better to have such description. The documentation is the manpage in man-pages. Ideally you change would come wit

Re: [PATCH v2 0/3] Deferrable timers support for timerfd API

2014-01-13 Thread Alexey Perevalov
Hello all, one remark - timerfd is not documented in linux Documentation directory at all. I think it's better to have such description. On 01/13/2014 02:43 PM, Alexey Perevalov wrote: Hello dear community. This is reworked patch set of original Anton's Vorontsov proposal

[PATCH v2 2/3] timerfd: Factor out timer-type unspecific timerfd_expire()

2014-01-13 Thread Alexey Perevalov
From: Anton Vorontsov There is nothing hrtimer-specific inside the timerfd_tmrproc(), except the function prototype. We're about to add other timer types, so factor out generic timerfd_expire() helper from timerfd_tmrproc(). Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Pere

[PATCH v2 0/3] Deferrable timers support for timerfd API

2014-01-13 Thread Alexey Perevalov
Hello dear community. This is reworked patch set of original Anton's Vorontsov proposal regarding unified deferrable timers in the user space. http://lwn.net/Articles/514707/ I decided to resubmit it due we found it usefull for us too. timerfd was modified since Anton's commit, Alarm support wa

[PATCH v2 1/3] kernel/time: Add new helpers to convert ktime to/from jiffies

2014-01-13 Thread Alexey Perevalov
clude jiffies.h after we defined ktime_t, this is because ktime.h needs some declarations from jiffies.h (e.g. TICK_NSEC). Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Perevalov --- include/linux/jiffies.h |4 +++- include/linux/ktime.h |3 ++- kernel/time.c |

[PATCH v2 3/3] timerfd: Add support for deferrable timers

2014-01-13 Thread Alexey Perevalov
e can implement longer timeouts by rearming the timer, although it probably wouldn't make much sense in real world, so we keep it simple and just return E2BIG if we don't like the interval. Signed-off-by: Alexey Perevalov --- fs/timerfd.c

Re: [PATCH 0/3] Deferrable timers support for timerfd API

2014-01-12 Thread Alexey Perevalov
On 01/10/2014 12:32 AM, John Stultz wrote: On Sun, Jan 5, 2014 at 11:33 AM, Alexey Perevalov wrote: On 01/04/2014 04:18 AM, John Stultz wrote: So while the alarm timers are a reasonable precedent, I think they were introduced prior to the timerfd interface, so it seemed at the time having new

Re: [PATCH 0/3] Deferrable timers support for timerfd API

2014-01-05 Thread Alexey Perevalov
On 01/04/2014 04:18 AM, John Stultz wrote: On 01/03/2014 09:45 AM, Alexey Perevalov wrote: On 01/03/2014 03:17 AM, John Stultz wrote: On 01/02/2014 10:30 AM, Alexey Perevalov wrote: This version introduces new clockid (CLOCK_DEFERRABLE) , for timerfd_create, instead of new flag

Re: [PATCH 0/3] Deferrable timers support for timerfd API

2014-01-03 Thread Alexey Perevalov
On 01/03/2014 03:17 AM, John Stultz wrote: On 01/02/2014 10:30 AM, Alexey Perevalov wrote: This version introduces new clockid (CLOCK_DEFERRABLE) , for timerfd_create, instead of new flag (TFD_TIMER_DEFERRABLE) for timerfd_settime introduced in previous version. So why did you make this

[PATCH 3/3] timerfd: Add support for deferrable timers

2014-01-02 Thread Alexey Perevalov
e can implement longer timeouts by rearming the timer, although it probably wouldn't make much sense in real world, so we keep it simple and just return E2BIG if we don't like the interval. Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Perevalov --- fs/timerfd.c

[PATCH 2/3] timerfd: Factor out timer-type unspecific timerfd_expire()

2014-01-02 Thread Alexey Perevalov
From: Anton Vorontsov There is nothing hrtimer-specific inside the timerfd_tmrproc(), except the function prototype. We're about to add other timer types, so factor out generic timerfd_expire() helper from timerfd_tmrproc(). Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Pere

[PATCH 1/3] kernel/time: Add new helpers to convert ktime to/from jiffies

2014-01-02 Thread Alexey Perevalov
clude jiffies.h after we defined ktime_t, this is because ktime.h needs some declarations from jiffies.h (e.g. TICK_NSEC). Signed-off-by: Anton Vorontsov Signed-off-by: Alexey Perevalov --- include/linux/jiffies.h |4 +++- include/linux/ktime.h |3 ++- kernel/time.c |

[PATCH 0/3] Deferrable timers support for timerfd API

2014-01-02 Thread Alexey Perevalov
Hello dear community. This is reworked patch set of original Anton's Vorontsov proposal regarding unified deferrable timers in user space. http://lwn.net/Articles/514707/ I decided to resubmit it due we found it usefull for us too. timerfd was modified since Anton's commit, Alarm support was ad