linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Perevalov <a.perevalov@samsung.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	John Stultz <john.stultz@linaro.org>
Cc: linux-kernel@vger.kernel.org, anton@enomsg.org,
	kyungmin.park@samsung.com, akpm@linux-foundation.org,
	cw00.choi@samsung.com
Subject: Re: [PATCH v2 0/3] Deferrable timers support for timerfd API
Date: Thu, 06 Feb 2014 21:38:45 +0400	[thread overview]
Message-ID: <52F3C8A5.708@samsung.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1402052306580.24986@ionos.tec.linutronix.de>

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, 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 currently timerfd-only)?  Should a deferrable flag be added to
>>>>>>> the hrtimer core or left to the timer wheel?
>>>>> The timer cancel on set was added only to timerfd because timerfd is a
>>>>> non posix interface and we are halfways free to add stuff to
>>>>> it. Adding extra flags to the real posix timer interfaces is a
>>>>> different story.
>>>> And what about "deferrable" possibility for hrtimers, do you consider it
>>>> reasonable?
>>> In principle, I have no objections, but we need a proper technical
>>> solution. Just adding a flag and keeping the timers in the same rbtree
>>> like we do for the timer wheel timers is not going to happen.
>>>
>>> The only feasible solution is to have separate clock ids,
>>> e.g. CLOCK_*_DEFERRABLE, which would enable the deferrable
>>> functionality for all user space interfaces. No need for magic flags
>>> and complex search for non deferrable timers.
>> So of course, I was actually arguing against having a new clockid (which
>> was Alexey's first approach).
> Mooo.
>   
>> My reasoning was that the deferrablity isn't a clock domain, and is more
>> of a modifier. Thus to keep the interfaces somewhat sane (and avoiding
>> having to add N new clockids for each new modifier), we should utilize
>> the flag arguments to timers. So instead of just having TIMER_ABSTIME,
>> we could add TIMER_DEFER, etc, which we could utilize instead.
> I can see the point. I have no objections against that approach as
> long as we map that against separate internal bases.
>   
>> Internally we can still keep separate bases, much as your patch does, to
>> keep the next-event searching overhead more limited.
> It's not only more limited, it's bound.
>   
>> I mainly wanted to get your thoughts on extending the flags, and doing
>> so in a consistent manner between the timerfd and other timer interfaces.
> So the only interface which does not support that is sys_nanosleep()
> but that's not really an issue. sys_nanosleep() should die anyway :)
>
>> Of course, all this is after I added the _ALARM clockids... so you can
>> decide if its hypocrisy or experience.
>> (The "old wisdom comes from experience and experience comes from bad
>> decisions" bit ;).
> Well, you have a valid point about the clock ids. I did not realize in
> the first place that we can avoid that business if we use the flags to
> select the internal representation.
>
> Either way is preferred over reintroducing the timer wheel mess....
>
> Thanks,
>
> 	tglx
>

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.
If so, it's in v2 patch set.

-- 
Best regards,
Alexey Perevalov

  reply	other threads:[~2014-02-06 17:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 10:43 [PATCH v2 0/3] Deferrable timers support for timerfd API Alexey Perevalov
2014-01-13 10:43 ` [PATCH v2 1/3] kernel/time: Add new helpers to convert ktime to/from jiffies Alexey Perevalov
2014-01-14  0:15   ` Chanwoo Choi
2014-01-13 10:43 ` [PATCH v2 2/3] timerfd: Factor out timer-type unspecific timerfd_expire() Alexey Perevalov
2014-01-13 10:43 ` [PATCH v2 3/3] timerfd: Add support for deferrable timers Alexey Perevalov
2014-01-13 15:30 ` [PATCH v2 0/3] Deferrable timers support for timerfd API Alexey Perevalov
2014-01-13 17:36   ` Andi Kleen
2014-01-14  6:44     ` Alexey Perevalov
2014-01-21 19:12 ` John Stultz
2014-01-27  7:12   ` Alexey Perevalov
2014-02-04 16:10     ` Thomas Gleixner
2014-02-05  6:43       ` Alexey Perevalov
2014-02-05 21:41         ` Thomas Gleixner
2014-02-05 22:02           ` John Stultz
2014-02-05 22:16             ` Thomas Gleixner
2014-02-06 17:38               ` Alexey Perevalov [this message]
2014-02-06 17:47                 ` John Stultz
2014-02-06 20:50                 ` Thomas Gleixner
2014-02-07 17:41                   ` Alexey Perevalov
2014-02-16 15:20                   ` Alexey Perevalov
2014-02-16 15:39                     ` Thomas Gleixner
2014-02-17 14:15                       ` Alexey Perevalov
2014-02-18 19:43                         ` Thomas Gleixner
2014-02-18 19:48                       ` Alexey Perevalov
2014-02-18 22:33                         ` Thomas Gleixner
2014-02-19  7:08                           ` Alexey Perevalov
2014-02-03  6:54   ` Alexey Perevalov
2014-02-03 23:58     ` John Stultz

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=52F3C8A5.708@samsung.com \
    --to=a.perevalov@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton@enomsg.org \
    --cc=cw00.choi@samsung.com \
    --cc=john.stultz@linaro.org \
    --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;
as well as URLs for NNTP newsgroup(s).