소스 검색

s390/time: use stck clock fast for do_account_vtime

The last high frequency call site of the STCK instruction is
do_account_vtime. Replace it with the faster STCKF instruction.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Martin Schwidefsky 10 년 전
부모
커밋
1f759bb3a2
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      arch/s390/kernel/vtime.c

+ 4 - 0
arch/s390/kernel/vtime.c

@@ -66,7 +66,11 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset)
 	clock = S390_lowcore.last_update_clock;
 	clock = S390_lowcore.last_update_clock;
 	asm volatile(
 	asm volatile(
 		"	stpt	%0\n"	/* Store current cpu timer value */
 		"	stpt	%0\n"	/* Store current cpu timer value */
+#ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES
+		"	stckf	%1"	/* Store current tod clock value */
+#else
 		"	stck	%1"	/* Store current tod clock value */
 		"	stck	%1"	/* Store current tod clock value */
+#endif
 		: "=m" (S390_lowcore.last_update_timer),
 		: "=m" (S390_lowcore.last_update_timer),
 		  "=m" (S390_lowcore.last_update_clock));
 		  "=m" (S390_lowcore.last_update_clock));
 	S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer;
 	S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer;