[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1274886299.1759.8.camel@work-vm>
Date: Wed, 26 May 2010 08:04:59 -0700
From: john stultz <johnstul@...ibm.com>
To: Brian Bloniarz <bmb@...enacr.com>
Cc: "H. Peter Anvin" <hpa@...or.com>,
Dan Magenheimer <dan.magenheimer@...cle.com>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Andi Kleen <andi@...stfloor.org>,
Arjan van de Ven <arjan@...radead.org>,
Venkatesh Pallipadi <venki@...gle.com>, chris.mason@...cle.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: Export tsc related information in sysfs
On Tue, 2010-05-25 at 22:50 -0400, Brian Bloniarz wrote:
> john stultz wrote:
> > On Tue, 2010-05-25 at 20:16 -0400, Brian Bloniarz wrote:
> >> On 05/24/2010 09:33 PM, Brian Bloniarz wrote:
> >>> So what's wrong with just adding a
> >>> /sys/devices/system/clocksource/clocksource0/tsc_khz?
> >> As an RFC:
> >>
> >> Add clocksource.sys_register & sys_unregister so the
> >> current clocksource can add supplemental information to
> >> /sys/devices/system/clocksource/clocksource0/
> >>
> >> Export tsc_khz when current_clocksource==tsc so that
> >> daemons like NTP can account for the variability of
> >> calibration results.
> >
> > I think this is a bad idea, as it creates an ABI that is arch AND
> > machine specific, which will cause portability problems in applications
> > that expect the interface to be there.
>
> It's an arch-independent ABI that returns ENOENT on
> unsupported platforms ;)
Right but having applications add "Linux on x86 where the TSC is being
used" logic is pretty poor solution. Its an issue that should be
addressed from the kernel side.
And really, if apps really wanted this info, they can fish it out
of /proc/cpuinfo.
> Could you please explain what you envision as an
> arch-independent solution to this problem?
> I guess the tsc_long_calibration=1 alternative is
> one.
...and the tsc_khz= patch I posted earlier.
thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists