<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/sys/ufs/lfs/lfs_segment.c, branch lockdoc-10.99.5-vfs</title>
<subtitle>NetBSD fork for lockdoc analysis</subtitle>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/'/>
<entry>
<title>Reorganize b_cache logging, un-deprecate variable name logging</title>
<updated>2023-08-20T16:36:09+00:00</updated>
<author>
<name>Merlin Scholz</name>
<email>merlin@scholz.ruhr</email>
</author>
<published>2023-08-20T16:36:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=6545533869a1eba7272e380cbf5ca103e9181251'/>
<id>6545533869a1eba7272e380cbf5ca103e9181251</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add logging for buf-&gt;b_cflags BC_BUSY changes</title>
<updated>2023-08-19T17:16:22+00:00</updated>
<author>
<name>Merlin Scholz</name>
<email>merlin@scholz.ruhr</email>
</author>
<published>2023-08-19T17:16:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=e7b3826cda40b7e543318c19b9093dcceb8b4237'/>
<id>e7b3826cda40b7e543318c19b9093dcceb8b4237</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Round of uvm.h cleanup.</title>
<updated>2020-09-05T16:30:10+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2020-09-05T16:30:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=ea5c7e85427a9de37fe4c35c5e918eacd435116f'/>
<id>ea5c7e85427a9de37fe4c35c5e918eacd435116f</id>
<content type='text'>
The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
  to query whether curlwp is the pagedaemon, which should maybe be
  exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
  by it.  We should split up uvm_extern.h but this will serve for now
  to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
  UVMHIST(ubchist), since ubchist is declared in uvm.h but the
  reference evaporates if UVMHIST is not defined, so we reduce header
  file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
  here.

ok chs@</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
  to query whether curlwp is the pagedaemon, which should maybe be
  exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
  by it.  We should split up uvm_extern.h but this will serve for now
  to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
  UVMHIST(ubchist), since ubchist is declared in uvm.h but the
  reference evaporates if UVMHIST is not defined, so we reduce header
  file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
  here.

ok chs@</pre>
</div>
</content>
</entry>
<entry>
<title>Skip unlinked inodes.</title>
<updated>2020-08-13T17:26:43+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2020-08-13T17:26:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=47e296faa2ee14ca41b13ec9c7986ea1833bc5b1'/>
<id>47e296faa2ee14ca41b13ec9c7986ea1833bc5b1</id>
<content type='text'>
They no longer matter on disk so we don't need to write anything out
for them.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They no longer matter on disk so we don't need to write anything out
for them.</pre>
</div>
</content>
</entry>
<entry>
<title>UVM locking changes, proposed on tech-kern:</title>
<updated>2020-02-23T15:46:38+00:00</updated>
<author>
<name>ad</name>
<email>ad@NetBSD.org</email>
</author>
<published>2020-02-23T15:46:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=b4dac1827c2c469374a65dca7f0299eec7b980b9'/>
<id>b4dac1827c2c469374a65dca7f0299eec7b980b9</id>
<content type='text'>
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.</pre>
</div>
</content>
</entry>
<entry>
<title>Break deadlock in PR kern/52301.</title>
<updated>2020-02-23T08:40:37+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2020-02-23T08:40:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=89f9403b0dc6232ac9aaa727ebf7d901ca850b7c'/>
<id>89f9403b0dc6232ac9aaa727ebf7d901ca850b7c</id>
<content type='text'>
The lock order is lfs_writer -&gt; lfs_seglock.  The problem in 52301 is
that lfs_segwrite violates this lock order by sometimes doing
lfs_seglock -&gt; lfs_writer, either (a) when doing a checkpoint or (b),
opportunistically, when there are no dirops pending.  Both cases can
deadlock, because dirops sometimes take the seglock (lfs_truncate,
lfs_valloc, lfs_vfree):

(a) There may be dirops pending, and they may be waiting for the
seglock, so we can't wait for them to complete while holding the
seglock.

(b) The test for fs-&gt;lfs_dirops == 0 happens unlocked, and the state
may change by the time lfs_writer_enter acquires lfs_lock.

To resolve this in each case:

(a) Do lfs_writer_enter before lfs_seglock, since we will need it
unconditionally anyway.  The worst performance impact of this should
be that some dirops get delayed a little bit.

(b) Create a new lfs_writer_tryenter to use at this point so that the
test for fs-&gt;lfs_dirops == 0 and the acquisition of lfs_writer happen
atomically under lfs_lock.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The lock order is lfs_writer -&gt; lfs_seglock.  The problem in 52301 is
that lfs_segwrite violates this lock order by sometimes doing
lfs_seglock -&gt; lfs_writer, either (a) when doing a checkpoint or (b),
opportunistically, when there are no dirops pending.  Both cases can
deadlock, because dirops sometimes take the seglock (lfs_truncate,
lfs_valloc, lfs_vfree):

(a) There may be dirops pending, and they may be waiting for the
seglock, so we can't wait for them to complete while holding the
seglock.

(b) The test for fs-&gt;lfs_dirops == 0 happens unlocked, and the state
may change by the time lfs_writer_enter acquires lfs_lock.

To resolve this in each case:

(a) Do lfs_writer_enter before lfs_seglock, since we will need it
unconditionally anyway.  The worst performance impact of this should
be that some dirops get delayed a little bit.

(b) Create a new lfs_writer_tryenter to use at this point so that the
test for fs-&gt;lfs_dirops == 0 and the acquisition of lfs_writer happen
atomically under lfs_lock.</pre>
</div>
</content>
</entry>
<entry>
<title>Change some cheap KDASSERT into KASSERT.</title>
<updated>2020-02-23T08:40:08+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2020-02-23T08:40:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=73cf0e3a62bc9c5ac7b93a162e64c7da4922e453'/>
<id>73cf0e3a62bc9c5ac7b93a162e64c7da4922e453</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make LFS/rump play nice with aiodoned removal.</title>
<updated>2020-02-22T22:20:47+00:00</updated>
<author>
<name>ad</name>
<email>ad@NetBSD.org</email>
</author>
<published>2020-02-22T22:20:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=3c431958359d9ad8dac7f43f19d19cf2af5148d7'/>
<id>3c431958359d9ad8dac7f43f19d19cf2af5148d7</id>
<content type='text'>
PR kern/55004 (Hundreds of file system tests now fail on real hardware)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR kern/55004 (Hundreds of file system tests now fail on real hardware)</pre>
</div>
</content>
</entry>
<entry>
<title>remove the aiodoned thread.  I originally added this to provide a thread context</title>
<updated>2020-02-18T20:23:17+00:00</updated>
<author>
<name>chs</name>
<email>chs@NetBSD.org</email>
</author>
<published>2020-02-18T20:23:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=90b433544daf19c1f8af26e849938db15a249726'/>
<id>90b433544daf19c1f8af26e849938db15a249726</id>
<content type='text'>
for doing page cache iodone work, but since then biodone() has changed to
hand off all iodone work to a softint thread, so we no longer need the
special-purpose aiodoned thread.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for doing page cache iodone work, but since then biodone() has changed to
hand off all iodone work to a softint thread, so we no longer need the
special-purpose aiodoned thread.</pre>
</div>
</content>
</entry>
<entry>
<title>Merge from yamt-pagecache (after much testing):</title>
<updated>2020-01-15T17:55:43+00:00</updated>
<author>
<name>ad</name>
<email>ad@NetBSD.org</email>
</author>
<published>2020-01-15T17:55:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=943ff07e62593c9723356238112a54a7e90155e1'/>
<id>943ff07e62593c9723356238112a54a7e90155e1</id>
<content type='text'>
- Reduce unnecessary page scan in putpages esp. when an object has a ton of
  pages cached but only a few of them are dirty.

- Reduce the number of pmap operations by tracking page dirtiness more
  precisely in uvm layer.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Reduce unnecessary page scan in putpages esp. when an object has a ton of
  pages cached but only a few of them are dirty.

- Reduce the number of pmap operations by tracking page dirtiness more
  precisely in uvm layer.</pre>
</div>
</content>
</entry>
</feed>
