Commit 2ac1d37a authored by He Sheng's avatar He Sheng Committed by guzitao
Browse files

sw64: avoid copying thread_struct twice

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5GF7A



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

The thread_struct has been copied in dup_task_struct() by generic
arch_dup_task_struct(), and it's unnecessary to be copied again
in copy_thread(). This patch adds arch-specific implementation of
arch_dup_task_struct() to reduce data copying.

It does not have to save fpu state for a kernel thread, so call
fpstate_save() instead of __fpstate_save() here to save fpu state
on demand.

Signed-off-by: default avatarHe Sheng <hesheng@wxiat.com>

Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent ca223ff2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment