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:He Sheng <hesheng@wxiat.com> Signed-off-by:
Gu Zitao <guzitao@wxiat.com>
Loading
Please sign in to comment