[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrUFsHPrzm-B=9fJac_-3b+sihWmW2sev23B4zXSh2PBqQ@mail.gmail.com>
Date: Tue, 11 Dec 2012 11:37:59 -0800
From: Andy Lutomirski <luto@...capital.net>
To: John Stultz <john.stultz@...aro.org>
Cc: stefani@...bold.net, linux-kernel@...r.kernel.org,
ak@...ux.intel.com, aarcange@...hat.com
Subject: Re: [PATCH] Add VDSO time function support for x86 32-bit kernel
On Tue, Dec 11, 2012 at 11:27 AM, John Stultz <john.stultz@...aro.org> wrote:
> On 12/11/2012 08:11 AM, stefani@...bold.net wrote:
>>
>> From: Stefani Seibold <stefani@...bold.net>
>>
>> This small patch add the functions vdso_gettimeofday(),
>> vdso_clock_gettime()
>> and vdso_time() support to the VDSO for x86 32-bit kernels.
>>
>> The reason to do this was to get a fast reliable time stamp. Many
>> developers
>> uses TSC to get a fast time time stamp, without knowing the pitfalls. VDSO
>> time functions a fast and reliable way, because the kernel knows the best
>> time
>> source and the P- and C-state of the CPU.
>
> Very cool. There have been similar implementations of this patch over the
> years, but they were all bit more hackish then this.
>
>
>
>> For x86 the vclock_gettime.c currently supports only the HPET and TSC
>> timer,
>> the ACPI timer should be easily to add with an other patch.
>
> Although the ACPI PM timer requires port-io which would need tweaking to
> allow normal users to access it. And I'm not sure if the performance would
> be much improved, as the port-io probably dominates the performance cost.
>
I'd actually advocate going the other way and removing hpet vdso
support. Last time I benchmarked this, a syscall took about 20ns on
my box, and reading the hpet counter took about 750ns, giving
approximately no gain to the hpet-via-vdso optimization.
--Andy
--
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