Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2003 18:10:41 -0500
From:      Jake Burkholder <jake@locore.ca>
To:        Tim Robbins <tjr@FreeBSD.ORG>
Cc:        freebsd-smp@FreeBSD.ORG
Subject:   Re: Locking down itimers
Message-ID:  <20030215181041.K63597@locore.ca>
In-Reply-To: <20030215154024.A53601@dilbert.robbins.dropbear.id.au>; from tjr@FreeBSD.ORG on Sat, Feb 15, 2003 at 03:40:24PM %2B1100
References:  <20030215154024.A53601@dilbert.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Apparently, On Sat, Feb 15, 2003 at 03:40:24PM +1100,
	Tim Robbins said words to the effect of;

> This patch protects p_realtimer with the proc mutex instead of Giant,
> and obtains sched_lock around accesses to p_stats->p_timer[] to avoid
> a potential race with hardclock. It makes getitimer(), setitimer()
> and the realitexpire() callout MP-safe.
> 
> It was necessary to restructure setitimer() a bit to guarantee that
> the swap:
> 	ovalue = p_realtimer, p_realtimer = value;
> occurs atomically with respect to other threads in the same process
> calling setitimer() and the callout.
> 
> Does the patch seem reasonable? Any comments?

Looks reasonable to me.

Jake

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030215181041.K63597>