From: Greg KH <gregkh@linuxfoundation.org>
To: tuo cao <91tuocao@gmail.com>
Cc: alcooperx@gmail.com, bcm-kernel-feedback-list@broadcom.com,
jirislaby@kernel.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RESEND] serial: 8250_bcm7271: move spin_lock_irqsave to spin_lock in interrupt handler
Date: Sun, 4 Sep 2022 15:10:59 +0200 [thread overview]
Message-ID: <YxSj4wExrNxUxlEU@kroah.com> (raw)
In-Reply-To: <CAEVeK2DfcvguQ__GroRY+erU+-4=ZKvPBf1V2poRxUF77G60OQ@mail.gmail.com>
On Sun, Sep 04, 2022 at 04:48:13PM +0800, tuo cao wrote:
> Greg KH <gregkh@linuxfoundation.org> 于2022年8月30日周二 19:35写道:
> >
> > On Sat, Aug 27, 2022 at 05:42:19PM +0800, tuo cao wrote:
> > > No, whether it's spin_lock_irqsave() or spin_lock(), the security is
> > > the same. Since this commit:e58aa3d2d0cc01ad8d6f7f640a0670433f794922,
> > > interrupt nesting is disabled, which means interrupts has disabled in
> > > the interrupt handlers. So, it is unnecessary to call
> > > spin_lock_irqsave in a interrupt handler. And it takes less time
> > > obviously to use spin_lock(),so I think this change is needed.
> >
> > I have no context at all here, please never top-post :(
> >
> Sorry for causing you trouble. It should be OK this time.
>
> > And have you measured the time difference? Is it a real thing?
> >
> Yes, sir. I have measured it, it is a read thing. The test code and
> log have been put on Github, please check:
> https://github.com/tuocao1991/api_test
Did you test it for this code change?
And remember, those calls are being made inside of an IRQ handler, did
you measure that time difference?
And that link does not show much, sorry, you are doing no real work at
all, and again, not operating in an irq handler.
Can you see a measurable difference with your patch applied and without
it? If so, great, provide that informatin in the changelog text. If
not, be very careful about changing code in stuff like this.
thanks,
greg k-h
prev parent reply other threads:[~2022-09-04 13:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 14:11 [RESEND] serial: 8250_bcm7271: move spin_lock_irqsave to spin_lock in interrupt handler Tuo Cao
2022-08-22 14:25 ` Greg KH
2022-08-27 9:42 ` tuo cao
2022-08-30 11:35 ` Greg KH
2022-09-04 8:48 ` tuo cao
2022-09-04 13:10 ` Greg KH [this message]
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=YxSj4wExrNxUxlEU@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=91tuocao@gmail.com \
--cc=alcooperx@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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