Date: Tue, 16 Jan 2007 11:32:30 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 112983 for review Message-ID: <200701161132.l0GBWUWr095801@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112983 Change 112983 by piso@piso_newluxor on 2007/01/16 11:31:42 Get rid of the spin lock acquisition in the callout path. While here, do some spacing according to style. Affected files ... .. //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#20 edit Differences ... ==== //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#20 (text+ko) ==== @@ -234,7 +234,7 @@ { mtx_init(&intr_table_lock, "intr table", NULL, MTX_SPIN); - callout_init_mtx(&stray_callout_handle, &intr_table_lock, 0); + callout_init(&stray_callout_handle, 1); } /* Stray detection MD code */ @@ -242,9 +242,10 @@ walk_intr_sparc64(void) { struct intr_vector *iv; static int i = 0; + int j; - for (; i<IV_MAX; ) { - int j = i++; + for (; i<IV_MAX;) { + j = i++; iv = &intr_vectors[j]; if (iv != NULL && iv->iv_event != NULL) return (iv->iv_event); @@ -257,10 +258,8 @@ intr_callout_reset(void) { - mtx_lock_spin(&intr_table_lock); callout_reset(&stray_callout_handle, hz, - &stray_detection, &walk_intr_sparc64); - mtx_unlock_spin(&intr_table_lock); + &stray_detection, &walk_intr_sparc64); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701161132.l0GBWUWr095801>