login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
November
»
15
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Richard Cochran
Subject:
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
Date: Monday, November 15, 2010 - 2:41 am
On Tue, Nov 09, 2010 at 01:10:58PM -0800, john stultz wrote:
quoted text
> On Tue, 2010-11-09 at 09:23 +0100, Richard Cochran wrote: > > On Mon, Nov 08, 2010 at 03:37:03PM -0800, john stultz wrote: > > > So sort of minor nit here, but is there a reason the clockfd > > > implementation is primary here and the standard posix implementation > > > gets pushed off into its own function rather then doing something like: > > > > > > clk = clockid_to_clock_device(id) > > > if(clk) > > > return clockdev_clock_gettime(clk, user_ts); > > > [existing sys_clock_gettime()] > > > > > > As you implemented it, it seems to expect the clockdevice method to be > > > the most frequent use case, where as its likely to be the inverse. So > > > folks looking into the more common CLOCK_REALTIME calls have to traverse > > > more code then the likely more rare clockfd cases. > > > > Actually, what I would like to do is refactor the exisiting posix > > clock code to use the new framework. The idea is to have a set of > > static global clock_device*, one per fixed clock. The function > > clockid_to_clock_device() will include a lookup table, like this: > > > > static clock_device *realtime_clock, *monotinic_clock; > > > > switch (id) { > > case CLOCK_REALTIME: > > return realtime_clock; > > case CLOCK_MONOTONIC: > > return monotinic_clock; > > /* and so on ... */ > > } > > This seems a little over-reaching. I'm not sure I see what benefit would > come from having clock_devices for the static clock_ids? The extra mutex > locking and status/null checking for the clock_device would would just > add unnecessary overhead to the performance critical clock_gettime call.
Okay, next time I'll leave the syscall in posix-timers.c and call out to the clock_device in the unlikely dynamic case. Thanks, Richard --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH RFC 0/8] Dynamic clock devices
, Richard Cochran
, (Thu Nov 4, 12:26 pm)
[PATCH RFC 1/8] Introduce dynamic clock devices
, Richard Cochran
, (Thu Nov 4, 12:28 pm)
[PATCH RFC 2/8] clock device: convert clock_gettime
, Richard Cochran
, (Thu Nov 4, 12:28 pm)
[PATCH RFC 3/8] clock device: convert clock_getres
, Richard Cochran
, (Thu Nov 4, 12:28 pm)
[PATCH RFC 4/8] clock device: convert clock_settime
, Richard Cochran
, (Thu Nov 4, 12:29 pm)
[PATCH RFC 5/8] clock device: convert timer_create
, Richard Cochran
, (Thu Nov 4, 12:29 pm)
[PATCH RFC 6/8] clock device: convert timer_delete
, Richard Cochran
, (Thu Nov 4, 12:30 pm)
[PATCH RFC 7/8] clock device: convert timer_gettime
, Richard Cochran
, (Thu Nov 4, 12:30 pm)
[PATCH RFC 8/8] clock device: convert timer_settime
, Richard Cochran
, (Thu Nov 4, 12:30 pm)
Re: [PATCH RFC 1/8] Introduce dynamic clock devices
, Arnd Bergmann
, (Sun Nov 7, 11:38 pm)
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
, Arnd Bergmann
, (Sun Nov 7, 11:56 pm)
Re: [PATCH RFC 0/8] Dynamic clock devices
, john stultz
, (Mon Nov 8, 4:01 pm)
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
, john stultz
, (Mon Nov 8, 4:37 pm)
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
, Richard Cochran
, (Tue Nov 9, 1:23 am)
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
, Richard Cochran
, (Tue Nov 9, 3:26 am)
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
, Arnd Bergmann
, (Tue Nov 9, 5:47 am)
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
, john stultz
, (Tue Nov 9, 2:10 pm)
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
, john stultz
, (Tue Nov 9, 2:37 pm)
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
, Arnd Bergmann
, (Wed Nov 10, 3:16 am)
Re: [PATCH RFC 0/8] Dynamic clock devices
, Richard Cochran
, (Mon Nov 15, 2:34 am)
Re: [PATCH RFC 2/8] clock device: convert clock_gettime
, Richard Cochran
, (Mon Nov 15, 2:41 am)
Re: [PATCH RFC 0/8] Dynamic clock devices
, Paul Mundt
, (Mon Nov 15, 3:01 am)
Re: [PATCH RFC 0/8] Dynamic clock devices
, Richard Cochran
, (Thu Nov 18, 9:33 am)
Re: [PATCH RFC 1/8] Introduce dynamic clock devices
, Richard Cochran
, (Sat Dec 4, 7:55 am)
Re: [PATCH RFC 1/8] Introduce dynamic clock devices
, Arnd Bergmann
, (Mon Dec 6, 7:14 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-