thread+preemption stability improvement (was: Re: ACPI degrading.. ?)

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Mon, 19 Jul 2004 11:56:06 -0400 (EDT)
On Wed, 30 Jun 2004, John Baldwin wrote:

> Try this patch.  It fixed all my lockups with xmms in KDE on Friday: 

This patch causes my SMP and UP tests to succeed with PREEMPTION enabled,
whereas before they rapidly hung.  On SMP I see a small (just under 1%) 
but consistent improvement in query throughput with MySQL, and on UP I see
a small (just under 1%) but inconsistent decrease in query throughput with
MySQL.  The standard deviation on the UP case is almost the same size as
the change, but in the SMP case it's 1/4-1/3 the size of the change, FWIW.

Can't speak to the latency as the test I'm currently running isn't very
latency sensitive, but was very sensitive to the stability issue.  I think
this patch is definitely worth committing ASAP :-).

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert_at_fledge.watson.org      Principal Research Scientist, McAfee Research


> 
> --- //depot/projects/smpng/sys/i386/i386/intr_machdep.c	2004/07/02 20:28:06
> +++ //depot/user/jhb/preemption/i386/i386/intr_machdep.c	2004/07/16 20:14:26
> _at__at_ -204,6 +204,8 _at__at_
>  		}
>  		isrc->is_pic->pic_eoi_source(isrc);
>  		error = 0;
> +		/* XXX */
> +		td->td_pflags &= ~TDP_OWEPREEMPT;
>  		critical_exit();
>  	} else {
>  		/*
> 
> -- 
> John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
> "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
> 
Received on Mon Jul 19 2004 - 13:56:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:02 UTC