|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
| #
7bd04292 |
| 25-Jan-2019 |
Konstantin Belousov <[email protected]> |
MFC r343302: Remove unused *_sysinit_flags() declarations.
|
|
Revision tags: release/12.0.0, release/11.2.0 |
|
| #
c4e20cad |
| 27-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
sys/sys: further adoption of SPDX licensing ID tags.
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
sys/sys: further adoption of SPDX licensing ID tags.
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.
show more ...
|
| #
b584eb2e |
| 22-Nov-2017 |
Mateusz Guzik <[email protected]> |
locks: pass the found lock value to unlock slow path
This avoids an explicit read later.
While here whack the cheaply obtainable 'tid' argument.
|
| #
013c0b49 |
| 22-Nov-2017 |
Mateusz Guzik <[email protected]> |
locks: remove the file + line argument from internal primitives when not used
The pair is of use only in debug or LOCKPROF kernels, but was passed (zeroed) for many locks even in production kernels.
locks: remove the file + line argument from internal primitives when not used
The pair is of use only in debug or LOCKPROF kernels, but was passed (zeroed) for many locks even in production kernels.
While here whack the tid argument from wlock hard and xlock hard.
There is no kbi change of any sort - "external" primitives still accept the pair.
show more ...
|
| #
755230eb |
| 21-Nov-2017 |
Mark Johnston <[email protected]> |
Clean up the SYSINIT_FLAGS definitions for rwlock(9) and rmlock(9).
Avoid duplication in their macro definitions, and document them. No functional change intended.
MFC after: 1 week
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
1085c4fa |
| 15-Feb-2017 |
Mateusz Guzik <[email protected]> |
rwlock: tidy up r313392
While a new bit was added and thread alignment got shifted to accomodate it, RW_READERS_SHIFT was not modified accordingly and clashed with the new flag.
This was surprising
rwlock: tidy up r313392
While a new bit was added and thread alignment got shifted to accomodate it, RW_READERS_SHIFT was not modified accordingly and clashed with the new flag.
This was surprisingly harmless. If the lock was taken for writing, other flags were tested. If the lock was taken for reading, it would correctly work for readers > 1 and this was the only relevant test performed.
show more ...
|
| #
dbccc810 |
| 07-Feb-2017 |
Mateusz Guzik <[email protected]> |
rwlock: implement RW_LOCK_WRITER_RECURSED bit
This moves recursion handling out of the inlined wunlock path and in particular saves a read and a branch.
Discussed with:
|
| #
993ddec4 |
| 05-Feb-2017 |
Mateusz Guzik <[email protected]> |
rwlock: move lockstat handling out of inline primitives
See r313275 for details.
One difference here is that recursion handling was removed from the fallback routine. As it is it was never supposed
rwlock: move lockstat handling out of inline primitives
See r313275 for details.
One difference here is that recursion handling was removed from the fallback routine. As it is it was never supposed to see a recursed lock in the first place. Future changes will move it out of inline variants, but right now there is no easy to way to test if the lock is recursed without reading additional words.
show more ...
|
| #
c84f3479 |
| 05-Feb-2017 |
Mateusz Guzik <[email protected]> |
rwlock: switch to fcmpset
Discussed with: jhb Tested by: pho
|
| #
3f0a0612 |
| 18-Jan-2017 |
Mateusz Guzik <[email protected]> |
rwlock: reduce lock accesses similarly to r311172
Discussed with: jhb Tested by: pho (previous version)
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
fc4f686d |
| 01-Jun-2016 |
Mateusz Guzik <[email protected]> |
Microoptimize locking primitives by avoiding unnecessary atomic ops.
Inline version of primitives do an atomic op and if it fails they fallback to actual primitives, which immediately retry the atom
Microoptimize locking primitives by avoiding unnecessary atomic ops.
Inline version of primitives do an atomic op and if it fails they fallback to actual primitives, which immediately retry the atomic op.
The obvious optimisation is to check if the lock is free and only then proceed to do an atomic op.
Reviewed by: jhb, vangyzen
show more ...
|
|
Revision tags: release/10.3.0, release/10.2.0 |
|
| #
de2c95cc |
| 19-Jul-2015 |
Mark Johnston <[email protected]> |
Consistently use a reader/writer flag for lockstat probes in rwlock(9) and sx(9), rather than using the probe function name to determine whether a given lock is a read lock or a write lock. Update lo
Consistently use a reader/writer flag for lockstat probes in rwlock(9) and sx(9), rather than using the probe function name to determine whether a given lock is a read lock or a write lock. Update lockstat(1) accordingly.
show more ...
|
| #
32cd0147 |
| 19-Jul-2015 |
Mark Johnston <[email protected]> |
Implement the lockstat provider using SDT(9) instead of the custom provider in lockstat.ko. This means that lockstat probes now have typed arguments and will utilize SDT probe hot-patching support wh
Implement the lockstat provider using SDT(9) instead of the custom provider in lockstat.ko. This means that lockstat probes now have typed arguments and will utilize SDT probe hot-patching support when it arrives.
Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D2993
show more ...
|
| #
fd07ddcf |
| 13-Dec-2014 |
Dmitry Chagin <[email protected]> |
Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9). A _NEW flag passed to _init_flags() to avoid check for double-init.
Differential Revision: https://reviews.freebsd.org/D1208 Reviewed by: jhb
Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9). A _NEW flag passed to _init_flags() to avoid check for double-init.
Differential Revision: https://reviews.freebsd.org/D1208 Reviewed by: jhb, wblock MFC after: 1 Month
show more ...
|
|
Revision tags: release/10.1.0, release/9.3.0 |
|
| #
e432d5f6 |
| 05-Feb-2014 |
John Baldwin <[email protected]> |
Drop the 3rd clause from all 3 clause BSD licenses where I am the sole holder to convert them to 2 clause BSD licenses.
MFC after: 1 week
|
| #
3a6cdc4e |
| 28-Jan-2014 |
John-Mark Gurney <[email protected]> |
fix spelling of lock_initialized.. jhb approved..
MFC after: 1 week
|
|
Revision tags: release/10.0.0 |
|
| #
54366c0b |
| 25-Nov-2013 |
Attilio Rao <[email protected]> |
- For kernel compiled only with KDTRACE_HOOKS and not any lock debugging option, unbreak the lock tracing release semantic by embedding calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the in
- For kernel compiled only with KDTRACE_HOOKS and not any lock debugging option, unbreak the lock tracing release semantic by embedding calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the inlined version of the releasing functions for mutex, rwlock and sxlock. Failing to do so skips the lockstat_probe_func invokation for unlocking. - As part of the LOCKSTAT support is inlined in mutex operation, for kernel compiled without lock debugging options, potentially every consumer must be compiled including opt_kdtrace.h. Fix this by moving KDTRACE_HOOKS into opt_global.h and remove the dependency by opt_kdtrace.h for all files, as now only KDTRACE_FRAMES is linked there and it is only used as a compile-time stub [0].
[0] immediately shows some new bug as DTRACE-derived support for debug in sfxge is broken and it was never really tested. As it was not including correctly opt_kdtrace.h before it was never enabled so it was kept broken for a while. Fix this by using a protection stub, leaving sfxge driver authors the responsibility for fixing it appropriately [1].
Sponsored by: EMC / Isilon storage division Discussed with: rstone [0] Reported by: rstone [1] Discussed with: philip
show more ...
|
|
Revision tags: release/9.2.0, release/8.4.0 |
|
| #
24e48c6d |
| 04-Mar-2013 |
Davide Italiano <[email protected]> |
MFcalloutng: Introduce sbt variants of msleep(), msleep_spin(), pause(), tsleep() in the KPI, allowing to specify timeout in 'sbintime_t' rather than ticks.
Sponsored by: Google Summer of Code 2012,
MFcalloutng: Introduce sbt variants of msleep(), msleep_spin(), pause(), tsleep() in the KPI, allowing to specify timeout in 'sbintime_t' rather than ticks.
Sponsored by: Google Summer of Code 2012, iXsystems inc. Tested by: flo, marius, ian, markj, Fabian Keil
show more ...
|
|
Revision tags: release/9.1.0 |
|
| #
19d41533 |
| 03-Nov-2012 |
Attilio Rao <[email protected]> |
Merge r242395,242483 from mutex implementation: give rwlock(9) the ability to crunch different type of structures, with the only constraint that they have a lock cookie named rw_lock. This name, then
Merge r242395,242483 from mutex implementation: give rwlock(9) the ability to crunch different type of structures, with the only constraint that they have a lock cookie named rw_lock. This name, then, becames reserved from the struct that wants to use the rwlock(9) KPI and other locking primitives cannot reuse it for their members.
Namely such structs are the current struct rwlock and the new struct rwlock_padalign. The new structure will define an object which has the same layout of a struct rwlock but will be allocated in areas aligned to the cache line size and will be as big as a cache line.
For further details check comments on above mentioned revisions.
Reviewed by: jimharris, jeff
show more ...
|
|
Revision tags: release/8.3.0, release/7.4.0, release/8.2.0, release/8.1.0, release/7.3.0, release/8.0.0 |
|
| #
3f4609ac |
| 12-Oct-2009 |
Attilio Rao <[email protected]> |
MFC r197643, r197735: When releasing a read/shared lock we need to use a write memory barrier in order to avoid, on architectures which doesn't have strong ordered writes, CPU instructions reordering
MFC r197643, r197735: When releasing a read/shared lock we need to use a write memory barrier in order to avoid, on architectures which doesn't have strong ordered writes, CPU instructions reordering.
Approved by: re (kib)
show more ...
|
| #
d576deed |
| 16-Nov-2011 |
Pawel Jakub Dawidek <[email protected]> |
Constify arguments for locking KPIs where possible.
This enables locking consumers to pass their own structures around as const and be able to assert locks embedded into those structures.
Reviewed
Constify arguments for locking KPIs where possible.
This enables locking consumers to pass their own structures around as const and be able to assert locks embedded into those structures.
Reviewed by: ed, kib, jhb
show more ...
|
| #
ddce63ca |
| 30-Sep-2009 |
Attilio Rao <[email protected]> |
When releasing a read/shared lock we need to use a write memory barrier in order to avoid, on architectures which doesn't have strong ordered writes, CPU instructions reordering.
Diagnosed by: fabio
When releasing a read/shared lock we need to use a write memory barrier in order to avoid, on architectures which doesn't have strong ordered writes, CPU instructions reordering.
Diagnosed by: fabio Reviewed by: jhb Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
show more ...
|
| #
a5aedd68 |
| 26-May-2009 |
Stacey Son <[email protected]> |
Add the OpenSolaris dtrace lockstat provider. The lockstat provider adds probes for mutexes, reader/writer and shared/exclusive locks to gather contention statistics and other locking information fo
Add the OpenSolaris dtrace lockstat provider. The lockstat provider adds probes for mutexes, reader/writer and shared/exclusive locks to gather contention statistics and other locking information for dtrace scripts, the lockstat(1M) command and other potential consumers.
Reviewed by: attilio jhb jb Approved by: gnn (mentor)
show more ...
|
|
Revision tags: release/7.2.0, release/7.1.0 |
|
| #
e1d881ba |
| 08-Dec-2008 |
Kip Macy <[email protected]> |
add RW_SYSINIT_FLAGS macro and rw_sysinit_flags initialization function
|
|
Revision tags: release/6.4.0 |
|
| #
90356491 |
| 15-May-2008 |
Attilio Rao <[email protected]> |
- Embed the recursion counter for any locking primitive directly in the lock_object, using an unified field called lo_data. - Replace lo_type usage with the w_name usage and at init time pass the
- Embed the recursion counter for any locking primitive directly in the lock_object, using an unified field called lo_data. - Replace lo_type usage with the w_name usage and at init time pass the lock "type" directly to witness_init() from the parent lock init function. Handle delayed initialization before than witness_initialize() is called through the witness_pendhelp structure. - Axe out LO_ENROLLPEND as it is not really needed. The case where the mutex init delayed wants to be destroyed can't happen because witness_destroy() checks for witness_cold and panic in case. - In enroll(), if we cannot allocate a new object from the freelist, notify that to userspace through a printf(). - Modify the depart function in order to return nothing as in the current CVS version it always returns true and adjust callers accordingly. - Fix the witness_addgraph() argument name prototype. - Remove unuseful code from itismychild().
This commit leads to a shrinked struct lock_object and so smaller locks, in particular on amd64 where 2 uintptr_t (16 bytes per-primitive) are gained.
Reviewed by: jhb
show more ...
|