From: Andi Kleen <ak@suse.de>
To: john stultz <johnstul@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 6/6] x86_64: GENERIC_TIME based vsyscall code
Date: Wed, 9 Aug 2006 04:45:16 +0200 [thread overview]
Message-ID: <200608090445.16413.ak@suse.de> (raw)
In-Reply-To: <20060809021746.23103.1842.sendpatchset@cog.beaverton.ibm.com>
On Wednesday 09 August 2006 04:17, john stultz wrote:
> + cycle_t ret;
> + rdtscll(ret);
_sync
> +static cycle_t __vsyscall_fn vread_hpet(void)
> +{
> + return (cycle_t)readl((void *)fix_to_virt(VSYSCALL_HPET) + 0xf0);
> +}
64bit HPET?
> +extern struct vsyscall_gtod_data_t vsyscall_gtod_data;
No extern in .c please
> +static __always_inline int syscall_gtod(struct timeval *tv, struct timezone *tz)
> +{
> + int ret;
> +
> + asm volatile("syscall"
You eliminated the patching away of the syscall opcode? Please retain that.
> - tv->tv_sec = sec + usec / 1000000;
> - tv->tv_usec = usec % 1000000;
> + now = __vsyscall_gtod_data.clock.vread();
> +
> + base = __vsyscall_gtod_data.clock.cycle_last;
> + mask = __vsyscall_gtod_data.clock.mask;
> + mult = __vsyscall_gtod_data.clock.mult;
> + shift = __vsyscall_gtod_data.clock.shift;
> +
> + *tv = __vsyscall_gtod_data.wall_time_tv;
> +
> + } while (read_seqretry(&__vsyscall_gtod_data.lock, seq));
Do you have benchmarks on performance compared to the old code?
-Andi
next prev parent reply other threads:[~2006-08-09 2:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-09 2:17 [RFC][PATCH 0/6] x86_64: Generic timekeeping for x86_64 john stultz
2006-08-09 2:17 ` [RFC][PATCH 1/6] x86_64: Enable arch-generic vsyscall support john stultz
2006-08-09 2:29 ` Andi Kleen
2006-08-09 2:56 ` john stultz
2006-08-09 2:59 ` Andi Kleen
2006-08-09 2:17 ` [RFC][PATCH 2/6] x86_64: hpet_address cleanup john stultz
2006-08-09 2:31 ` Andi Kleen
2006-08-09 3:08 ` john stultz
2006-08-09 2:17 ` [RFC][PATCH 3/6] x86_64: Remove apic_runs_main_timer john stultz
2006-08-09 2:31 ` Andi Kleen
2006-08-09 2:17 ` [RFC][PATCH 4/6] x86_64: Enable CONFIG_GENERIC_TIME john stultz
2006-08-09 2:17 ` [RFC][PATCH 5/6] x86_64: Clocksources for x86-64 john stultz
2006-08-09 2:41 ` Andi Kleen
2006-08-09 3:41 ` john stultz
2006-08-09 2:17 ` [RFC][PATCH 6/6] x86_64: GENERIC_TIME based vsyscall code john stultz
2006-08-09 2:45 ` Andi Kleen [this message]
2006-08-09 2:41 ` [RFC][PATCH 0/6] x86_64: Generic timekeeping for x86_64 Andi Kleen
2006-08-09 2:48 ` john stultz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200608090445.16413.ak@suse.de \
--to=ak@suse.de \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox