Date: Mon, 6 Feb 2006 21:40:27 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 91260 for review Message-ID: <200602062140.k16LeRix097389@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=91260 Change 91260 by jhb@jhb_slimer on 2006/02/06 21:40:00 Save this here until someone tests it. Change the hptmv driver to use a regular mutex since it doesn't use an INTR_FAST handler, thus using a spin mutex just adds extra cost with no benefit. Affected files ... .. //depot/projects/smpng/sys/dev/hptmv/entry.c#9 edit Differences ... ==== //depot/projects/smpng/sys/dev/hptmv/entry.c#9 (text+ko) ==== @@ -167,12 +167,12 @@ { intrmask_t spl = 0; - mtx_lock_spin(&driver_lock); + mtx_lock(&driver_lock); return spl; } void unlock_driver(intrmask_t spl) { - mtx_unlock_spin(&driver_lock); + mtx_unlock(&driver_lock); } #else static int driver_locked = 0; @@ -1169,9 +1169,10 @@ #if __FreeBSD_version >= 500000 static void hpt_init(void *dummy) { - mtx_init(&driver_lock, "hptlock", NULL, MTX_SPIN); + mtx_init(&driver_lock, "hptlock", NULL, MTX_DEF); } SYSINIT(hptinit, SI_SUB_CONFIGURE, SI_ORDER_FIRST, hpt_init, NULL); +SYSUNINIT(hptinit, SI_SUB_CONFIGURE, SI_ORDER_FIRST, mtx_destroy, &driver_lock); #endif static int num_adapters = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602062140.k16LeRix097389>