Re: [PATCH resend5 4/4] cputime: optimize jiffies_to_cputime(1)

From: Stanislaw Gruszka
Date: Wed Jun 03 2009 - 09:14:01 EST


Hi.

> > This patch (with 3 previous) was compiled on x86, x86_64, ppc with
> > CONFIG_VIRT_CPU_ACCOUNTNG=n, ppc64 with CONFIG_VIRT_CPU_ACCOUNTING=y.
> > Run time testing was done only on x86.

I tested patches on ppc64 with CONFIG_VIRT_CPU_ACCOUNTING=y . Additionally I
measure impact of iffies_to_cputime(1) to cputime_one_jiffiy conversion on
check_cpu_itimer() calls with below code:

+ xstart = get_cycles();
+ barrier();
check_cpu_itimer(tsk, &sig->it[CPUCLOCK_PROF], &prof_expires, ptime,
SIGPROF);
check_cpu_itimer(tsk, &sig->it[CPUCLOCK_VIRT], &virt_expires, utime,
SIGVTALRM);
+ barrier();
+ xend = get_cycles();
+ check_cpu_itimer_cycles += xend - xstart;
+ check_cpu_itimer_n++;

Using cputime_one_jiffy was about 4% faster.

Cheers
Stanislaw
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/