public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nam Cao <namcaov@gmail.com>
Cc: forest@alittletooquiet.net, philipp.g.hortmann@gmail.com,
	linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging: vt6655: replace spin_lock_irqsave with spin_lock
Date: Thu, 15 Sep 2022 10:45:06 +0200	[thread overview]
Message-ID: <YyLmEpJBG7fPZ8iN@kroah.com> (raw)
In-Reply-To: <20220914080016.67951-1-namcaov@gmail.com>

On Wed, Sep 14, 2022 at 10:00:17AM +0200, Nam Cao wrote:
> In vt6655 driver, there is a single interrupt handler: vnt_interrupt(),
> and it does not take the spinlock. The interrupt handler only schedules
> a workqueue, and the spinlock is taken in this workqueue. Thus, there is
> no need to use spin_lock_irqsave, as the spinlock is never taken by an
> interrupt. Replace spin_lock_irqsave (and spin_unlock_irqsave) with
> spin_lock (and spin_unlock).

What is the speed difference before and after this change?  And how are
interrupts properly handled anymore in this driver if you took away the
lock that was being accessed in the irq?

thanks,

greg k-h

  parent reply	other threads:[~2022-09-15  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  8:00 [PATCH] staging: vt6655: replace spin_lock_irqsave with spin_lock Nam Cao
2022-09-14 18:55 ` Philipp Hortmann
2022-09-15 17:10   ` Nam Cao
2022-09-15  8:45 ` Greg KH [this message]
2022-09-15 17:14   ` Nam Cao

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=YyLmEpJBG7fPZ8iN@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=forest@alittletooquiet.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=namcaov@gmail.com \
    --cc=philipp.g.hortmann@gmail.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