NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/49853 x86 fpu save loop may terminate early?



The following reply was made to PR port-amd64/49853; it has been noted by GNATS.

From: Michael van Elst <mlelstv%serpens.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-amd64/49853 x86 fpu save loop may terminate early?
Date: Sat, 25 Apr 2015 15:11:41 +0200

 This is always an "infinite loop" when pcb->pcb_fpcpu isn't changed
 by the remote CPU.
 
 
 forever() {
 
 	if (fpu context is free)
 		break
 
 	if (fpu context belongs to me) {
 		save fpu
 		break
 	}
 
 	signal context owner by IPI
 
 	while (fpu context belongs to same owner && same time slice)
 		pause
 
 }
 
 
 The inner while loop just paces the checks and sending of IPI messages.
 If hardclock_ticks changes when entering the main loop, the only
 consequence would be that the second iteration comes early.
 
 
 
 Greetings,
 -- 
                                 Michael van Elst
 Internet: mlelstv%serpens.de@localhost
                                 "A potential Snark may lurk in every tree."
 


Home | Main Index | Thread Index | Old Index