Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

s390/pkey: Add comment about synchronize_rcu() to pkey base

Add a comment about the use of the synchronize_rcu() invocation.
There are two invocations of the synchronize_rcu() call in the
pkey base code. On one place it is optional but used to enforce
a fast path update to the other CPUs. As some people and code
checkers complain about this redundant invocation the suggestion
came up to add a comment to explain why the call is meaningful
at that place.

Closes: https://lore.kernel.org/linux-s390/20260313052312.2389-1-lirongqing@baidu.com/
Suggested-by: Li Rongqing <lirongqing@baidu.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Harald Freudenberger and committed by
Vasily Gorbik
e3d074b5 052abf9a

+7
+7
drivers/s390/crypto/pkey_base.c
··· 60 60 61 61 list_add_rcu(&handler->list, &handler_list); 62 62 spin_unlock(&handler_list_write_lock); 63 + /* 64 + * Fast path to push the info about the updated list to the other 65 + * CPUs. If removed, the other CPUs may get the updated list when the 66 + * RCU context is synched. As this code is in general not performance 67 + * critical and the list update mostly only occurs at the early time in 68 + * system startup the focus is on concurrency versus performance. 69 + */ 63 70 synchronize_rcu(); 64 71 65 72 module_put(handler->module);