Skip to contentSkip to conversation

memory-barriers.txt: Sort wait_event* and wait_on_bit* list alphabetically

PATCH Applied Akira Yokosawa 3 participants 3 messages Nov 5, 2025

Subsystems (2)
lore
Share & tools
lore

Akira Yokosawa

author reviewer
#0 lore raw

PATCH 1/1 memory-barriers.txt: Sort wait_event* and wait_on_bit* list alphabetically

Commit 88172700423c ("docs/memory-barriers.txt: Add wait_event_cmd() and wait_event_exclusive_cmd()") added two APIs without taking care of the list order. Sort the list for readability.

While there, make it clear that this is incomplete by saying "for example".

---
Hi Paul,

Looks like there is no pending change for v6.19 in LKMM.

I think this minor tweak is worth having, if it is not too late.

Thanks, Akira
--

 Documentation/memory-barriers.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/memory-barriers.txt +3 -3
index 1d164e005776..61b7317bcf2e 100644
@@ -2182,9 +2182,11 @@ set_current_state() may be wrapped by:
 
 which therefore also imply a general memory barrier after setting the state.
 The whole sequence above is available in various canned forms, all of which
-interpolate the memory barrier in the right place:
+interpolate the memory barrier in the right place, for example:
 
 	wait_event();
+	wait_event_cmd();
+	wait_event_exclusive_cmd();
 	wait_event_interruptible();
 	wait_event_interruptible_exclusive();
 	wait_event_interruptible_timeout();
@@ -2192,8 +2194,6 @@ interpolate the memory barrier in the right place:
 	wait_event_timeout();
 	wait_on_bit();
 	wait_on_bit_lock();
-	wait_event_cmd();
-	wait_event_exclusive_cmd();
 
 
 Secondly, code that performs a wake up normally follows something like this:

base-commit: 4356abc63687c65a86ab709db96470540441e822

Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Akira-san,

Quoted 10 lines · Akira Yokosawa

Commit 88172700423c ("docs/memory-barriers.txt: Add wait_event_cmd() and wait_event_exclusive_cmd()") added two APIs without taking care of the list order. Sort the list for readability.

While there, make it clear that this is incomplete by saying "for example".

LGTM, so:

Thxs, Håkon

Quoted 43 lines

---
Hi Paul,

Looks like there is no pending change for v6.19 in LKMM.

I think this minor tweak is worth having, if it is not too late.

Thanks, Akira
--
Documentation/memory-barriers.txt | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/memory-barriers.txt +0 -0
index 1d164e005776..61b7317bcf2e 100644
@@ -2182,9 +2182,11 @@ set_current_state() may be wrapped by:
 

which therefore also imply a general memory barrier after setting the state. The whole sequence above is available in various canned forms, all of which

Documentation/memory-barriers.txt +1 -1
-interpolate the memory barrier in the right place:
+interpolate the memory barrier in the right place, for example:

wait_event();
+ wait_event_cmd();
+ wait_event_exclusive_cmd();
wait_event_interruptible();
wait_event_interruptible_exclusive();
wait_event_interruptible_timeout();

Documentation/memory-barriers.txt +0 -2
@@ -2192,8 +2194,6 @@ interpolate the memory barrier in the right place:
 wait_event_timeout();
 wait_on_bit();
 wait_on_bit_lock();
- wait_event_cmd();
- wait_event_exclusive_cmd();
 
 

Secondly, code that performs a wake up normally follows something like this:

base-commit: 4356abc63687c65a86ab709db96470540441e822

Signature · 1 line
2.43.0
maintainer Applied
#2 lore raw
Quoted 8 lines · Haakon Bugge

Hi Akira-san,

Quoted 6 lines · Akira Yokosawa

Commit 88172700423c ("docs/memory-barriers.txt: Add wait_event_cmd() and wait_event_exclusive_cmd()") added two APIs without taking care of the list order. Sort the list for readability.

Quoted 8 lines
Quoted 4 lines

While there, make it clear that this is incomplete by saying "for example".

LGTM, so:

Queued, maybe even for the upcoming merge window, thank you both!

Thanx, Paul

Quoted 47 lines

Thxs, Håkon

Quoted 43 lines

---
Hi Paul,

Looks like there is no pending change for v6.19 in LKMM.

I think this minor tweak is worth having, if it is not too late.

Thanks, Akira
--
Documentation/memory-barriers.txt | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/memory-barriers.txt +0 -0
index 1d164e005776..61b7317bcf2e 100644
@@ -2182,9 +2182,11 @@ set_current_state() may be wrapped by:
 

which therefore also imply a general memory barrier after setting the state. The whole sequence above is available in various canned forms, all of which

Documentation/memory-barriers.txt +1 -1
-interpolate the memory barrier in the right place:
+interpolate the memory barrier in the right place, for example:

wait_event();
+ wait_event_cmd();
+ wait_event_exclusive_cmd();
wait_event_interruptible();
wait_event_interruptible_exclusive();
wait_event_interruptible_timeout();

Documentation/memory-barriers.txt +0 -2
@@ -2192,8 +2194,6 @@ interpolate the memory barrier in the right place:
 wait_event_timeout();
 wait_on_bit();
 wait_on_bit_lock();
- wait_event_cmd();
- wait_event_exclusive_cmd();
 
 

Secondly, code that performs a wake up normally follows something like this:

base-commit: 4356abc63687c65a86ab709db96470540441e822

Signature · 1 line
2.43.0