All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH 1/4] block/part_stat: remove rcu_read_lock() from part_stat_lock()
Date: Mon, 4 May 2020 07:00:44 -0700	[thread overview]
Message-ID: <20200504140044.GA29020@infradead.org> (raw)
In-Reply-To: <158859896942.19836.15240144203131230746.stgit@buzz>

On Mon, May 04, 2020 at 04:29:29PM +0300, Konstantin Khlebnikov wrote:
> RCU lock is required only in blk_account_io_start() to lookup partition.
> After that request holds reference to related hd_struct.
> 
> Replace get_cpu() with preempt_disable() - returned cpu index is unused.
> 
> Non-SMP case also needs preempt_disable, otherwise statistics update could
> be non-atomic. Previously that was provided by rcu_read_lock().
> 
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>

Looks good,

Signed-off-by: Christoph Hellwig <hch@lst.de>

although I wonder if we should just kill off part_stat_lock and
part_stat_unlock.

      parent reply	other threads:[~2020-05-04 14:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 13:29 [PATCH 1/4] block/part_stat: remove rcu_read_lock() from part_stat_lock() Konstantin Khlebnikov
2020-05-04 13:29 ` [PATCH 2/4] block/part_stat: use __this_cpu_add() instead of access by smp_processor_id() Konstantin Khlebnikov
2020-05-04 14:03   ` Christoph Hellwig
2020-05-04 15:02     ` Konstantin Khlebnikov
2020-05-04 15:10       ` Christoph Hellwig
2020-05-04 13:30 ` [PATCH 3/4] block/part_stat: account merge of two requests Konstantin Khlebnikov
2020-05-04 14:03   ` Christoph Hellwig
2020-05-04 13:31 ` [PATCH 4/4] block/part_stat: add helper blk_account_io_merge_bio() Konstantin Khlebnikov
2020-05-04 14:06   ` Christoph Hellwig
2020-05-04 14:00 ` Christoph Hellwig [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=20200504140044.GA29020@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=khlebnikov@yandex-team.ru \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.