From owner-p4-projects@FreeBSD.ORG Sat Jan 5 04:40:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7F26A16A46C; Sat, 5 Jan 2008 04:40:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44BFA16A469 for ; Sat, 5 Jan 2008 04:40:46 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 32CB813C45A for ; Sat, 5 Jan 2008 04:40:46 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m054ekYo005616 for ; Sat, 5 Jan 2008 04:40:46 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m054ekJn005613 for perforce@freebsd.org; Sat, 5 Jan 2008 04:40:46 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 04:40:46 GMT Message-Id: <200801050440.m054ekJn005613@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132543 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 04:40:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=132543 Change 132543 by jb@jb_freebsd1 on 2008/01/05 04:39:50 Remove my home-grown completion spin thingies and use the magical qualities of smp_no_rendevous_barrier (which aren't at all obvious). I'll need to revise this later for arches that are only UP. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#9 edit .. //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#9 edit .. //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cyclic_impl.h#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/amd64/cyclic_machdep.c#9 (text+ko) ==== @@ -125,5 +125,5 @@ (*func)(param); else smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL, - func, NULL, param); + func, smp_no_rendevous_barrier, param); } ==== //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#9 (text+ko) ==== @@ -481,9 +481,6 @@ cyc_backend_t *be = cpu->cyp_backend; be->cyb_enable(be->cyb_arg); - - /* Ack to cross call */ - argp->cyx_wait = 0; } static void @@ -493,14 +490,9 @@ cyc_xcallarg_t arg; arg.cyx_cpu = cpu; - arg.cyx_wait = 1; /* Cross call to the target CPU */ be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_enable_xcall, &arg); - - /* Spin while waiting for the target CPU to ack the cross call */ - while (arg.cyx_wait == 1) - /* spin */ ; } static void @@ -511,9 +503,6 @@ cyc_backend_t *be = cpu->cyp_backend; be->cyb_disable(be->cyb_arg); - - /* Ack to cross call */ - argp->cyx_wait = 0; } static void @@ -523,14 +512,9 @@ cyc_xcallarg_t arg; arg.cyx_cpu = cpu; - arg.cyx_wait = 1; /* Cross call to the target CPU */ be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_disable_xcall, &arg); - - /* Spin while waiting for the target CPU to ack the cross call */ - while (arg.cyx_wait == 1) - /* spin */ ; } static void @@ -541,9 +525,6 @@ cyc_backend_t *be = cpu->cyp_backend; be->cyb_reprogram(be->cyb_arg, argp->cyx_exp); - - /* Ack to cross call */ - argp->cyx_wait = 0; } static void @@ -554,14 +535,9 @@ arg.cyx_cpu = cpu; arg.cyx_exp = exp; - arg.cyx_wait = 1; /* Cross call to the target CPU */ be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_reprogram_xcall, &arg); - - /* Spin while waiting for the target CPU to ack the cross call */ - while (arg.cyx_wait == 1) - /* spin */ ; } /* ==== //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cyclic_impl.h#3 (text+ko) ==== @@ -289,7 +289,6 @@ typedef struct cyc_xcallarg { cyc_cpu_t *cyx_cpu; hrtime_t cyx_exp; - volatile int cyx_wait; } cyc_xcallarg_t; #define CY_DEFAULT_PERCPU 1