Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Dec 2010 14:24:46 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r216252 - head/sys/cddl/dev/cyclic/i386
Message-ID:  <4CFE278E.5060008@freebsd.org>
In-Reply-To: <201012071204.oB7C46pd065026@svn.freebsd.org>
References:  <201012071204.oB7C46pd065026@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 07/12/2010 14:04 Andriy Gapon said the following:
> Author: avg
> Date: Tue Dec  7 12:04:06 2010
> New Revision: 216252
> URL: http://svn.freebsd.org/changeset/base/216252
> 
> Log:
>   opensolaris cyclic xcall: no need for special handling of curcpu
>   
>   smp_rendezvous_cpus already properly handles current CPU case
>   and non-SMP case.

This could also lead to problems because a thread could be not pinned to its
current CPU during direct (*func)(param) call.

>   MFC after:	3 weeks
> 
> Modified:
>   head/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
> 
> Modified: head/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
> ==============================================================================
> --- head/sys/cddl/dev/cyclic/i386/cyclic_machdep.c	Tue Dec  7 09:19:47 2010	(r216251)
> +++ head/sys/cddl/dev/cyclic/i386/cyclic_machdep.c	Tue Dec  7 12:04:06 2010	(r216252)
> @@ -121,13 +121,7 @@ static void reprogram(cyb_arg_t arg, hrt
>  
>  static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param)
>  {
> -	/*
> -	 * If the target CPU is the current one, just call the
> -	 * function. This covers the non-SMP case.
> -	 */
> -	if (c == &solaris_cpu[curcpu])
> -		(*func)(param);
> -	else
> -		smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
> -		    func, smp_no_rendevous_barrier, param);
> +
> +	smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
> +	    func, smp_no_rendevous_barrier, param);
>  }


-- 
Andriy Gapon



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