lkml.org 
[lkml]   [2006]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC][PATCH 6/6] x86_64: GENERIC_TIME based vsyscall code
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-09 04:49    [W:0.075 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site