On Fri, 2018-12-07 at 09:35 -0700, Jens Axboe wrote:
> diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
> index 29bfe8017a2d..9e5bda8800f8 100644
> --- a/block/blk-mq-sched.c
> +++ b/block/blk-mq-sched.c
> @@ -377,6 +377,16 @@ void blk_mq_sched_insert_request(struct request *rq,
> bool
On Thu, 2018-12-06 at 22:17 -0700, Jens Axboe wrote:
> Instead of making special cases for what we can direct issue, and now
> having to deal with DM solving the livelock while still retaining a BUSY
> condition feedback loop, always just add a request that has been through
> ->queue_rq() to the
On Thu, 2018-12-06 at 17:26 -0700, Jens Axboe wrote:
> On 12/6/18 5:20 PM, Bart Van Assche wrote:
> > Which branch does that tag correspond to? Even after having run git fetch
> > --tags I can't find that tag in your repository.
>
> I pushed it before I sent the email,
On Thu, 2018-12-06 at 16:59 -0700, Jens Axboe wrote:
> Just a single followup fix to the corruption fix from yesterday. We have
> an exported interface that does direct dispatch, with DM being the sole
> user of it. Change that to do bypass insert always instead of attempting
> direct dispatch.
corruption with direct issue")
> > Signed-off-by: Jens Axboe
>
> Bart, I'll add your reported-by here of course, and also a stable CC
> since the original patch went into stable.
Feel free to add the following:
Tested-by: Bart Van Assche
On Thu, 2018-12-06 at 08:47 -0800, Bart Van Assche wrote:
> If I merge Jens' for-next branch with Linus' master branch, boot the
> resulting kernel in a VM and run blktests/tests/srp/002 then that test
> never finishes. The same test passes against Linus' master branch.
On Thu, 2018-12-06 at 11:12 -0700, Jens Axboe wrote:
> On 12/6/18 11:10 AM, Bart Van Assche wrote:
> > On Thu, 2018-12-06 at 10:02 -0800, Bart Van Assche wrote:
> > > On Thu, 2018-12-06 at 10:48 -0700, Jens Axboe wrote:
> > > > which would result in a non-zero
On Thu, 2018-12-06 at 10:02 -0800, Bart Van Assche wrote:
> On Thu, 2018-12-06 at 10:48 -0700, Jens Axboe wrote:
> > which would result in a non-zero exit, which should be expected for this
> > test?
>
> Test srp/002 simulates network failures while running fio on top
On Thu, 2018-12-06 at 10:48 -0700, Jens Axboe wrote:
> which would result in a non-zero exit, which should be expected for this
> test?
Hi Jens,
Test srp/002 simulates network failures while running fio on top of dm-mpath.
Since queue_if_no_path is enabled in multipath.conf dm-mpath will keep
On Thu, 2018-12-06 at 10:00 -0700, Jens Axboe wrote:
> On 12/6/18 9:47 AM, Bart Van Assche wrote:
> > If I merge Jens' for-next branch with Linus' master branch, boot the
> > resulting kernel in a VM and run blktests/tests/srp/002 then that test
> > never finishes. The sam
Hello,
If I merge Jens' for-next branch with Linus' master branch, boot the
resulting kernel in a VM and run blktests/tests/srp/002 then that test
never finishes. The same test passes against Linus' master branch. I
think this is a regression. The following appears in the system log if
I run that
Hello,
If I merge Jens' for-next branch with Linus' master branch and boot the
resulting kernel in a VM then the call trace shown below appears. This call
trace does not appear when building and booting the code from Linus' master
branch. Is this perhaps a regression?
WARNING: CPU: 1 PID: 257 at
On Wed, 2018-12-05 at 22:17 +0800, Weiping Zhang wrote:
> +Description:
> + io_timeout is a request’s timeouts at block layer in
> + milliseconds. When the underlying driver starts processing
> + a request, the generic block layer will start a timer, if
> +
On Thu, 2018-12-06 at 22:18 +0800, Weiping Zhang wrote:
> Before this patch, even we set io_timeout to 30*HZ(default), but
> blk_rq_timeout always return jiffies +5*HZ,
> [1]. if there no pending request in timeout list, the timer callback
> blk_rq_timed_out_timer will be called after 5*HZ, and
On Wed, 2018-12-05 at 22:59 +0800, Weiping Zhang wrote:
> Weiping Zhang 于2018年12月5日周三 下午10:49写道:
> > Christoph Hellwig 于2018年12月5日周三 下午10:40写道:
> > > Can you please also send a patch to not show this attribute for
> > > drivers without a timeout handler? Thanks!
>
> Is there a simple way do
On Wed, 2018-12-05 at 23:37 +0800, Weiping Zhang wrote:
> @@ -130,7 +119,7 @@ void blk_add_timer(struct request *req)
>* than an existing one, modify the timer. Round up to next nearest
>* second.
>*/
> - expiry = blk_rq_timeout(round_jiffies_up(expiry));
> + expiry
On 12/4/18 2:00 AM, Kashyap Desai wrote:
Problem statement :
Whenever try to get outstanding request via scsi_host_find_tag,
block layer will return stale entries instead of actual outstanding
request. Kernel panic if stale entry is inaccessible or memory is reused.
Fix :
Undo request mapping in
On Mon, 2018-12-03 at 15:24 -0700, Jens Axboe wrote:
> On 12/3/18 3:02 AM, Ming Lei wrote:
> > Hi,
> >
> > Just found there is sbmitmap related lockdep warning, not take a close
> > look yet, maybe
> > it is caused by recent sbitmap change.
> >
> > [1] test
> > - modprobe null_blk queue_mode=2
On 12/1/18 9:11 AM, Hannes Reinecke wrote:
On 12/1/18 5:48 PM, Christoph Hellwig wrote:
On Fri, Nov 30, 2018 at 01:36:09PM -0700, Jens Axboe wrote:
On 11/30/18 1:26 PM, Keith Busch wrote:
A driver may wish to iterate every tagged request, not just ones that
satisfy blk_mq_request_started().
On Fri, 2018-11-30 at 10:20 -0700, Jens Axboe wrote:
> On 11/30/18 10:18 AM, Bart Van Assche wrote:
> > On Sat, 2018-12-01 at 00:38 +0800, Ming Lei wrote:
> > > Fixes: 445251d0f4d329a ("blk-mq: fix discard merge with scheduler
> > > attached")
> >
On Fri, 2018-11-30 at 10:08 -0700, Jens Axboe wrote:
> On 11/30/18 10:07 AM, Bart Van Assche wrote:
> > On Fri, 2018-11-30 at 09:56 -0700, Jens Axboe wrote:
> > > If the ioprio capability check fails, we return without putting
> > > the file pointer.
> > >
>
On Sat, 2018-12-01 at 00:38 +0800, Ming Lei wrote:
> Fixes: 445251d0f4d329a ("blk-mq: fix discard merge with scheduler attached")
Since this patch fixes a bug introduced in kernel v4.16, does it need
a "Cc: stable" tag?
Thanks,
Bart.
On Fri, 2018-11-30 at 09:56 -0700, Jens Axboe wrote:
> We can't wait for polled events to complete, as they may require active
> polling from whoever submitted it. If that is the same task that is
> submitting new IO, we could deadlock waiting for IO to complete that
> this task is supposed to be
On Fri, 2018-11-30 at 09:56 -0700, Jens Axboe wrote:
> If the ioprio capability check fails, we return without putting
> the file pointer.
>
> Fixes: d9a08a9e616b ("fs: Add aio iopriority support")
> Reviewed-by: Johannes Thumshirn
> Reviewed-by: Christoph Hellwig
> Signed-off-by: Jens Axboe
>
On Thu, 2018-11-29 at 18:22 +0800, Weiping Zhang wrote:
> add documentation for /sys/block//queue/io_timeout
Patch descriptions should consist of full sentences. That means that these
should start with a capital letter and end with a period.
> +
> +What:
On Thu, 2018-11-29 at 00:54 +0800, Weiping Zhang wrote:
> add documentation for /sys/block//queue/io_timeout
>
> Signed-off-by: Weiping Zhang
> ---
> Documentation/ABI/testing/sysfs-block | 9 +
> Documentation/block/queue-sysfs.txt | 6 ++
> 2 files changed, 15 insertions(+)
>
>
On Mon, 2018-11-19 at 22:11 +0800, Weiping Zhang wrote:
> Give a interface to adjust io timeout by device.
>
> Signed-off-by: Weiping Zhang
> ---
>
> Changes since v1:
> * make sure timeout > 0
>
> block/blk-sysfs.c | 27 +++
> 1 file changed, 27 insertions(+)
On 11/11/18 9:25 AM, Omar Sandoval wrote:
From: Omar Sandoval
When copying to the latency type, we should be passing LATENCY_TYPE_LEN,
not DOMAIN_LEN. This isn't a problem in practice because we only pass
"total" or "I/O", but let's fix it.
Reported-by: Jordan Glover
Signed-off-by: Omar
On 11/9/18 10:32 AM, Christoph Hellwig wrote:
Add a retries field to the internal request structure instead, which gets
set to zero on the first submission.
Signed-off-by: Christoph Hellwig
---
drivers/block/skd_main.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
On Thu, 2018-11-08 at 10:50 -0700, Jens Axboe wrote:
> How about this incremental?
>
> diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
> index 097e9a67d5f5..87bc5df72d48 100644
> --- a/block/blk-mq-tag.c
> +++ b/block/blk-mq-tag.c
> @@ -248,7 +248,8 @@ static bool bt_iter(struct sbitmap
On Thu, 2018-11-08 at 09:31 -0700, Jens Axboe wrote:
> On 11/8/18 9:28 AM, Bart Van Assche wrote:
> > On Thu, 2018-11-08 at 09:06 -0700, Jens Axboe wrote:
> > > --- a/block/blk-mq-debugfs.c
> > > +++ b/block/blk-mq-debugfs.c
> > > @@ -424,13 +424,15 @@ stru
; + * to stop the iteration.
> + */
> + if (rq->q == hctx->queue) {
> + bool *busy = (bool *) priv;
I think the "(bool *)" cast can be left out. Anyway:
Reviewed-by: Bart Van Assche
On Thu, 2018-11-08 at 09:06 -0700, Jens Axboe wrote:
> --- a/block/blk-mq-debugfs.c
> +++ b/block/blk-mq-debugfs.c
> @@ -424,13 +424,15 @@ struct show_busy_params {
> * Note: the state of a request may change while this function is in
> progress,
> * e.g. due to a concurrent
On 11/5/18 6:19 PM, yuyufen wrote:
I am sorry that I did not see the discussion before this.
And you are right. Please ignore this patch.
Don't worry - this can happen :-)
Bart.
On Thu, 2018-11-01 at 14:35 +0800, Yufen Yu wrote:
> When make discontiguous-io.cpp with -m32, g++ compiler reports
> error for std::min(long unsigned int, size_t) has diffent
> arguments type.
>
> fixes: fd21728886e7 ("Add the discontiguous-io test program")
> Signed-off-by: Yufen Yu
> ---
>
On Tue, 2018-10-30 at 12:02 -0400, Theodore Y. Ts'o wrote:
> On Tue, Oct 30, 2018 at 08:02:55AM -0700, Bart Van Assche wrote:
> > Details about how the build fails on 32-bit systems would have been welcome
> > in the commit message. Anyway:
> >
> > R
while ((c = getopt(argc, argv, "hl:o:sw")) != EOF) {
> switch (c) {
Details about how the build fails on 32-bit systems would have been welcome
in the commit message. Anyway:
Reviewed-by: Bart Van Assche
On Mon, 2018-10-29 at 17:08 -0400, Theodore Y. Ts'o wrote:
> On Mon, Oct 29, 2018 at 09:26:43AM -0700, Bart Van Assche wrote:
> >
> > Have you considered to change the data type of 'len' from size_t into
> > unsigned long
> > instead of inserting this cas
On Mon, 2018-10-29 at 12:15 -0400, Theodore Ts'o wrote:
> Signed-off-by: Theodore Ts'o
> ---
> src/discontiguous-io.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/discontiguous-io.cpp b/src/discontiguous-io.cpp
> index 5e0ee0f..a59c18d 100644
> ---
rceptible
^ ^^^
immutable?observable?
> by stack driver, so IO buffer can be allocated as dma aligned before
^
stacked?
Anyway:
Reviewed-by: Bart Van Assche
On Thu, 2018-10-18 at 07:03 -0700, Matthew Wilcox wrote:
> On Thu, Oct 18, 2018 at 09:18:12PM +0800, Ming Lei wrote:
> > Filesystems may allocate io buffer from slab, and use this buffer to
> > submit bio. This way may break storage drivers if they have special
> > requirement on DMA alignment.
>
On 10/17/18 3:05 AM, Jan Kara wrote:
Well, the problem with this is that big distro people really don't care
much because they already use udev for tuning the IO scheduler. So whatever
defaults the kernel is going to pick likely won't be seen by distro
customers. Embedded people seem to be
On Mon, 2018-10-15 at 16:10 +0200, Linus Walleij wrote:
> + * For blk-mq devices, we default to using:
> + * - "none" for multiqueue devices (nr_hw_queues != 1)
> + * - "bfq", if available, for single queue devices
> + * - "mq-deadline" if "bfq" is not available for single queue devices
> + * -
When debugging e.g. the SCSI timeout handler it is important that
requests that have not yet been started or that already have
completed are also reported through debugfs.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Martin
On Wed, 2018-10-03 at 16:12 -0600, Jens Axboe wrote:
> On 10/3/18 3:42 PM, Bart Van Assche wrote:
> > On Fri, 2018-01-12 at 22:11 +0000, Bart Van Assche wrote:
> > > /*
> > > + * Show "busy" requests - these are the requests owned by the block
> &
On Fri, 2018-01-12 at 22:11 +, Bart Van Assche wrote:
> On Fri, 2018-01-12 at 15:05 -0700, Jens Axboe wrote:
> > On 1/12/18 3:00 PM, Bart Van Assche wrote:
> > > On Fri, 2018-01-12 at 14:55 -0700, Jens Axboe wrote:
> > > > On 1/12/18 2:52 PM, Bart Van Assche wrote
From: Bart Van Assche
Some time ago REQ_DISCARD was renamed into REQ_OP_DISCARD. Some comments
and documentation files were not updated however. Update these comments
and documentation files. See also commit 4e1b2d52a80d ("block, fs,
drivers: remove REQ_OP compat defs and related code"
On Tue, 2018-09-18 at 17:18 -0700, Omar Sandoval wrote:
> On Tue, Sep 18, 2018 at 05:02:47PM -0700, Bart Van Assche wrote:
> > On 9/18/18 4:24 PM, Omar Sandoval wrote:
> > > On Tue, Sep 18, 2018 at 02:20:59PM -0700, Bart Van Assche wrote:
> > > > Can you have a loo
On Fri, 2018-09-21 at 07:48 +0200, Christoph Hellwig wrote:
> Can you resend this with the one easy fixup pointed out? It would
> be good to finally get the race fix merged.
Seconded. I also would like to see these patches being merged upstream.
Bart.
This function will be used in a later patch to switch the struct
request_queue q_usage_counter from killed back to live. In contrast
to percpu_ref_reinit(), this new function does not require that the
refcount is zero.
Signed-off-by: Bart Van Assche
Acked-by: Tejun Heo
Reviewed-by: Ming Lei
Cc
patch that will make request
allocation block while the queue status is not RPM_ACTIVE.
Signed-off-by: Bart Van Assche
Reviewed-by: Ming Lei
Reviewed-by: Christoph Hellwig
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-core.c | 3 ++-
block
Now that the blk-mq core processes power management requests
(marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable
runtime power management for blk-mq.
Signed-off-by: Bart Van Assche
Reviewed-by: Ming Lei
Reviewed-by: Christoph Hellwig
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc
blk_get_request() callers are waiting.
For blk-mq, instead of maintaining the q->nr_pending counter, rely
on q->q_usage_counter. Call pm_runtime_mark_last_busy() every time a
request finishes instead of only if the queue depth drops to zero.
Signed-off-by: Bart Van Assche
Reviewed-by: Mi
nly" mode as long as a block device is runtime suspended, make
it possible to set "pm-only" mode from more than one context. Since
with this change scsi_device_quiesce() is no longer idempotent, make
that function return early if it is called for a quiesced queue.
Signed-off-by: Bart
separate file.
- Addressed Ming's feedback.
Bart Van Assche (8):
block: Move power management code into a new source file
block, scsi: Change the preempt-only flag into a counter
block: Split blk_pm_add_request() and blk_pm_put_request()
block: Schedule runtime resume earlier
percpu-refcoun
layer
core code but also reduces the size of header file
and hence should help to reduce the build time of the Linux kernel
if CONFIG_PM is not defined.
Signed-off-by: Bart Van Assche
Reviewed-by: Ming Lei
Reviewed-by: Christoph Hellwig
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes
that the refcount it operates on is zero.
Signed-off-by: Bart Van Assche
Reviewed-by: Ming Lei
Reviewed-by: Christoph Hellwig
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
---
block/blk-mq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block
Move the pm_request_resume() and pm_runtime_mark_last_busy() calls into
two new functions and thereby separate legacy block layer code from code
that works for both the legacy block layer and blk-mq. A later patch will
add calls to the new functions in the blk-mq code.
Signed-off-by: Bart Van
On Wed, 2018-09-26 at 09:59 -0700, Tejun Heo wrote:
> Hello, Bart.
>
> On Mon, Sep 24, 2018 at 01:43:35PM -0700, Bart Van Assche wrote:
> > Thanks for the review. But could you please clarify what "after ->percpu_ref
> > is called" refers to?
>
> Oops,
On Wed, 2018-09-26 at 17:06 +0200, Johannes Thumshirn wrote:
> On Wed, Sep 26, 2018 at 04:57:32PM +0200, Christoph Hellwig wrote:
> > I don't think this actually works given that rpm_status only exists
> > if CONFIG_PM is set.
>
> I think it'll work as GCC does constant propagation. There are
>
On Wed, 2018-09-26 at 16:30 +0900, Damien Le Moal wrote:
> diff --git a/block/elevator.c b/block/elevator.c
> index 6a06b5d040e5..8cd81fd6339a 100644
> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -609,7 +609,7 @@ void elv_drain_elevator(struct request_queue *q)
>
> while
On Tue, 2018-09-25 at 08:39 -0600, Keith Busch wrote:
> On Tue, Sep 25, 2018 at 10:39:46AM +0800, jianchao.wang wrote:
> > But the issue is the left part of blk_mq_timeout_work is moved out of
> > protection of q refcount.
>
> I'm not sure what you mean by "left part". The only part that isn't
>
On 9/24/18 7:11 PM, jianchao.wang wrote:
Hi Keith
On 09/25/2018 05:09 AM, Keith Busch wrote:
- /* A deadlock might occur if a request is stuck requiring a
-* timeout at the same time a queue freeze is waiting
-* completion, since the timeout code would not be able to
-
On Mon, 2018-09-24 at 11:01 -0700, Tejun Heo wrote:
> Hello, Bart.
>
> On Fri, Sep 21, 2018 at 01:31:19PM -0700, Bart Van Assche wrote:
> > +void percpu_ref_resurrect(struct percpu_ref *ref)
> > +{
> > + unsigned long __percpu *percpu_count;
On Mon, 2018-09-24 at 13:13 -0600, Keith Busch wrote:
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 85a1c1a59c72..28d128450621 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -848,22 +848,6 @@ static void blk_mq_timeout_work(struct work_struct *work)
> struct blk_mq_hw_ctx
Make it easier to understand the purpose of the functions that iterate
over requests by documenting their purpose. Fix several minor spelling
and grammer mistakes in comments in these functions.
Signed-off-by: Bart Van Assche
Reviewed-by: Johannes Thumshirn
Cc: Christoph Hellwig
Cc: Ming Lei
Now that the blk-mq core processes power management requests
(marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable
runtime power management for blk-mq.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Move the pm_request_resume() and pm_runtime_mark_last_busy() calls into
two new functions and thereby separate legacy block layer code from code
that works for both the legacy block layer and blk-mq. A later patch will
add calls to the new functions in the blk-mq code.
Signed-off-by: Bart Van
layer
core code but also reduces the size of header file
and hence should help to reduce the build time of the Linux kernel
if CONFIG_PM is not defined.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan
blk_get_request() callers are waiting.
For blk-mq, instead of maintaining the q->nr_pending counter, rely
on q->q_usage_counter. Call pm_runtime_mark_last_busy() every time a
request finishes instead of only if the queue depth drops to zero.
Signed-off-by: Bart Van Assche
Cc: Christoph H
nly" mode as long as a block device is runtime suspended, make
it possible to set "pm-only" mode from more than one context. Since
with this change scsi_device_quiesce() is no longer idempotent, make
that function return early if it is called for a quiesced queue.
Signed-off-by: Bart Van A
This function will be used in a later patch to switch the struct
request_queue q_usage_counter from killed back to live. In contrast
to percpu_ref_reinit(), this new function does not require that the
refcount is zero.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: Christoph Hellwig
Cc: Ming
that the refcount it operates on is zero.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
---
block/blk-mq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index
patch that will make request
allocation block while the queue status is not RPM_ACTIVE.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-core.c | 3 ++-
block/elevator.c | 1 -
2
nt about runtime overhead
of switching a per-cpu counter to atomic mode.
Changes compared to v1:
- Moved the runtime power management code into a separate file.
- Addressed Ming's feedback.
Bart Van Assche (8):
block: Move power management code into a new source file
block, scsi: Change t
On Thu, 2018-09-20 at 09:35 +0200, Johannes Thumshirn wrote:
> On Wed, Sep 19, 2018 at 03:45:23PM -0700, Bart Van Assche wrote:
> > +/*
> > + * Call function @fn(@hctx, rq, @data, @reserved) for each request
> > queued on
> > + * @hctx that has been assigned a driv
patch that will make request
allocation block while the queue status is not RPM_ACTIVE.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-core.c | 2 ++
block/elevator.c | 1 -
2 files
nly" mode as long as a block device is runtime suspended, make
it possible to set "pm-only" mode from more than one context. Since
with this change scsi_device_quiesce() is no longer idempotent, make
that function return early if it is called for a quiesced queue.
Signed-off-by: Bart Van A
Now that the blk-mq core processes power management requests
(marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable
runtime power management for blk-mq.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Make it easier to understand the purpose of the functions that iterate
over requests by documenting their purpose. Fix three minor spelling
mistakes in comments in these functions.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc
blk_get_request() callers are waiting.
For blk-mq, instead of maintaining the q->nr_pending counter, rely
on q->q_usage_counter. Call pm_runtime_mark_last_busy() every time a
request finishes instead of only if the queue depth drops to zero.
Signed-off-by: Bart Van Assche
Cc: Christoph H
management code into a separate file.
- Addressed Ming's feedback.
Bart Van Assche (8):
blk-mq: Document the functions that iterate over requests
blk-mq: Introduce blk_mq_queue_rq_iter()
block: Move power management code into a new source file
block, scsi: Change the preempt-only fla
This function will be used in the patch "Make blk_get_request() block for
non-PM requests while suspended".
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-mq-
On Wed, 2018-09-19 at 12:05 +0800, Ming Lei wrote:
> Looks this patch may introduce the following race between queue
> freeze and
> runtime suspend:
>
> ---
> ---
> CPU0 CPU1
>
On Wed, 2018-09-19 at 10:21 +0800, jianchao.wang wrote:
> On 09/19/2018 01:44 AM, Bart Van Assche wrote:
> > There is only one blk_pm_request_resume() call and that call is
> > inside blk_queue_enter() after the pm_only counter has been
> > checked.
> >
> > For t
On 9/18/18 4:24 PM, Omar Sandoval wrote:
On Tue, Sep 18, 2018 at 02:20:59PM -0700, Bart Van Assche wrote:
Can you have a look at the updated master branch of
https://github.com/bvanassche/blktests? That code should no longer fail if
unloading the nvme kernel module fails. Please note that you
On 8/23/18 5:21 PM, Omar Sandoval wrote:
On Thu, Aug 23, 2018 at 01:53:33AM +, Bart Van Assche wrote:
On Tue, 2018-08-21 at 08:46 +0200, Johannes Thumshirn wrote:
On Mon, Aug 20, 2018 at 03:46:45PM +, Bart Van Assche wrote:
Moving these tests into the nvme directory is possible
blk_get_request() callers are waiting.
For blk-mq, instead of maintaining the q->nr_pending counter, rely
on q->q_usage_counter. Call pm_runtime_mark_last_busy() every time a
request finishes instead of only if the queue depth drops to zero.
Signed-off-by: Bart Van Assche
Cc: Christoph H
Now that the blk-mq core processes power management requests
(marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable
runtime power management for blk-mq.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
patch that will make request
allocation block while the queue status is not RPM_ACTIVE.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-core.c | 2 ++
block/elevator.c | 1 -
2 files
layer
core code but also reduces the size of header file
and hence should help to reduce the build time of the Linux kernel
if CONFIG_PM is not defined.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan
Make it easier to understand the purpose of the functions that iterate
over requests by documenting their purpose. Fix two minor spelling
mistakes in comments in these functions.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc
Move the pm_request_resume() and pm_runtime_mark_last_busy() calls into
two new functions and thereby separate legacy block layer code from code
that works for both the legacy block layer and blk-mq. A later patch will
add calls to the new functions in the blk-mq code.
Signed-off-by: Bart Van
nly" mode as long as a block device is runtime suspended, make
it possible to set "pm-only" mode from more than one context. Since
with this change scsi_device_quiesce() is no longer idempotent, make
that function return early if it is called for a quiesced queue.
Signed-off-by: Bart Van A
This function will be used in the patch "Make blk_get_request() block for
non-PM requests while suspended".
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-mq-
hao's feedback including the comment about runtime overhead
of switching a per-cpu counter to atomic mode.
Changes compared to v1:
- Moved the runtime power management code into a separate file.
- Addressed Ming's feedback.
Bart Van Assche (6):
block: Move power management code into a new sourc
On 9/17/18 7:39 PM, jianchao.wang wrote:
On 09/18/2018 04:15 AM, Bart Van Assche wrote:
Instead of allowing requests that are not power management requests
to enter the queue in runtime suspended status (RPM_SUSPENDED), make
the blk_get_request() caller block. This change fixes a starvation
On 9/17/18 1:11 PM, Bart Van Assche wrote:
[ ... ]
Please ignore this e-mail thread - it contains a mixup of two versions
of this patch series.
Bart.
blk_get_request() callers are waiting.
Instead of maintaining the q->nr_pending counter, rely on
q->q_usage_counter. Call pm_runtime_mark_last_busy() every time a
request finishes instead of only if the queue depth drops to zero.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Mi
patch that will make request
allocation block while the queue status is not RPM_ACTIVE.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-core.c | 2 ++
block/elevator.c | 1 -
2 files
1 - 100 of 2095 matches
Mail list logo