From: Christoph Hellwig <hch@lst.de>
To: Jinlong Chen <nickyc975@zju.edu.cn>
Cc: hch@lst.de, axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: misc elevator code cleanups
Date: Sun, 30 Oct 2022 16:32:30 +0100 [thread overview]
Message-ID: <20221030153229.GC9676@lst.de> (raw)
In-Reply-To: <20221030140357.1327019-1-nickyc975@zju.edu.cn>
On Sun, Oct 30, 2022 at 10:03:57PM +0800, Jinlong Chen wrote:
> Hi, Christoph!
>
> Only elevator_find_get is calling __elevator_find after applying the
> series. Maybe we can just remove __elevator_find and move the list
> iterating logic into elevator_find_get?
We could. But then we'd need another local variable to track what
was found, so I'm not sure it is a win. In general having a pure
list lookup in a helper while all the locking and refcounting in
a wrapper around it tends to be a quite nice pattern.
next prev parent reply other threads:[~2022-10-30 15:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-30 10:07 misc elevator code cleanups Christoph Hellwig
2022-10-30 10:07 ` [PATCH 1/7] block: drop the duplicate check in elv_register Christoph Hellwig
2022-10-31 13:50 ` Jens Axboe
2022-11-01 10:02 ` Christoph Hellwig
2022-10-30 10:07 ` [PATCH 2/7] block: cleanup elevator_get Christoph Hellwig
2022-10-30 10:07 ` [PATCH 3/7] block: exit elv_iosched_show early when I/O schedulers are not supported Christoph Hellwig
2022-10-30 10:07 ` [PATCH 4/7] block: cleanup the variable naming in elv_iosched_store Christoph Hellwig
2022-10-30 10:07 ` [PATCH 5/7] block: simplify the check for the current elevator in elv_iosched_show Christoph Hellwig
2022-10-30 10:07 ` [PATCH 6/7] block: don't check for required features in elevator_match Christoph Hellwig
2022-10-30 10:07 ` [PATCH 7/7] block: split elevator_switch Christoph Hellwig
2022-10-30 14:03 ` misc elevator code cleanups Jinlong Chen
2022-10-30 15:32 ` Christoph Hellwig [this message]
2022-10-31 1:49 ` Jinlong Chen
2022-11-01 14:03 ` (subset) " 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=20221030153229.GC9676@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=nickyc975@zju.edu.cn \
/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.