Bug 13111

Summary: Improvement for atomic operations in KLDs
Product: Base System Reporter: Peter Jeremy <jeremyp>
Component: i386Assignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Peter Jeremy 1999-08-13 00:30:00 UTC
	The i386 atomic operations were recently re-written by Matt
	Dillon to actually generate atomic code for both UP and SMP
	configurations.  In order to generate KLDs that are portable
	between UP and SMP, KLDs are always compiled with `lock'
	prefixes - which are quite slow, even on UP systems.

	The following patch creates a set of callable functions which
	are linked into the kernel.  The KLD compilation options are
	changed to call these functions, rather than in-lining the
	atomic operations.

	This approach makes atomic operations from KLDs significantly
	faster on UP systems (though somewhat slower on SMP systems).

How-To-Repeat: 
	code inspection
Comment 1 Alan Cox freebsd_committer freebsd_triage 1999-08-18 05:11:36 UTC
State Changed
From-To: open->closed

Committed to -CURRENT.