From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-block@vger.kernel.org,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: Re: [PATCH 2/6] block: add blk_time_get_ns() and blk_time_get() helpers
Date: Wed, 24 Jan 2024 08:04:00 -0700 [thread overview]
Message-ID: <ac42af94-5c53-4c03-a601-548bafb2e1da@kernel.dk> (raw)
In-Reply-To: <ZbDYNPsbwQo11Fgv@infradead.org>
On 1/24/24 2:28 AM, Christoph Hellwig wrote:
> On Tue, Jan 23, 2024 at 10:30:34AM -0700, Jens Axboe wrote:
>> Convert any user of ktime_get_ns() to use blk_time_get_ns(), and
>> ktime_get() to blk_time_get(), so we have a unified API for querying the
>> current time in nanoseconds or as ktime.
>>
>> No functional changes intended, this patch just wraps ktime_get_ns()
>> and ktime_get() with a block helper.
>
> Given that the helper only is (and only should be) used in the
> block layer code, any reason not to keep it private in block/ ?
I did originally put it in there, but you then run into dependency
issues with needing the struct definitions too, eg for struct blk_plug.
Hence not sure it makes sense, even if logically it'd fit better there.
--
Jens Axboe
next prev parent reply other threads:[~2024-01-24 15:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 17:30 [PATCHSET v4 0/6] Cache issue side time querying Jens Axboe
2024-01-23 17:30 ` [PATCH 1/6] block: move cgroup time handling code into blkdev.h Jens Axboe
2024-01-23 17:30 ` [PATCH 2/6] block: add blk_time_get_ns() and blk_time_get() helpers Jens Axboe
2024-01-24 9:28 ` Christoph Hellwig
2024-01-24 15:04 ` Jens Axboe [this message]
2024-01-23 17:30 ` [PATCH 3/6] block: cache current nsec time in struct blk_plug Jens Axboe
2024-01-23 17:30 ` [PATCH 4/6] block: update cached timestamp post schedule/preemption Jens Axboe
2024-01-23 17:55 ` Keith Busch
2024-01-23 19:15 ` Jens Axboe
2024-01-23 17:30 ` [PATCH 5/6] block: shrink plug->{nr_ios, rq_count} to unsigned char Jens Axboe
2024-01-24 9:29 ` Christoph Hellwig
2024-01-24 15:04 ` Jens Axboe
2024-01-23 17:30 ` [PATCH 6/6] block: convert struct blk_plug callback list to hlists Jens Axboe
2024-01-24 9:30 ` Christoph Hellwig
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=ac42af94-5c53-4c03-a601-548bafb2e1da@kernel.dk \
--to=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=johannes.thumshirn@wdc.com \
--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 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.