public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Harald Freudenberger <freude@linux.ibm.com>
Cc: lirongqing <lirongqing@baidu.com>,
	Holger Dengler <dengler@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH] s390/pkey: Remove synchronize_rcu from pkey_handler_register
Date: Fri, 13 Mar 2026 10:06:41 +0100	[thread overview]
Message-ID: <20260313090641.13729Aae-hca@linux.ibm.com> (raw)
In-Reply-To: <058c161c4e82d2d78ddb9c52cfc8ee50@linux.ibm.com>

On Fri, Mar 13, 2026 at 09:32:39AM +0100, Harald Freudenberger wrote:
> On 2026-03-13 06:23, lirongqing wrote:
> > From: Li RongQing <lirongqing@baidu.com>
> > 
> > The synchronize_rcu() call after adding a handler to the handler_list
> > is redundant because RCU readers will either see the old list or the
> > new list. Removing this synchronization point reduces the blocking
> > time during handler registration.
> > 
> > Signed-off-by: Li RongQing <lirongqing@baidu.com>
> > ---
> >  drivers/s390/crypto/pkey_base.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/drivers/s390/crypto/pkey_base.c
> > b/drivers/s390/crypto/pkey_base.c
> > index d60cd98..c2e29d6 100644
> > --- a/drivers/s390/crypto/pkey_base.c
> > +++ b/drivers/s390/crypto/pkey_base.c
> > @@ -60,7 +60,6 @@ int pkey_handler_register(struct pkey_handler
> > *handler)
> > 
> >  	list_add_rcu(&handler->list, &handler_list);
> >  	spin_unlock(&handler_list_write_lock);
> > -	synchronize_rcu();
> > 
> >  	module_put(handler->module);
> 
> Thanks Li RongQing
> 
> Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>

With synchronize_rcu() you do know that other CPUs will see the new
list after this function returned, without not. Is that ok?

  reply	other threads:[~2026-03-13  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13  5:23 [PATCH] s390/pkey: Remove synchronize_rcu from pkey_handler_register lirongqing
2026-03-13  8:32 ` Harald Freudenberger
2026-03-13  9:06   ` Heiko Carstens [this message]
2026-03-13  9:39     ` Harald Freudenberger
2026-03-16  9:35 ` Harald Freudenberger
2026-03-16  9:54   ` 答复: [????] " Li,Rongqing(ACG CCN)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260313090641.13729Aae-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=dengler@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    --cc=svens@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox