From owner-freebsd-current Fri Dec 6 16:45: 9 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7ACA837B401 for ; Fri, 6 Dec 2002 16:45:08 -0800 (PST) Received: from sccrmhc03.attbi.com (sccrmhc03.attbi.com [204.127.202.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6DBC43EC5 for ; Fri, 6 Dec 2002 16:45:07 -0800 (PST) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by sccrmhc03.attbi.com (sccrmhc03) with ESMTP id <2002120700450600300d11fne>; Sat, 7 Dec 2002 00:45:06 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id QAA48375 for ; Fri, 6 Dec 2002 16:41:17 -0800 (PST) Date: Fri, 6 Dec 2002 16:41:16 -0800 (PST) From: Julian Elischer To: FreeBSD current users Subject: x86 FPU discard question.. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG As part of shuting down a thread and discarding it, we want to throw away any floating point context there may be. Currently this saves out the floating point state to make the fpu be declared 'unused'. However we dont't need any fpu state saved. Is there any way to just mark it as 'unused' without bothering to waste time saving the current FP context? would just doing PCPU_SET(fputhread, NULL); be enough? Currently there is an npxexit() in cpu_thread_exit(). where npxexit() does: savecrit = intr_disable(); if (curthread == PCPU_GET(fpcurthread)) npxsave(&PCPU_GET(curpcb)->pcb_save); intr_restore(savecrit); My guess is that there needs to be some bit set to tell the hardware that it is unused so that a trap can be generated on the first use by another thread. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message