[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200608090445.16413.ak@suse.de>
Date: Wed, 9 Aug 2006 04:45:16 +0200
From: Andi Kleen <ak@...e.de>
To: john stultz <johnstul@...ibm.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH 6/6] x86_64: GENERIC_TIME based vsyscall code
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
-
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