Re: [PATCH] Add schedule_timeout_{interruptible,uninterruptible}{,_msecs}() interfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23.07.2005 [15:04:44 +0200], Roman Zippel wrote:
> Hi,
> 
> On Sat, 23 Jul 2005, Arjan van de Ven wrote:
> 
> > > > > What's wrong with using jiffies? 
> > > > 
> > > > A lot of the (driver) users want a wallclock based timeout. For that,
> > > > miliseconds is a more obvious API with less chance to get the jiffies/HZ
> > > > conversion wrong by the driver writer.
> > > 
> > > We have helper functions for that.
> > 
> > I think we just disagree then... I consider this one a helper function
> > as well, one with a simpler API that wraps the more complex and powerful
> > api.
> 
> How is it more powerful? The next step in introducing such API is that 
> people start complaining, they don't get ms precision, which of course is 
> fixed by the next patch, with then results in that the whole timer system 
> becomes more complex for a few misguided users.

Do people complain about not getting jiffy precision? I think the whole
idea of discussing precision in this particular sleeping path is
ludicrous. Some users of this are requesting up to 100s of millisecond
delays!

And, please, don't confuse this patch with my other work. The soft-timer
rework was an RFC, meaning I was hoping to start a discussion and get
some comments. I got comments from you and others, which I greatly
appreciate. But, I think you interpret that patch as being a final
version, which is ready for mainline. It very explicitly is not. I am
intent on dealing with your issues (perhaps moving to usecs...), but
this patch has nothing to do with that. It has everything to do with my
experience replacing caller after caller of schedule_timeout() and a
request from Andrew for a compact interface (the milliseconds were
admittedly my idea, but he hasn't said no to that yet :) ).

> Keep the thing as simple as possible and jiffies _are_ simple. Please show 
> me the problem, that needs to be fixed.

I am not sure why jiffies are any simpler than milliseconds. In the
millisecond case, conversion happens in common code and only needs to be
audited once. In the jiffies case, I have to check *every* caller to see
if they are doing stupid math :)

Thanks,
Nish
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux