History log of /freebsd/sys/kern/kern_sx.c (Results 76 – 100 of 337)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 0108a980 17-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

sx: fix compilation on UP kernels after r313855

sx primitives use inlines as opposed to macros. Change the tested condition
to LOCK_DEBUG which covers the case, but is slightly overzelaous.

Reporte

sx: fix compilation on UP kernels after r313855

sx primitives use inlines as opposed to macros. Change the tested condition
to LOCK_DEBUG which covers the case, but is slightly overzelaous.

Reported by: kib

show more ...


# ffd5c94c 17-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

locks: let primitives for modules unlock without always goging to the slsow path

It is only needed if the LOCK_PROFILING is enabled. It has to always check if
the lock is about to be released which

locks: let primitives for modules unlock without always goging to the slsow path

It is only needed if the LOCK_PROFILING is enabled. It has to always check if
the lock is about to be released which requires an avoidable read if the option
is not specified..

show more ...


# afa39f7a 17-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

locks: remove SCHEDULER_STOPPED checks from primitives for modules

They all fallback to the slow path if necessary and the check is there.

This means a panicked kernel executing code from modules w

locks: remove SCHEDULER_STOPPED checks from primitives for modules

They all fallback to the slow path if necessary and the check is there.

This means a panicked kernel executing code from modules will be able to
succeed doing actual lock/unlock, but this was already the case for core code
which has said primitives inlined.

show more ...


# 1a36faad 11-Feb-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r313301 through r313643.


# 3b3cf014 09-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

locks: tidy up unlock fallback paths

Update comments to note these functions are reachable if lockstat is
enabled.

Check if the lock has any bits set before attempting unlock, which saves
an unnece

locks: tidy up unlock fallback paths

Update comments to note these functions are reachable if lockstat is
enabled.

Check if the lock has any bits set before attempting unlock, which saves
an unnecessary atomic operation.

show more ...


# 834f70f3 08-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

sx: implement slock/sunlock fast path

See r313454.


# 4a2dbde7 07-Feb-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r313398


# 8e5a3e9a 07-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

locks: change backoff to exponential

Previous implementation would use a random factor to spread readers and
reduce chances of starvation. This visibly reduces effectiveness of the
mechanism.

Switc

locks: change backoff to exponential

Previous implementation would use a random factor to spread readers and
reduce chances of starvation. This visibly reduces effectiveness of the
mechanism.

Switch to the more traditional exponential variant. Try to limit starvation
by imposing an upper limit of spins after which spinning is half of what
other threads get. Note the mechanism is turned off by default.

Reviewed by: kib (previous version)

show more ...


# 15df32b4 07-Feb-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r313360


# c1aaf63c 06-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

locks: fix recursion support after recent changes

When a relevant lockstat probe is enabled the fallback primitive is called with
a constant signifying a free lock. This works fine for typical cases

locks: fix recursion support after recent changes

When a relevant lockstat probe is enabled the fallback primitive is called with
a constant signifying a free lock. This works fine for typical cases but breaks
with recursion, since it checks if the passed value is that of the executing
thread.

Read the value if necessary.

show more ...


# f9edb084 05-Feb-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r313055 through r313300.


# 6ebb77b6 05-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

sx: move lockstat handling out of inline primitives

See r313275 for details.


# 3ae56ce9 05-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

sx: add witness support missed in r313272


# 9d2e4290 05-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

sx: uninline slock/sunlock

Shared locking routines explicitly read the value and test it. If the
change attempt fails, they fall back to a regular function which would
retry in a loop.

The problem

sx: uninline slock/sunlock

Shared locking routines explicitly read the value and test it. If the
change attempt fails, they fall back to a regular function which would
retry in a loop.

The problem is that with many concurrent readers the risk of failure is pretty
high and even the value returned by fcmpset is very likely going to be stale
by the time the loop in the fallback routine is reached.

Uninline said primitives. It gives a throughput increase when doing concurrent
slocks/sunlocks with 80 hardware threads from ~50 mln/s to ~56 mln/s.

Interestingly, rwlock primitives are already not inlined.

show more ...


# fa474043 05-Feb-2017 Mateusz Guzik <mjg@FreeBSD.org>

sx: switch to fcmpset

Discussed with: jhb
Tested by: pho (previous version)


# 9b3ece1c 04-Feb-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r313243


# 14f850f3 27-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r312720 through r312893.


# 29051116 27-Jan-2017 Mateusz Guzik <mjg@FreeBSD.org>

Sprinkle __read_mostly on backoff and lock profiling code.

MFC after: 1 month


# a4aa656a 22-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r312309 through r312623.


# c5f61e6f 18-Jan-2017 Mateusz Guzik <mjg@FreeBSD.org>

sx: reduce lock accesses similarly to r311172

Discussed with: jhb
Tested by: pho (previous version)


# 5b18539f 10-Dec-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r309758 through r309803.


# c365a293 10-Dec-2016 Mark Johnston <markj@FreeBSD.org>

Return a non-NULL owner only if the lock is exclusively held in owner_sx().

Fix some whitespace bugs while here.

MFC after: 2 weeks


Revision tags: release/11.0.1, release/11.0.0
# 27067774 16-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r303250 through r304235.


# 0453ade5 03-Aug-2016 Mateusz Guzik <mjg@FreeBSD.org>

locks: fix sx compilation on mips after r303643

The kernel.h header is required for the SYSINIT macro, which apparently
was present on amd64 by accident.

Reported by: kib


# fa5000a4 02-Aug-2016 Mateusz Guzik <mjg@FreeBSD.org>

locks: fix compilation for KDTRACE_HOOKS && !ADAPTIVE_* case

Reported by: Michael Butler <imb protected-networks.net>


12345678910>>...14