Project

General

Profile

Actions

Bug #14789

open

DDI should be more hrtime friendly

Added by Patrick Mooney about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Existing interfaces in the DDI for dealing with time (timeout(), qtimeout(), and delay()) all operate on the notion of lbolt/hz, rather than hrtime. It would be nice to have Committed analogs to those in the DDI which operate on hrtime instead.


Related issues

Related to illumos gate - Bug #14783: pvscsi modernizationClosedGarrett D'Amore

Actions
Actions #1

Updated by Patrick Mooney about 1 month ago

  • Related to Bug #14783: pvscsi modernization added
Actions #2

Updated by Joshua M. Clulow about 1 month ago

It would probably be good to expose something like cv_timedwait_sig_hrtime() as well. Also, I think it would be neat to have deadline-centric versions -- e.g., delay_until(hrtime) and maybe call_when(func, arg, hrtime) -- as well as the relative delay/timeout stuff we have now.

Actions #3

Updated by Garrett D'Amore about 1 month ago

Instead of delay_until, how about "nanosleep". or even just "sleep".

I hate timedwait as a name.

cv_wait_until() and cv_wait_until_sig() would be my choices for better names.

For timeout() and qtimeout() - how about hrtimeout() and hrqtimeout(). These can still use timeout_id_t so we can keep the untimeout as is.

Actions #4

Updated by Garrett D'Amore about 1 month ago

Clearly using hrtime_t makes using absolute times a lot easier.

Actions

Also available in: Atom PDF