Re: [PATCH] fast path for rdhwr emulation for TLS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Sep 2006 18:28:05 +0100, Ralf Baechle <ralf@xxxxxxxxxxxxxx> wrote:
> > Add special short path for emulationg RDHWR which is used to support
> > TLS.  The handle_tlbl synthesizer takes a care for
> > cpu_has_vtag_icache.
> 
> I'm just wondering if we actually need such optimizations.  Have you ran
> any application benchmarks?

I've measured time of NPTL pthread_mutex_lock/pthread_mutex_unlock loop.

	pthread_mutex_init(&m, NULL);
	gettimeofday(&start, NULL);
	for (i = 0; i < 1000000; i++) {
		pthread_mutex_lock(&m);
		pthread_mutex_unlock(&m);
	}
	gettimeofday(&end, NULL);


Without optimization:
	0.826407 sec / 1000000 loop

With optimization:
	0.415667 sec / 1000000 loop

It would be worth to do.
---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux