From: David Sterba <dsterba@suse.cz>
To: Schspa Shi <schspa@gmail.com>
Cc: dsterba@suse.cz, clm@fb.com, dsterba@suse.com,
josef@toxicpanda.com, linux-btrfs@vger.kernel.org,
linux-kernel@vger.kernel.org, terrelln@fb.com
Subject: Re: [PATCH v2] btrfs: zstd: use spin_lock in timer callback
Date: Thu, 14 Apr 2022 21:26:06 +0200 [thread overview]
Message-ID: <20220414192606.GS15609@twin.jikos.cz> (raw)
In-Reply-To: <20220411155540.36853-1-schspa@gmail.com>
On Mon, Apr 11, 2022 at 11:55:41PM +0800, Schspa Shi wrote:
> This is an optimization for fix fee13fe96529 ("btrfs:
> correct zstd workspace manager lock to use spin_lock_bh()")
>
> The critical region for wsm.lock is only accessed by the process context and
> the softirq context.
>
> Because in the soft interrupt, the critical section will not be preempted by the
> soft interrupt again, there is no need to call spin_lock_bh(&wsm.lock) to turn
> off the soft interrupt, spin_lock(&wsm.lock) is enough for this situation.
>
> Changelog:
> v1 -> v2:
> - Change the commit message to make it more readable.
>
> [1] https://lore.kernel.org/all/20220408181523.92322-1-schspa@gmail.com/
>
> Signed-off-by: Schspa Shi <schspa@gmail.com>
Added to misc-next, thanks.
prev parent reply other threads:[~2022-04-14 19:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 18:15 [PATCH] btrfs: zstd: use spin_lock in timer function Schspa Shi
2022-04-08 18:44 ` David Sterba
2022-04-09 7:36 ` Schspa Shi
2022-04-11 13:51 ` David Sterba
2022-04-11 15:55 ` [PATCH v2] btrfs: zstd: use spin_lock in timer callback Schspa Shi
2022-04-13 14:58 ` Nikolay Borisov
2022-04-13 16:00 ` David Sterba
2022-04-13 16:03 ` Schspa Shi
2022-04-13 19:08 ` Nikolay Borisov
2022-04-14 16:39 ` Schspa Shi
2022-04-14 19:26 ` David Sterba [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=20220414192606.GS15609@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schspa@gmail.com \
--cc=terrelln@fb.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