public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [QUESTION] Performance deterioration caused by commit 85f726a35e504418
@ 2021-10-18  3:23 Yang Jihong
  2021-10-18 13:37 ` Steven Rostedt
  0 siblings, 1 reply; 8+ messages in thread
From: Yang Jihong @ 2021-10-18  3:23 UTC (permalink / raw)
  To: tom.zanussi, Steven Rostedt; +Cc: linux-kernel

Hi Tom and Steven,

commit 85f726a35e504418 use strncpy instead of memcpy when copying comm,
on ARM64 machine, this commit causes performance degradation.

I test the number of instructions executed by invoking the 
trace_sched_switch function once on an arm64 machine:
1. Use memcpy, the number of instructions executed is 850.
2. Use strncpy, the number of instructions executed 1100.
That is, use strncpy is almost 250 more instructions than memcpy.

Has the impact on performance been considered in this commit? :)
What is the impact of revert the patch?

Kind regards,
Jihong

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-20  2:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-18  3:23 [QUESTION] Performance deterioration caused by commit 85f726a35e504418 Yang Jihong
2021-10-18 13:37 ` Steven Rostedt
2021-10-19  2:39   ` Yang Jihong
2021-10-19  2:51     ` Steven Rostedt
2021-10-19 17:30       ` Zanussi, Tom
2021-10-19 18:10         ` Steven Rostedt
2021-10-19 18:38           ` Zanussi, Tom
2021-10-20  2:00             ` Yang Jihong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox