Re: [PATCH 4/5] select: make select() use schedule_hrtimeout()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Friday, August 29, 2008 - 9:20 am

On Fri, 29 Aug 2008, Arjan van de Ven wrote:

This is _really_ ugly.

Can't you just do this relaxation in "schedule_hrtimeout()" instead, and 
just document the fact that the "high resolution" of hrtimeout is relative 
to the length of the timeout.

It's not that select() doesn't care, it's that *NOBODY* cares. If somebody 
asks for a timeout of one second and 2 microseconds, the two microseconds 
simply don't matter. Ever. But if somebody asks for a timeout of 12 
microseconds, individual microseconds probably _do_ matter.

So if you want high-resolution select/poll, then get rid of the "use_hr" 
logic entirely, and just do it unconditionally. Then, relax the scheduler 
timeouts in the scheduler.

(But, that's probably _generally_ true. Even now, when people do 
"schedule_timeout()", there's a big difference between asking for two 
ticks and asking for two seconds. The latter should probably try to round 
to a nice timer tick basis for power reasons).

		Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/5] select: add a timespec version of the timeout ..., Arjan van de Ven, (Fri Aug 29, 8:06 am)
[PATCH 3/5] select: introduce a schedule_hrtimeout() function, Arjan van de Ven, (Fri Aug 29, 8:07 am)
[PATCH 4/5] select: make select() use schedule_hrtimeout(), Arjan van de Ven, (Fri Aug 29, 8:08 am)
Re: [PATCH 4/5] select: make select() use schedule_hrtimeout(), Linus Torvalds, (Fri Aug 29, 9:20 am)
Re: [PATCH 4/5] select: make select() use schedule_hrtimeout(), Arjan van de Ven, (Fri Aug 29, 10:42 am)