Christophe Leroy abcff86df2 powerpc/time: Only set CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC64
scaled cputime is only meaningfull when the processor has
SPURR and/or PURR, which means only on PPC64.

Removing it on PPC32 significantly reduces the size of
vtime_account_system() and vtime_account_idle() on an 8xx:

Before:
00000000 l     F .text	000000a8 vtime_delta
00000280 g     F .text	0000010c vtime_account_system
0000038c g     F .text	00000048 vtime_account_idle

After:
(vtime_delta gets inlined inside the two functions)
000001d8 g     F .text	000000a0 vtime_account_system
00000278 g     F .text	00000038 vtime_account_idle

In terms of performance, we also get approximatly 7% improvement on
task switch. The following small benchmark app is run with perf stat:

void *thread(void *arg)
{
	int i;

	for (i = 0; i < atoi((char*)arg); i++)
		pthread_yield();
}

int main(int argc, char **argv)
{
	pthread_t th1, th2;

	pthread_create(&th1, NULL, thread, argv[1]);
	pthread_create(&th2, NULL, thread, argv[1]);
	pthread_join(th1, NULL);
	pthread_join(th2, NULL);

	return 0;
}

Before the patch:

 Performance counter stats for 'chrt -f 98 ./sched 100000' (50 runs):

       8228.476465      task-clock (msec)         #    0.954 CPUs utilized            ( +-  0.23% )
            200004      context-switches          #    0.024 M/sec                    ( +-  0.00% )

After the patch:

 Performance counter stats for 'chrt -f 98 ./sched 100000' (50 runs):

       7649.070444      task-clock (msec)         #    0.955 CPUs utilized            ( +-  0.27% )
            200004      context-switches          #    0.026 M/sec                    ( +-  0.00% )

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-10-20 13:26:47 +11:00
..
2018-08-17 11:32:50 -07:00
2015-05-28 15:31:53 +02:00
2016-03-04 23:50:27 -06:00
2018-06-03 20:32:02 +10:00
2018-06-07 10:23:33 -07:00
2018-08-17 11:32:50 -07:00
2016-03-01 19:27:20 +11:00
2018-05-07 07:15:41 +02:00
2017-11-16 12:47:46 -08:00
2017-11-16 12:47:46 -08:00
2016-06-14 13:58:26 +10:00
2016-06-14 13:58:26 +10:00
2018-10-03 15:40:05 +10:00
2018-05-25 12:04:43 +10:00
2018-06-03 21:19:40 +10:00
2018-01-15 09:35:26 +01:00
2018-06-23 21:43:21 +10:00
2018-06-03 20:43:34 +10:00
2018-07-30 22:48:21 +10:00
2018-10-20 13:26:47 +11:00
2016-06-14 13:58:26 +10:00
2018-06-23 21:43:21 +10:00
2017-11-12 09:03:10 +11:00
2015-05-05 13:35:39 -06:00