]> www.infradead.org Git - users/jedix/linux-maple.git/commit
batman-adv: Remove atomic usage for tt.local_changes
authorRemi Pommarel <repk@triplefau.lt>
Fri, 22 Nov 2024 15:52:51 +0000 (16:52 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Thu, 5 Dec 2024 21:38:43 +0000 (22:38 +0100)
commit8587e0e3f562b09bbfe0df1b0c506066095043e4
tree4bc90ab1caa40b2a41caf57de598bd7c534c14fd
parenta7d5100ed0099a9f21b796017908cc7ece5332e4
batman-adv: Remove atomic usage for tt.local_changes

The tt.local_changes atomic is either written with tt.changes_list_lock
or close to it (see batadv_tt_local_event()). Thus the performance gain
using an atomic was limited (or because of atomic_read() impact even
negative). Using atomic also comes with the need to be wary of potential
negative tt.local_changes value.

Simplify the tt.local_changes usage by removing the atomic property and
modifying it only with tt.changes_list_lock held.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/soft-interface.c
net/batman-adv/translation-table.c
net/batman-adv/types.h