<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/sys/kern/kern_lock.c, branch trunk</title>
<subtitle>NetBSD fork for lockdoc analysis</subtitle>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/'/>
<entry>
<title>Revert unintentional changes to kern_lock.c in previous commit.</title>
<updated>2023-07-07T18:02:52+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2023-07-07T18:02:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=f0b07974431e15088bc38f5695ef7c1f9da599f8'/>
<id>f0b07974431e15088bc38f5695ef7c1f9da599f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>heartbeat(9): Test whether curcpu is stable, not kpreempt_disabled.</title>
<updated>2023-07-07T17:05:13+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2023-07-07T17:05:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=afa0f868fead1cc486bacdbb818c375a027680d5'/>
<id>afa0f868fead1cc486bacdbb818c375a027680d5</id>
<content type='text'>
kpreempt_disabled worked for my testing because I tested on aarch64,
which doesn't have kpreemption.

XXX Should move curcpu_stable() to somewhere that other things can
use it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kpreempt_disabled worked for my testing because I tested on aarch64,
which doesn't have kpreemption.

XXX Should move curcpu_stable() to somewhere that other things can
use it.</pre>
</div>
</content>
</entry>
<entry>
<title>ASSERT_SLEEPABLE(9): Micro-optimize this a little bit.</title>
<updated>2023-04-09T08:17:36+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2023-04-09T08:17:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=907a0068363167012fad06baf50f5eeca4c2de68'/>
<id>907a0068363167012fad06baf50f5eeca4c2de68</id>
<content type='text'>
This convinces gcc to do less -- make a smaller stack frame, compute
fewer conditional moves in favour of predicted-not-taken branches --
in the fast path where we are sleepable as the caller expects.

Wasn't able to convince it to do the ncsw loop with a
predicted-not-taken branch, but let's leave the __predict_false in
there anyway because it's still a good prediction.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This convinces gcc to do less -- make a smaller stack frame, compute
fewer conditional moves in favour of predicted-not-taken branches --
in the fast path where we are sleepable as the caller expects.

Wasn't able to convince it to do the ncsw loop with a
predicted-not-taken branch, but let's leave the __predict_false in
there anyway because it's still a good prediction.</pre>
</div>
</content>
</entry>
<entry>
<title>KERNEL_LOCK(9): Minor tweaks to ci-&gt;ci_biglock_wanted access.</title>
<updated>2023-02-23T14:57:29+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2023-02-23T14:57:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=c80a96d912fd5f1f5eaafc8136c27387c98469b9'/>
<id>c80a96d912fd5f1f5eaafc8136c27387c98469b9</id>
<content type='text'>
1. Use atomic_load_relaxed to read ci-&gt;ci_biglock_wanted from another
   CPU, for clarity and to avoid the appearance of data races in thread
   sanitizers.  (Reading ci-&gt;ci_biglock_wanted on the local CPU need
   not be atomic because no other CPU can be writing to it.)

2. Use atomic_store_relaxed to update ci-&gt;ci_biglock_wanted when we
   start to spin, to avoid the appearance of data races.

3. Add comments to explain what's going on and cross-reference the
   specific matching membars in mutex_vector_enter.

related to PR kern/57240</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Use atomic_load_relaxed to read ci-&gt;ci_biglock_wanted from another
   CPU, for clarity and to avoid the appearance of data races in thread
   sanitizers.  (Reading ci-&gt;ci_biglock_wanted on the local CPU need
   not be atomic because no other CPU can be writing to it.)

2. Use atomic_store_relaxed to update ci-&gt;ci_biglock_wanted when we
   start to spin, to avoid the appearance of data races.

3. Add comments to explain what's going on and cross-reference the
   specific matching membars in mutex_vector_enter.

related to PR kern/57240</pre>
</div>
</content>
</entry>
<entry>
<title>Sprinkle __predict_{true,false} for panicstr checks</title>
<updated>2023-01-27T09:28:41+00:00</updated>
<author>
<name>ozaki-r</name>
<email>ozaki-r@NetBSD.org</email>
</author>
<published>2023-01-27T09:28:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=f53cb1fd07c700be344c982dbc607c13d6fa61a4'/>
<id>f53cb1fd07c700be344c982dbc607c13d6fa61a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>kern/kern_lock.c: We get start_init_exec from sys/kernel.h now.</title>
<updated>2022-10-26T23:28:18+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2022-10-26T23:28:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=3f05cc83979dce5b1db0de091c2475a83a5a38a4'/>
<id>3f05cc83979dce5b1db0de091c2475a83a5a38a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>KERNEL_LOCK(9): Avoid spinning out until 10sec have passed.</title>
<updated>2022-09-13T09:28:05+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2022-09-13T09:28:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=b9ef920af930ff3e2d8ea960c5ea456ed09a6235'/>
<id>b9ef920af930ff3e2d8ea960c5ea456ed09a6235</id>
<content type='text'>
This means we'll never spin out if the hardclock timer is stuck.  But
the hardclock timer never runs with the kernel lock held itself, so
it's not immediately clear that's important.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This means we'll never spin out if the hardclock timer is stuck.  But
the hardclock timer never runs with the kernel lock held itself, so
it's not immediately clear that's important.</pre>
</div>
</content>
</entry>
<entry>
<title>KERNEL_LOCK(9): Restore backoff while spinning in !LOCKDEBUG case.</title>
<updated>2022-09-13T09:14:26+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2022-09-13T09:14:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=1215e74304bf30b403eec90e6dfaafaca9b6bdc1'/>
<id>1215e74304bf30b403eec90e6dfaafaca9b6bdc1</id>
<content type='text'>
When the spinout logic was put under LOCKDEBUG among a series of
other changes that got reverted, the backoff was inadvertently made
LOCKDEBUG-only too.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the spinout logic was put under LOCKDEBUG among a series of
other changes that got reverted, the backoff was inadvertently made
LOCKDEBUG-only too.</pre>
</div>
</content>
</entry>
<entry>
<title>KERNEL_LOCK(9): Limit ipi trace diagnostic to after init has started.</title>
<updated>2022-08-20T23:37:12+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2022-08-20T23:37:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=da555fcb12b61b39bc75acb1806b37ec5f0ab095'/>
<id>da555fcb12b61b39bc75acb1806b37ec5f0ab095</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>KERNEL_LOCK(9): Fix previous for non-LOCKDEBUG builds.</title>
<updated>2022-08-16T21:23:37+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2022-08-16T21:23:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=b3176804eabc606be4120b856523191264c20006'/>
<id>b3176804eabc606be4120b856523191264c20006</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
