<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/dlm/lock.h, branch linux-6.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-04-16T19:40:27Z</updated>
<entry>
<title>dlm: drop dlm_scand kthread and use timers</title>
<updated>2024-04-16T19:40:27Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2024-04-15T18:39:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1f2381c1a8d52b973944090ed8b42c750152533'/>
<id>urn:sha1:b1f2381c1a8d52b973944090ed8b42c750152533</id>
<content type='text'>
Currently the scand kthread acts like a garbage collection for expired
rsbs on toss list, to clean them up after a certain timeout. It triggers
every couple of seconds and iterates over the toss list while holding
ls_rsbtbl_lock for the whole hash bucket iteration.

To reduce the amount of time holding ls_rsbtbl_lock, we now handle the
disposal of expired rsbs using a per-lockspace timer that expires for the
earliest tossed rsb on the lockspace toss queue. This toss queue is
ordered according to the rsb res_toss_time with the earliest tossed rsb
as the first entry. The toss timer will only trylock() necessary locks,
since it is low priority garbage collection, and will rearm the timer
if trylock() fails. If the timer function does not find any expired
rsb's, it rearms the timer with the next earliest expired rsb.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: do not use ref counts for rsb in the toss state</title>
<updated>2024-04-16T19:34:39Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2024-04-15T18:39:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6644925abf056030cd9efc73fc05ea5a5df4f59f'/>
<id>urn:sha1:6644925abf056030cd9efc73fc05ea5a5df4f59f</id>
<content type='text'>
In the past we had problems when an rsb had a reference counter greater
than one while in the toss state.  An rsb in the toss state is not
actively used for locking, and should not have any other references
apart from the single ref keeping it on the rsb hash.  Shift to freeing
rsb's directly rather than using kref_put to free them, since the ref
counting is not meant to be used in this state.  Add warnings if ref
counting is seen while an rsb is in the toss state.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: switch to use rhashtable for rsbs</title>
<updated>2024-04-16T19:34:39Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2024-04-15T18:39:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c648035cbe75d78836f6d7d2fdd9d996048a66b'/>
<id>urn:sha1:6c648035cbe75d78836f6d7d2fdd9d996048a66b</id>
<content type='text'>
Replace our own hash table with the more advanced rhashtable
for keeping rsb structs.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: use spin_lock_bh for message processing</title>
<updated>2024-04-09T16:45:23Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2024-04-02T19:18:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=578acf9a87a87531df5b59b3799ccc1256a4bbcc'/>
<id>urn:sha1:578acf9a87a87531df5b59b3799ccc1256a4bbcc</id>
<content type='text'>
Use spin_lock_bh for all spinlocks involved in message processing,
in preparation for softirq message processing.  DLM lock requests
from user space involve dlm processing in user context, in addition
to the standard kernel context, necessitating bh variants.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: convert res_lock to spinlock</title>
<updated>2024-04-09T16:44:49Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2024-04-02T19:18:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc396e2355b5ca6e1aee005f3ce99bab8f37f5ff'/>
<id>urn:sha1:cc396e2355b5ca6e1aee005f3ce99bab8f37f5ff</id>
<content type='text'>
Convert the rsb struct res_lock from a mutex to a spinlock
in preparation for processing messages in softirq context.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: drop mutex use in waiters recovery</title>
<updated>2024-04-09T16:44:49Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2024-04-02T19:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b52ea7916036cb01e7e37153f5e0ad342add765'/>
<id>urn:sha1:6b52ea7916036cb01e7e37153f5e0ad342add765</id>
<content type='text'>
The waiters_mutex no longer needs to be used in the waiters recovery
functions dlm_recover_waiters_pre() and dlm_recover_waiters_pre().
During recovery, ordinary locking operations are paused, and the
recovery thread is the only context accessing the waiters list,
so the lock is not needed.

Access to the waiters list from debugfs functions is avoided by
taking the top level recovery lock in the debugfs dump function.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>dlm: move rsb root_list to ls_recover() stack</title>
<updated>2024-04-09T16:44:49Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2024-04-02T19:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a747f4a2ee85d51b905e2df940de4a924f8060a'/>
<id>urn:sha1:3a747f4a2ee85d51b905e2df940de4a924f8060a</id>
<content type='text'>
Move the rsb root_list from the lockspace to a stack variable since
it is now only used by the ls_recover() function.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: constify receive buffer</title>
<updated>2023-08-10T15:33:03Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-08-01T18:09:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1151935182b40bbe398905850f6f7f4fbb262e06'/>
<id>urn:sha1:1151935182b40bbe398905850f6f7f4fbb262e06</id>
<content type='text'>
The dlm receive buffer should be never manipulated as DLM is the last
instance of parsing layer. This patch constify the whole receive buffer
so we are sure it never gets manipulated when it's being parsed.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: drop rxbuf manipulation in dlm_recover_master_copy</title>
<updated>2023-08-10T15:33:03Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-08-01T18:09:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9d2f6ada0083bad46f37a1238fea718b575e0fa'/>
<id>urn:sha1:b9d2f6ada0083bad46f37a1238fea718b575e0fa</id>
<content type='text'>
Currently dlm_recover_master_copy() manipulates the receive buffer of an
rcom lock message and modifies it on the fly so a later memcpy() to a
new rcom message with the same message has those new values. This patch
avoids manipulating the received rcom message by store the values for
the new rcom message in paremter assigned with call by reference. Later
when dlm_send_rcom_lock() constructs a new message and memcpy() the
receive buffer those values will be set on the new constructed message.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>fs: dlm: get recovery sequence number as parameter</title>
<updated>2023-08-10T15:33:03Z</updated>
<author>
<name>Alexander Aring</name>
</author>
<published>2023-08-01T18:09:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4f4e135c27b503d325d414819831909023b113d'/>
<id>urn:sha1:c4f4e135c27b503d325d414819831909023b113d</id>
<content type='text'>
This patch removes a read of the ls-&gt;ls_recover_seq uint64_t number in
_create_rcom(). If the ls-&gt;ls_recover_seq is readed the ls_recover_lock
need to held. However this number was always readed before when any rcom
message is received and it's not necessary to read it again from a per
lockspace variable to use it for the replying message. This patch will
pass the sequence number as parameter so another read of ls-&gt;ls_recover_seq
and holding the ls-&gt;ls_recover_lock is not required.

Signed-off-by: Alexander Aring &lt;aahringo@redhat.com&gt;
Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
</feed>
