Commit 09a65211 authored by Lu Jialin's avatar Lu Jialin
Browse files

psi: update psi irqtime when the irq delta is nozero

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BCV4



-------------------------------

If update psi irqtime whether the irq delta is zero or not, the performance
will be degradation when update_rq_clock_task works frequently.
Therefore, just update psi irqtime whether the irq delta is nozero.
performace test of times:
1) without psi_account_irqtime in update_rq_clock_task
[root@arm64_perf bin]# ./times  -E -C 200 -L -S -W -N "times" -I 200
Running: times# ./../bin-arm64/times -E -C 200 -L -S -W -N times -I 200
             prc thr   usecs/call      samples   errors cnt/samp
times          1   1      0.45210          188        0      500

2) psi_account_irqtime in update_rq_clock_task
[root@arm64_perf bin]# ./times  -E -C 200 -L -S -W -N "times" -I 200
Running: times# ./../bin-arm64/times -E -C 200 -L -S -W -N times -I 200
             prc thr   usecs/call      samples   errors cnt/samp
times          1   1      0.49408          196        0      500

3) psi_account_irqtime in update_rq_clock_task when irq delta is nozero
[root@arm64_perf bin]# ./times  -E -C 200 -L -S -W -N "times" -I 200
Running: times# ./../bin-arm64/times -E -C 200 -L -S -W -N times -I 200
             prc thr   usecs/call      samples   errors cnt/samp
times          1   1      0.45158          195        0      500

Signed-off-by: default avatarLu Jialin <lujialin4@huawei.com>
parent 779d2a35
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -629,6 +629,7 @@ static void update_rq_clock_task(struct rq *rq, s64 delta)

	rq->prev_irq_time += irq_delta;
	delta -= irq_delta;
	if (irq_delta)
		psi_account_irqtime(rq->curr, irq_delta);
#endif
#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING