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
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Linus Torvalds
Linux 2.6.34-rc4
Colin Cross
[PATCH 12/21] ARM: tegra: Add suspend and hotplug support
Chuck Ebbert
Re: PCI: Unable to reserve mem region problem
git
:
Fredrik Kuivinen
Re: fatal: unable to create '.git/index': File exists
Wink Saville
How-to combine several separate git repos?
Emily Ren
How to pull remote branch with specified commit id?
Denis Bueno
Git clone error
pradeep singh
git-update-server-info may be required,cannot clone and pull from a remote reposit...
linux-netdev
:
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Timo Teräs
ip xfrm policy semantics
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
Michael S. Tsirkin
[PATCH 3/3] vhost: fix get_user_pages_fast error handling
Jeff Garzik
Re: [0/3] POHMELFS high performance network filesystem. First steps in parallel pr...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
frantisek holop
Re: splassert: vwakeup: and friends
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
powerpc/fsl_msi: enable msi allocation in all banks
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Colocation donated by:
Syndicate