Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Nov 2016 01:34:38 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r308661 - in head/sys: conf kern
Message-ID:  <201611150134.uAF1YcbE090944@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Nov 15 01:34:38 2016
New Revision: 308661
URL: https://svnweb.freebsd.org/changeset/base/308661

Log:
  [mips] make UMTX_CHAINS configurable at compile time.
  
  The default (512) wastes quite a bit of space which doesn't really buy
  us much on highly embedded systems which don't take a lot of locks in
  parallel.
  
  This makes it at least build time configurable so people can experiment.

Modified:
  head/sys/conf/options
  head/sys/kern/kern_umtx.c

Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options	Tue Nov 15 01:20:36 2016	(r308660)
+++ head/sys/conf/options	Tue Nov 15 01:34:38 2016	(r308661)
@@ -220,6 +220,7 @@ SYSVSHM		opt_sysvipc.h
 SW_WATCHDOG	opt_watchdog.h
 TURNSTILE_PROFILING
 UMTX_PROFILING
+UMTX_CHAINS	opt_global.h
 VERBOSE_SYSINIT
 
 # POSIX kernel options
@@ -996,3 +997,4 @@ GPIO_SPI_DEBUG	opt_gpio.h
 EVDEV_SUPPORT	opt_evdev.h
 EVDEV_DEBUG	opt_evdev.h
 UINPUT_DEBUG	opt_evdev.h
+

Modified: head/sys/kern/kern_umtx.c
==============================================================================
--- head/sys/kern/kern_umtx.c	Tue Nov 15 01:20:36 2016	(r308660)
+++ head/sys/kern/kern_umtx.c	Tue Nov 15 01:34:38 2016	(r308661)
@@ -198,7 +198,9 @@ struct umtxq_chain {
 			 PRI_MAX_TIMESHARE : (td)->td_user_pri)
 
 #define	GOLDEN_RATIO_PRIME	2654404609U
+#ifndef	UMTX_CHAINS
 #define	UMTX_CHAINS		512
+#endif
 #define	UMTX_SHIFTS		(__WORD_BIT - 9)
 
 #define	GET_SHARE(flags)	\



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