On 18-Dec-2002 Terry Lambert wrote:
> John Baldwin wrote:
>> This has nothing to do with /dev/random. Please stop with the constant
>> FUDing Terry.
>
>| Revision 1.296 / (download) - annotate - [select for diffs], Sun Jan 14
>| 10:11:10 2001 UTC (23 months ago) by jhb
>| Branch: MAIN
>| Changes since 1.295: +2 -2 lines
>| Diff to previous 1.295 (colored)
>|
>| Remove I386_CPU from GENERIC. Support for the 386 seriously pessimizes
>| performance on other x86 processors. Custom kernels can still be built
>| that will run on the 386.
>
> The pessimization that was being discussed right before that happened
> was "harvesting entropy for /dev/random". I can provide mailing list
> quotes about that bracketing those dates.
No, the pessimization is:
#if defined(I386_CPU) || defined(CPU_DISABLE_CMPXCHG)
static __inline int
atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src)
{
int res = exp;
__asm __volatile(
" pushfl ; "
" cli ; "
" cmpl %0,%2 ; "
" jne 1f ; "
" movl %1,%2 ; "
"1: "
" sete %%al; "
" movzbl %%al,%0 ; "
" popfl ; "
"# atomic_cmpset_int"
: "+a" (res) /* 0 (result) */
: "r" (src), /* 1 */
"m" (*(dst)) /* 2 */
: "memory");
return (res);
}
#else /* defined(I386_CPU) */
static __inline int
atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src)
{
int res = exp;
__asm __volatile (
" " __XSTRING(MPLOCKED) " "
" cmpxchgl %1,%2 ; "
" setz %%al ; "
" movzbl %%al,%0 ; "
"1: "
"# atomic_cmpset_int"
: "+a" (res) /* 0 (result) */
: "r" (src), /* 1 */
"m" (*(dst)) /* 2 */
: "memory");
return (res);
}
#endif /* defined(I386_CPU) */
> Was there a particular pessimization other than /dev/random that you
> were thinking of when you made the commit comment?
Yes, the one above. It came in as part of SMPng.
--
John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message