summaryrefslogtreecommitdiff
path: root/sys/kern/kern_mtxpool.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove duplicated empty lines from kern/*.cMateusz Guzik2020-01-301-1/+0
| | | | | | | No functional changes. Notes: svn path=/head/; revision=357312
* Mark mtxpool_sleep as read mostly, not frequently.Mateusz Guzik2020-01-051-1/+1
| | | | | | | The latter is not justified. Notes: svn path=/head/; revision=356373
* Mark some more hot global variables with __read_mostly.Alexander Motin2019-12-041-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=355404
* Increase MTX_POOL_SLEEP_SIZE from 128 to 1024.Alexander Motin2018-12-241-2/+2
| | | | | | | | | | | | | This value remained unchanged for 15 years, and now this bump reduces lock spinning in GEOM and BIO layers while doing ~1.6M IOPS to 4 NVMe on 72-core system from ~25% to ~5% by the cost of additional 28KB RAM. While there, align struct mtx_pool fields to cache lines. MFC after: 1 month Notes: svn path=/head/; revision=342400
* sys/kern: adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326271
* sys/kern: spelling fixes in comments.Pedro F. Giffuni2016-04-291-1/+1
| | | | | | | No functional change. Notes: svn path=/head/; revision=298819
* Garbage collect mtxpool_lockbuilder, the mutex pool historically usedRobert Watson2014-05-021-30/+0
| | | | | | | | | | | | | for lockmgr and sx interlocks, but unused since optimised versions of those sleep locks were introduced. This will save a (quite) small amount of memory in all kernel configurations. The sleep mutex pool is retained as it is used for 'struct bio' and several other consumers. Discussed with: jhb MFC after: 3 days Notes: svn path=/head/; revision=265216
* Fix a number of style issues in the MALLOC / FREE commit. I've tried toDag-Erling Smørgrav2008-10-231-1/+2
| | | | | | | | be careful not to fix anything that was already broken; the NFSv4 code is particularly bad in this respect. Notes: svn path=/head/; revision=184214
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).Dag-Erling Smørgrav2008-10-231-4/+3
| | | | | | | MFC after: 3 months Notes: svn path=/head/; revision=184205
* Universally adopt most conventional spelling of acquire.Robert Watson2007-05-271-1/+1
| | | | Notes: svn path=/head/; revision=170035
* Make a bunch of malloc types static.Poul-Henning Kamp2005-02-101-1/+1
| | | | | | | Found by: src/tools/tools/kernxref Notes: svn path=/head/; revision=141616
* Expand COPYRIGHT inline, per Matthew Dillon's earlier approval.Warner Losh2005-01-061-4/+24
| | | | Notes: svn path=/head/; revision=139803
* Rearrange the SYSINIT order to call lockmgr_init() earlier so thatDon Lewis2003-07-161-1/+1
| | | | | | | | | the runtime lockmgr initialization code in lockinit() can be eliminated. Reviewed by: jhb Notes: svn path=/head/; revision=117660
* Extend the mutex pool implementation to permit the creation and use ofDon Lewis2003-07-131-54/+133
| | | | | | | | | | | | | | | | | | | multiple mutex pools with different options and sizes. Mutex pools can be created with either the default sleep mutexes or with spin mutexes. A dynamically created mutex pool can now be destroyed if it is no longer needed. Create two pools by default, one that matches the existing pool that uses the MTX_NOWITNESS option that should be used for building higher level locks, and a new pool with witness checking enabled. Modify the users of the existing mutex pool to use the appropriate pool in the new implementation. Reviewed by: jhb Notes: svn path=/head/; revision=117494
* Style(9).Maxime Henrion2003-06-131-14/+17
| | | | Notes: svn path=/head/; revision=116305
* Use __FBSDID().David E. O'Brien2003-06-111-2/+3
| | | | Notes: svn path=/head/; revision=116182
* Change callers of mtx_init() to pass in an appropriate lock type name. InJohn Baldwin2002-04-041-1/+1
| | | | | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64 Notes: svn path=/head/; revision=93818
* Rename SI_SUB_MUTEX to SI_SUB_MTX_POOL to make the name at all accurate.Brian Feldman2002-03-131-1/+1
| | | | | | | | | | | | | | | | | | | While doing this, move it earlier in the sysinit boot process so that the VM system can use it. After that, the system is now able to use sx locks instead of lockmgr locks in the VM system. To accomplish this, some of the more questionable uses of the locks (such as testing whether they are owned or not, as well as allowing shared+exclusive recursion) are removed, and simpler logic throughout is used so locks should also be easier to understand. This has been tested on my laptop for months, and has not shown any problems on SMP systems, either, so appears quite safe. One more user of lockmgr down, many more to go :) Notes: svn path=/head/; revision=92246
* cast hashing index to (int)(intptr_t) for calculation.Matthew Dillon2001-11-191-3/+3
| | | | | | | mtx_init() with MTX_QUIET and MTX_NOWITNESS to avoid bogus warnings Notes: svn path=/head/; revision=86563
* Fix some warnings on 64 bit platforms.Peter Wemm2001-11-171-1/+4
| | | | Notes: svn path=/head/; revision=86476
* Create a mutex pool API for short term leaf mutexes.Matthew Dillon2001-11-131-0/+112
Replace the manual mutex pool in kern_lock.c (lockmgr locks) with the new API. Replace the mutexes embedded in sxlocks with the new API. Notes: svn path=/head/; revision=86333