lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1407329748-3928-4-git-send-email-mgorman@suse.de>
Date:	Wed,  6 Aug 2014 13:55:48 +0100
From:	Mel Gorman <mgorman@...e.de>
To:	H Peter Anvin <hpa@...or.com>,
	Suresh Siddha <suresh.b.siddha@...el.com>
Cc:	Mike Galbraith <mgalbraith@...e.de>, Linux-X86 <x86@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>, Mel Gorman <mgorman@...e.de>
Subject: [PATCH 3/3] x86, fpu: Do not update fpu_counter in the eagerfpu case

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@...e.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ