<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/bcachefs/six.c, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-11-15T04:44:44Z</updated>
<entry>
<title>bcachefs: six locks: Fix lost wakeup</title>
<updated>2023-11-15T04:44:44Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-11-14T23:52:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61b85cb0d773115d9a4b20c3e67286844cf73f34'/>
<id>urn:sha1:61b85cb0d773115d9a4b20c3e67286844cf73f34</id>
<content type='text'>
In percpu reader mode, trylock() for read had a lost wakeup: on failure
to get the lock, we may have caused a writer to fail to get the lock,
because we temporarily elevated the reader count.

We need to check for waiters after decrementing the read count - not
before.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>six locks: Lock contended tracepoints</title>
<updated>2023-10-31T02:26:45Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-02-05T21:18:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=20e425d301d673dbd5df0c9d4b186c70b43813bb'/>
<id>urn:sha1:20e425d301d673dbd5df0c9d4b186c70b43813bb</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix W=12 build errors</title>
<updated>2023-10-22T21:10:13Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-09-12T22:41:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96dea3d599dbc31f59eb786af2ac5079122beb88'/>
<id>urn:sha1:96dea3d599dbc31f59eb786af2ac5079122beb88</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: six locks: Guard against wakee exiting in __six_lock_wakeup()</title>
<updated>2023-10-22T21:10:10Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-08-12T21:10:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f854ce4d0a3f7281b5b99b28dd028abe21c1b0c8'/>
<id>urn:sha1:f854ce4d0a3f7281b5b99b28dd028abe21c1b0c8</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: six locks: Fix missing barrier on wait-&gt;lock_acquired</title>
<updated>2023-10-22T21:10:10Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-08-12T19:05:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c294ea50da4b1a0ee84253f46391aa87a6efe91c'/>
<id>urn:sha1:c294ea50da4b1a0ee84253f46391aa87a6efe91c</id>
<content type='text'>
Six locks do lock handoff via the wakeup path: the thread doing the
wakeup also takes the lock on behalf of the waiter, which means the
waiter only has to look at its waitlist entry, and doesn't have to touch
the lock cacheline while another thread is using it.

Linus noticed that this needs a real barrier, which this patch fixes.

Also add a comment for the should_sleep_fn() error path.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Boqun Feng &lt;boqun.feng@gmail.com&gt;
Cc: linux-bcachefs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
</content>
</entry>
<entry>
<title>six locks: Disable percpu read lock mode in userspace</title>
<updated>2023-10-22T21:10:02Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-06-10T14:57:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aab5e0972a32790c0dbfac64929529820114c674'/>
<id>urn:sha1:aab5e0972a32790c0dbfac64929529820114c674</id>
<content type='text'>
When running in userspace, we currently don't have a real percpu
implementation available - at least in bcachefs-tools, which is where
this code is currently used in userspace.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>six locks: Use atomic_try_cmpxchg_acquire()</title>
<updated>2023-10-22T21:10:02Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-05-25T18:35:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d9200cfe004b8208a04ea15b3967f9a14135be6'/>
<id>urn:sha1:2d9200cfe004b8208a04ea15b3967f9a14135be6</id>
<content type='text'>
This switches to a newer cmpxchg variant which updates @old for us on
failure, simplifying the cmpxchg loops a bit and supposedly generating
better code.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>six locks: Fix an unitialized var</title>
<updated>2023-10-22T21:10:02Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-05-25T22:10:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4687a4a7536c3b2139faa63e66afd1d3da5bf15'/>
<id>urn:sha1:c4687a4a7536c3b2139faa63e66afd1d3da5bf15</id>
<content type='text'>
In the conversion to atomic_t, six_lock_slowpath() ended up calling
six_lock_wakeup() in the failure path with a state variable that was
never initialized - whoops.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>six locks: Delete redundant comment</title>
<updated>2023-10-22T21:10:02Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-05-23T04:21:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96e53e909d0433f73831315b106f16895a74b843'/>
<id>urn:sha1:96e53e909d0433f73831315b106f16895a74b843</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>six locks: Tiny bit more tidying</title>
<updated>2023-10-22T21:10:02Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-05-22T16:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ab62310fd1c723bd8ab8e8242e31fa494c9681f'/>
<id>urn:sha1:2ab62310fd1c723bd8ab8e8242e31fa494c9681f</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
</feed>
