Valdis.Kletnieks@vt.edu writes:Try this patch: Remove unlikelies in vsyscall path Remove unlikely in vsyscall path that conflict with unlikely profiling. The unlikelies shouldn't be needed anyways because gcc predicts condition leading to early return as unlikely by default and for the loops it shouldn't make much difference Signed-off-by: Andi Kleen <ak@suse.de> Index: linux/arch/x86/kernel/vsyscall_64.c =================================================================== --- linux.orig/arch/x86/kernel/vsyscall_64.c +++ linux/arch/x86/kernel/vsyscall_64.c @@ -128,7 +128,7 @@ static __always_inline void do_vgettimeo seq = read_seqbegin(&__vsyscall_gtod_data.lock); vread = __vsyscall_gtod_data.clock.vread; - if (unlikely(!__vsyscall_gtod_data.sysctl_enabled || !vread)) { + if (!__vsyscall_gtod_data.sysctl_enabled || !vread) { gettimeofday(tv,NULL); return; } @@ -169,7 +169,7 @@ time_t __vsyscall(1) vtime(time_t *t) { struct timeval tv; time_t result; - if (unlikely(!__vsyscall_gtod_data.sysctl_enabled)) + if (!__vsyscall_gtod_data.sysctl_enabled) return time_syscall(t); vgettimeofday(&tv, NULL); Index: linux/arch/x86/vdso/vclock_gettime.c =================================================================== --- linux.orig/arch/x86/vdso/vclock_gettime.c +++ linux/arch/x86/vdso/vclock_gettime.c @@ -48,7 +48,7 @@ static noinline int do_realtime(struct t ts->tv_sec = gtod->wall_time_sec; ts->tv_nsec = gtod->wall_time_nsec; ns = vgetns(); - } while (unlikely(read_seqretry(>od->lock, seq))); + } while (read_seqretry(>od->lock, seq)); timespec_add_ns(ts, ns); return 0; } @@ -77,7 +77,7 @@ static noinline int do_monotonic(struct ns = gtod->wall_time_nsec + vgetns(); secs += gtod->wall_to_monotonic.tv_sec; ns += gtod->wall_to_monotonic.tv_nsec; - } while (unlikely(read_seqretry(>od->lock, seq))); + } while (read_seqretry(>od->lock, seq)); vset_normalized_timespec(ts, secs, ns); return 0; } @@ -105,7 +105,7 @@ int __vdso_gettimeofday(struct timeval * sizeof(*tv) != sizeof(struct timespec)); do_realtime((struct timespec *)tv); tv->tv_usec /= 1000; - if (unlikely(tz != NULL)) { + if (tz != NULL) { /* This relies on gcc inlining the memcpy. We'll notice if it ever fails to do so. */ memcpy(tz, >od->sys_tz, sizeof(struct timezone)); --
| Greg KH | Og dreams of kernels |
| Jens Axboe | [PATCH 31/33] Fusion: sg chaining support |
| Arnd Bergmann | Re: finding your own dead "CONFIG_" variables |
| Mark Brown | [PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset |
| Tony Breeds | [LGUEST] Look in object dir for .config |
git: | |
| Brian Downing | Re: Git in a Nutshell guide |
| John Benes | Re: master has some toys |
| Matthias Lederhofer | [PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree |
| Alexander Sulfrian | [RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set |
| Junio C Hamano | Re: Rss produced by git is not valid xml? |
| Linux Kernel Mailing List | iSeries: fix section mismatch in iseries_veth |
| Linux Kernel Mailing List | ixbge: remove TX lock and redo TX accounting. |
| Linux Kernel Mailing List | ixgbe: fix several counter register errata |
