[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.
This commit is contained in:
Adrian Chadd 2016-11-15 01:34:38 +00:00
parent 7e9a160642
commit 0046bef85a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308661
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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) \