[PATCH 3/3] x86, fpu: Do not update fpu_counter in the eagerfpu case
From: Mel Gorman
Date: Wed Aug 06 2014 - 08:56:00 EST
In the non-lazy FPU restore case there is no need for fpu_counter. This
patch avoids updating the counter unnecessarily.
Signed-off-by: Mel Gorman <mgorman@xxxxxxx>
---
arch/x86/include/asm/fpu-internal.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h
index 8d92807..85fdd6b 100644
--- a/arch/x86/include/asm/fpu-internal.h
+++ b/arch/x86/include/asm/fpu-internal.h
@@ -427,12 +427,10 @@ static inline void switch_eagerfpu_prepare(struct task_struct *old, struct task_
old->thread.fpu.last_cpu = cpu;
old->thread.fpu.has_fpu = 0; /* But leave fpu_owner_task! */
} else {
- old->thread.fpu_counter = 0;
old->thread.fpu.last_cpu = ~0;
}
if (fpu->preload) {
- new->thread.fpu_counter++;
__thread_set_has_fpu(new);
prefetch(new->thread.fpu.state);
}
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/