lkml.org 
[lkml]   [2014]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] x86, fpu: Do not update fpu_counter in the eagerfpu case
Date
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@suse.de>
---
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


\
 
 \ /
  Last update: 2014-08-06 15:41    [W:0.052 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site