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
" 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-
Jianchao'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 i
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
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
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
" 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
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
gement code into a separate file.
- Addressed Ming's feedback.
Bart Van Assche (6):
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
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
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
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
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
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
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
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
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
Since it is possible to unbind a SCSI ULD and since unbinding
removes the association between a request queue and struct device,
the q->dev pointer has to be reset during unbind. Hence introduce
a function in the block layer that clears request_queue.dev.
Signed-off-by: Bart Van Assche
" 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
gement code into a separate file.
- Addressed Ming's feedback.
Bart Van Assche (6):
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
On 09/12/18 18:06, Omar Sandoval wrote:
Ping, Bart, can you look into this? It'd be nice to get this in.
Hello Omar,
I will repost this patch series as soon as I have the time. I have been
more busy than usual during the past four weeks.
Best regards,
Bart.
groups were to be created with sysfs_add_groups().
Reviewed-by: Bart Van Assche
On Tue, 2018-08-21 at 08:46 +0200, Johannes Thumshirn wrote:
> On Mon, Aug 20, 2018 at 03:46:45PM +0000, Bart Van Assche wrote:
> > Moving these tests into the nvme directory is possible but will make it
> > harder to run the NVMeOF multipath tests separately. Are you fine with
On Mon, 2018-08-20 at 09:31 +0200, Johannes Thumshirn wrote:
> On Wed, Aug 15, 2018 at 01:37:25PM -0700, Bart Van Assche wrote:
> > Hello Omar,
> >
> > The three patches in this series add several NVMeOF multipath tests. These
> > tests are similar in nature to the
On Fri, 2018-08-17 at 10:24 -0400, Mike Snitzer wrote:
> Put differently: until Jens stops taking hch's pull requests despite
> concerns being raised against hch's approach (that hch completely
> ignores because he rules with an iron fist from the top of a mountain in
> the Alps) we're pretty much
initiator and target drivers instead
of the SRP initiator and target drivers.
Signed-off-by: Bart Van Assche
---
tests/nvmeof-mp/.gitignore| 1 +
tests/nvmeof-mp/001 | 50 ++
tests/nvmeof-mp/001.out | 3 +
tests/nvmeof-mp/002 | 50 ++
tests
Remove all code that depends on $nvme != "" and also the $nvme variable
itself.
Signed-off-by: Bart Van Assche
---
tests/srp/001 | 19 +
tests/srp/002 | 2 +-
tests/srp/003 | 2 +-
tests/srp/004 | 2 +-
tests/srp/011 | 2 +-
tests/srp
Instead of removing /etc/multipath.conf before a test starts, remove it
after a test has finished. This change is needed to let the nvmeof-mp
tests run after the srp tests have been run.
Signed-off-by: Bart Van Assche
---
tests/srp/rc | 13 +++--
1 file changed, 7 insertions(+), 6
Hello Omar,
The three patches in this series add several NVMeOF multipath tests. These
tests are similar in nature to the SRP tests. Please consider these patches
for the upstream blktests repository.
Thanks,
Bart.
Bart Van Assche (3):
tests/srp: Remove unused code
tests/srp: Remove /etc
On Mon, 2018-07-30 at 10:57 +0200, Hannes Reinecke wrote:
> On 07/30/2018 10:56 AM, Christoph Hellwig wrote:
> > I really don't see the point for this change.
>
> Okay, I'll be dropping it on the next iteration.
Hello Hannes,
Have you already decided when you will post the next iteration of this
On Mon, 2018-07-30 at 09:12 +0200, Hannes Reinecke wrote:
> @@ -3061,11 +3066,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl,
> unsigned nsid)
>
> nvme_get_ctrl(ctrl);
>
> - device_add_disk(ctrl->device, ns->disk, NULL);
> - if (sysfs_create_group(&disk_to_dev(ns->disk)->k
On Mon, 2018-08-13 at 20:42 +0200, Hannes Reinecke wrote:
> I have fixed the very same thing with my patchset titled "genhd:
> register default groups with device_add_disk" which is waiting for
> inclusion.
Thanks Hannes for the feedback. I will drop this patch series and review
your patches ins
This patch does not change the behavior of any existing code but
introduces a function that will be used by the next patch.
Signed-off-by: Bart Van Assche
Cc: Keith Busch
Cc: Christoph Hellwig
Cc: Greg Kroah-Hartman
Cc: Sagi Grimberg
Cc: Matias Bjorling
Cc:
---
block/genhd.c | 26
butes to sysfs")
Signed-off-by: Bart Van Assche
Cc: Keith Busch
Cc: Christoph Hellwig
Cc: Greg Kroah-Hartman
Cc: Sagi Grimberg
Cc: Matias Bjorling
Cc:
---
drivers/nvme/host/core.c | 17 +
drivers/nvme/host/lightnvm.c | 34 +++---
drivers
kernel.
Thanks,
Bart.
Bart Van Assche (2):
block: Introduce alloc_disk_node_attr()
nvme: Fix race conditions related to creation of /dev/nvme0n
block/genhd.c| 26 --
drivers/nvme/host/core.c | 17 +
drivers/nvme/host/lightnvm.c | 34
On Mon, 2018-08-13 at 17:24 +0800, jianchao.wang wrote:
> I'm afraid this will not work.
Since this patch fixes a bug that nobody has reported so far and since no
later patches rely on this patch, I will leave it out.
Thanks,
Bart.
Tejun.
Suggested-by: Tejun Heo
Fixes: 6bad9b210a22 ("blkcg: Introduce blkg_root_lookup()")
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
---
block/blk-sysfs.c | 2 +-
include/linux/blk-cgroup.h | 15 +--
2 files changed, 6 insertions(+), 11 deletions(-)
diff --g
On Fri, 2018-08-10 at 15:27 +, Bart Van Assche wrote:
> On Fri, 2018-08-10 at 10:39 +0800, jianchao.wang wrote:
> > On 08/10/2018 03:41 AM, Bart Van Assche wrote:
> > > +void blk_pm_runtime_exit(struct request_queue *q)
> > > +{
> > > +
On Fri, 2018-08-10 at 10:39 +0800, jianchao.wang wrote:
> On 08/10/2018 03:41 AM, Bart Van Assche wrote:
> > +void blk_pm_runtime_exit(struct request_queue *q)
> > +{
> > + if (!q->dev)
> > + return;
> > +
> > + pm_runti
On Fri, 2018-08-10 at 09:51 +0800, jianchao.wang wrote:
> On 08/10/2018 03:41 AM, Bart Van Assche wrote:
> > +
> > + blk_set_pm_only(q);
> > + /*
> > +* This function only gets called if the most recent
> > +* pm_request_resume() call occur
On Fri, 2018-08-10 at 09:59 +0800, jianchao.wang wrote:
> On 08/10/2018 03:41 AM, Bart Van Assche wrote:
> > Instead of scheduling runtime resume of a request queue after a
> > request has been queued, schedule asynchronous resume during request
> > allocation. The new pm_r
On Fri, 2018-08-10 at 09:39 +0800, jianchao.wang wrote:
> On 08/10/2018 03:41 AM, Bart Van Assche wrote:
> > +/*
> > + * Whether or not blk_queue_enter() should proceed. RQF_PM requests are
> > always
> > + * allowed. RQF_DV requests are allowed if the PM_ONLY q
On Fri, 2018-08-10 at 09:20 +0800, Ming Lei wrote:
> On Thu, Aug 09, 2018 at 12:41:39PM -0700, Bart Van Assche wrote:
> > Process all requests in state SDEV_CREATED instead of only RQF_DV
> > requests. This does not change the behavior of the SCSI core because
> > the SCSI dev
On Thu, 2018-08-09 at 12:56 -0700, Tejun Heo wrote:
> Hello,
>
> On Thu, Aug 09, 2018 at 07:53:36AM -0700, Bart Van Assche wrote:
> > +/**
> > + * blkg_lookup - look up blkg for the specified request queue
> > + * @q: request_queue of interest
> > + *
> > +
requests already have the RQF_PM flag
set.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: David S. Miller
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-core.c| 11 +--
block/blk-mq
n and system suspend").
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: Woody Suwalski
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
drivers/scsi/scsi_lib.c | 37 +--
dr
accessed easily from inside scsi_execute(). This
patch prevents that e.g. event checking can occur during domain
validation.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
scsi_device_unsuspend() for power management. Rename scsi_device_resume()
into scsi_device_unquiesce() to avoid confusion.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
drivers
Since it is possible to unbind a SCSI ULD and since unbinding
removes the association between a request queue and struct device,
the q->dev pointer has to be reset during unbind. Hence introduce
a function in the block layer that clears request_queue.dev.
Signed-off-by: Bart Van Assche
power management and blk_set_dv_only()
and blk_clear_dv_only() functions for SCSI domain validation purposes.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk
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
whether all states have been handled.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
drivers/scsi/scsi_lib.c | 78 +++--
1 file
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
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
Move the pm_request_resume() and pm_runtime_mark_last_busy() calls into
two new functions.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao Wang
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Cc: Alan Stern
---
block/blk-core.c | 1
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/blk-mq.c | 2 ++
block
me power management code into a separate file.
- Addressed Ming's feedback.
Bart Van Assche (12):
block, scsi: Introduce request flag RQF_DV
scsi: Alter handling of RQF_DV requests
scsi: Only set RQF_DV for requests used for domain validation
scsi: Introduce the SDEV_SUSPENDED device status
On Thu, 2018-08-09 at 10:52 +0800, Ming Lei wrote:
> On Wed, Aug 08, 2018 at 05:28:43PM +0000, Bart Van Assche wrote:
> > Some but not all blk_queue_enter() calls are related to request allocation
> > so
>
> The only one I remember is scsi_ioctl_reset(), in which scsi_a
eue removal and the
block cgroup controller") # v4.17
Signed-off-by: Bart Van Assche
Tested-by: Alexandru Moise <00moses.alexande...@gmail.com>
Reviewed-by: Johannes Thumshirn
Cc: Tejun Heo
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Alexandru Moise <00moses.alexande...@gma
.
Changes between v3 and v4:
- Added "Cc: stable" tags.
Changes between v2 and v3:
- Avoid code duplication by introducing a new helper function.
Changes between v1 and v2:
- Fixed the build for CONFIG_BLK_CGROUP=n.
Bart Van Assche (3):
blkcg: Introduce blkg_root_lookup()
block:
This new function will be used in a later patch to verify whether a
queue has been dissociated from the cgroup controller before being
released.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Omar Sandoval
Cc: Johannes Thumshirn
Cc: Alexandru Moise
This patch does not change any functionality.
Signed-off-by: Bart Van Assche
Reviewed-by: Johannes Thumshirn
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Omar Sandoval
Cc: Alexandru Moise <00moses.alexande...@gmail.com>
Cc: Joseph Qi
Cc:
---
block/blk-core.
Commit 12f5b9314545 ("blk-mq: Remove generation seqeunce") removed the
only seqcount_t and u64_stats_sync instances from but
did not remove the corresponding #include directives. Since these
include directives are no longer needed, remove them.
Signed-off-by: Bart Van Assche
Cc:
On Wed, 2018-08-08 at 08:23 -0700, Tejun Heo wrote:
> On Tue, Aug 07, 2018 at 03:51:28PM -0700, Bart Van Assche wrote:
> > Introduce a function that allows to determine whether a per-cpu refcount
> > is in use. This function will be used in a later patch to determine
> > whe
On Wed, 2018-08-08 at 16:50 +0800, Ming Lei wrote:
> On Tue, Aug 07, 2018 at 03:51:30PM -0700, 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
On Wed, 2018-08-08 at 14:43 +0800, jianchao.wang wrote:
>
> On 08/08/2018 02:11 PM, jianchao.wang wrote:
> > Hi Bart
> >
> > On 08/08/2018 06:51 AM, Bart Van Assche wrote:
> > > @@ -391,6 +393,9 @@ static struct request *blk_mq_get_reque
On Wed, 2018-08-08 at 16:21 +0800, Ming Lei wrote:
> On Tue, Aug 07, 2018 at 03:51:25PM -0700, Bart Van Assche wrote:
> > The RQF_PREEMPT flag is used for three purposes:
> > - In the SCSI core, for making sure that power management requests
> > are executed if a devic
On Wed, 2018-08-08 at 08:41 -0600, Jens Axboe wrote:
> On 7/30/18 3:10 PM, Bart Van Assche wrote:
> > +#ifdef CONFIG_BLK_CGROUP
> > + {
> > + struct blkcg_gq *blkg;
> > +
> > + rcu_read_lock();
> > +
E_FUNCTION(cfq_group_idle_us_store, &cfqd->cfq_group_idle, 0,
UINT_MAX);
^~~
Signed-off-by: Bart Van Assche
---
block/cfq-iosched.c | 22 --
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
ind
Hello Jens,
This patch series suppresses the compiler warnings that are reported when
building the CFQ I/O scheduler with W=1. Please consider these patches for
kernel v4.19.
Thanks,
Bart.
Bart Van Assche (2):
cfq: Annotate fall-through in a switch statement
cfq: Suppress compiler warnings
This patch avoids that gcc complains about fall-through when building
with W=1.
Signed-off-by: Bart Van Assche
---
block/cfq-iosched.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 82b6c27b3245..ec6acdd58b7a 100644
--- a/block/cfq-iosched.c
On Mon, 2018-08-06 at 10:18 -0700, Tejun Heo wrote:
> I'm worried that this is too inviting for misuses and subtle problems.
> For example, your patch which uses this function uses
> synchronize_rcu() to synchronize against per-cpu counts after the
> first snoop; however, percpu_ref uses sched rcu,
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| 11 +++
block/blk-mq.c
ode 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
Introduce a function that allows to determine whether a per-cpu refcount
is in use. This function will be used in a later patch to determine
whether or not any block layer requests are being executed.
Signed-off-by: Bart Van Assche
Cc: Tejun Heo
Cc: Christoph Hellwig
Cc: Ming Lei
Cc: Jianchao
o detect missing pm_runtime_get*() calls.
- Addressed Jianchao'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.
Bar
Since it is possible to unbind a SCSI ULD and since unbinding
removes the association between a request queue and struct device,
the q->dev pointer has to be reset during unbind. Hence introduce
a function in the block layer that clears request_queue.dev.
Signed-off-by: Bart Van Assche
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
Since this function is now empty, remove it.
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-pm.h | 8
block/elevator.c | 2 --
2 files changed, 10 deletions(-)
diff
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
Call blk_pm_put_request() after a request has finished.
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.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/blk-mq.c b
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
On Mon, 2018-07-30 at 14:10 -0700, Bart Van Assche wrote:
> Several block drivers call alloc_disk() followed by put_disk() if something
> fails before device_add_disk() is called without calling blk_cleanup_queue().
> Make sure that also for this scenario a request queue is dissociated
On Mon, 2018-08-06 at 10:18 -0700, Tejun Heo wrote:
> I'm worried that this is too inviting for misuses and subtle problems.
> For example, your patch which uses this function uses
> synchronize_rcu() to synchronize against per-cpu counts after the
> first snoop; however, percpu_ref uses sched rcu,
On Sat, 2018-08-04 at 18:01 +0800, Ming Lei wrote:
> On Sat, Aug 4, 2018 at 8:03 AM, Bart Van Assche
> wrote:
> >
> > diff --git a/block/blk-pm.c b/block/blk-pm.c
> > index 2a4632d0be4b..0708185ead61 100644
> > --- a/block/blk-pm.c
> > +++ b/block/bl
On Mon, 2018-08-06 at 10:46 +0800, jianchao.wang wrote:
> On 08/04/2018 08:03 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_r
On Sat, 2018-08-04 at 18:23 +0800, Ming Lei wrote:
> From user view, it isn't reasonable to prevent runtime suspend from happening
> during queue freeze. The period can be a bit long, and it should be one
> perfect
> opportunity to suspend device during the period since no any IO is possible.
Hel
On Sat, 2018-08-04 at 09:16 +0800, Ming Lei wrote:
> The above change will cause regression on SPI transport, please see
> spi_dv_device(), where non-PM command is sent to device via
> scsi_execute() after the device is put to QUIESCE.
Hello Ming,
I will drop this patch for now and revisit this c
On Mon, 2018-08-06 at 08:27 +0200, Hannes Reinecke wrote:
> I am not sure this is going to work for SCSI parallel; we're using the
> QUIESCE state there to do domain validation, and all commands there are
> most definitely not PM requests.
> Can you please validate your patches with eg aic7xxx and
.
Signed-off-by: Bart Van Assche
Cc: Martin K. Petersen
Cc: Christoph Hellwig
Cc: Jianchao Wang
Cc: Ming Lei
Cc: Alan Stern
Cc: Johannes Thumshirn
---
block/blk-core.c| 9 +
drivers/scsi/scsi_lib.c | 28
include/linux/blk-mq.h | 2 ++
include
Make sure that blk_pm_add_request() is called exactly once before
a request is added to a software queue, to the scheduler and also
before .queue_rq() is called directly. Call blk_pm_put_request()
after a request has finished.
Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Jianchao
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: Martin K. Peters
).
Signed-off-by: Bart Van Assche
Cc: David S. Miller
Cc: Christoph Hellwig
Cc: Jianchao Wang
Cc: Ming Lei
Cc: Alan Stern
Cc: Johannes Thumshirn
---
block/blk-core.c | 9 +++--
block/blk-mq.c | 2 --
drivers/ide/ide-pm.c | 3 ++-
include/linux/blk-mq.h | 4 +---
4 files
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: Jianchao Wang
Cc: Ming Lei
Cc: Alan Stern
Cc: Johannes Thumshirn
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 (10):
block: Change the preempt-only flag into a counter
block, scsi: Give RQF_PREEMPT back its original meani
501 - 600 of 2722 matches
Mail list logo