Commit-ID: 9ba6b79102a594293c79f30319cabf476c5e300e Gitweb: http://git.kernel.org/tip/9ba6b79102a594293c79f30319cabf476c5e300e Author: Ingo Molnar <mingo@xxxxxxxxxx> AuthorDate: Wed, 27 May 2015 12:22:29 +0200 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitDate: Wed, 27 May 2015 14:11:25 +0200 x86/fpu: Optimize fpu__activate_fpstate_read() fpu__activate_fpstate_read() is used before FPU registers are read from the fpstate by ptrace and core dumping. It's not necessary to unlazy non-current child tasks in this case, since the reading of registers is non-destructive. Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx> Cc: Bobby Powers <bobbypowers@xxxxxxxxx> Cc: Borislav Petkov <bp@xxxxxxxxx> Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx> Cc: H. Peter Anvin <hpa@xxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> --- arch/x86/kernel/fpu/core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c index 174add3..06cb7e3 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -312,10 +312,7 @@ void fpu__activate_fpstate_read(struct fpu *fpu) if (fpu->fpregs_active) { fpu__save(fpu); } else { - if (fpu->fpstate_active) { - /* Invalidate any lazy state: */ - fpu->last_cpu = -1; - } else { + if (!fpu->fpstate_active) { fpstate_init(&fpu->state); /* Safe to do for current and for stopped child tasks: */ -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |