From: Hannes Reinecke <hare@suse.de>
To: Coly Li <colyli@suse.de>, axboe@kernel.dk
Cc: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
Davidlohr Bueso <dave@stgolabs.net>
Subject: Re: [PATCH 7/7] bcache: optimize barrier usage for atomic operations
Date: Mon, 23 Mar 2020 08:09:23 +0100 [thread overview]
Message-ID: <8536b839-252d-8b88-d2fc-d41cfc0a9af3@suse.de> (raw)
In-Reply-To: <20200322060305.70637-8-colyli@suse.de>
On 3/22/20 7:03 AM, Coly Li wrote:
> The idea of this patch is from Davidlohr Bueso, he posts a patch
> for bcache to optimize barrier usage for read-modify-write atomic
> bitops. Indeed such optimization can also apply on other locations
> where smp_mb() is used before or after an atomic operation.
>
> This patch replaces smp_mb() with smp_mb__before_atomic() or
> smp_mb__after_atomic() in btree.c and writeback.c, where it is used
> to synchronize memory cache just earlier on other cores. Although
> the locations are not on hot code path, it is always not bad to mkae
> things a little better.
>
> Signed-off-by: Coly Li <colyli@suse.de>
> Cc: Davidlohr Bueso <dave@stgolabs.net>
> ---
> drivers/md/bcache/btree.c | 6 +++---
> drivers/md/bcache/writeback.c | 6 +++---
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
next prev parent reply other threads:[~2020-03-23 7:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 6:02 [PATCH 0/7] bcache patches for Linux v5.7-rc1 Coly Li
2020-03-22 6:02 ` [PATCH 1/7] bcache: move macro btree() and btree_root() into btree.h Coly Li
2020-03-23 7:05 ` Hannes Reinecke
2020-03-22 6:03 ` [PATCH 2/7] bcache: add bcache_ prefix to btree_root() and btree() macros Coly Li
2020-03-23 7:06 ` Hannes Reinecke
2020-03-22 6:03 ` [PATCH 3/7] bcache: make bch_btree_check() to be multithreaded Coly Li
2020-03-23 7:00 ` Hannes Reinecke
2020-03-22 6:03 ` [PATCH 4/7] bcache: make bch_sectors_dirty_init() " Coly Li
2020-03-23 7:03 ` Hannes Reinecke
2020-03-23 9:41 ` Coly Li
2020-03-22 6:03 ` [PATCH 5/7] bcache: Use scnprintf() for avoiding potential buffer overflow Coly Li
2020-03-23 7:04 ` Hannes Reinecke
2020-03-23 8:15 ` Takashi Iwai
2020-03-22 6:03 ` [PATCH 6/7] bcache: optimize barrier usage for Rmw atomic bitops Coly Li
2020-03-23 7:08 ` Hannes Reinecke
2020-03-23 8:45 ` Coly Li
2020-03-22 6:03 ` [PATCH 7/7] bcache: optimize barrier usage for atomic operations Coly Li
2020-03-23 7:09 ` Hannes Reinecke [this message]
2020-03-22 16:07 ` [PATCH 0/7] bcache patches for Linux v5.7-rc1 Jens Axboe
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=8536b839-252d-8b88-d2fc-d41cfc0a9af3@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=colyli@suse.de \
--cc=dave@stgolabs.net \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@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;
as well as URLs for NNTP newsgroup(s).