On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote:
> Replace the old BLKRREP_* values with the BLK_STS_ ones that they are
> converted to later anyway.
Reviewed-by: Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote:
> There is no need to call scsi_mq_free_sgtables until we have actually
> allocated sgtables.
Reviewed-by: Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote:
> This just moves the prep_to_mq calls up in preparation of further removal
> of BLKPREP_* usage.
Reviewed-by: Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote:
> The return value is just used as a binary yes/no decicsion, so switch
> it to a bool instead of the old BLKPREP_* values returned as an int.
Reviewed-by: Bart Van Assche
On Fri, 2018-11-09 at 14:42 +0100, Christoph Hellwig wrote:
> Return a blk_status_t directly, and make the code a little more compact
> by handling the fast path in the caller.
Reviewed-by: Bart Van Assche
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 *bitm
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 @@ struct sh
; + * 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 blk_mq_finish_requ
On Tue, 2018-11-06 at 19:30 -0800, Sagi Grimberg wrote:
> > > How about changing that expression into the following to make it easier
> > > for the compiler to optimize this code?
> > >
> > > (offset | (bprv->bv_offset + bprv->bv_len)) & queue_virt_boundary(q)
> >
> > Uhm I have to admit I'm not
On 11/5/18 2:23 AM, Johannes Thumshirn wrote:
@@ -169,7 +169,7 @@ static inline bool biovec_phys_mergeable(struct
request_queue *q,
static inline bool __bvec_gap_to_prev(struct request_queue *q,
struct bio_vec *bprv, unsigned int offset)
{
- return offset ||
+ ret
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 15:44 -0700, Gwendal Grignou wrote:
> On Thu, Nov 1, 2018 at 11:15 AM Evan Green wrote:
> >
> > On Tue, Oct 30, 2018 at 4:50 PM Bart Van Assche wrote:
> > >
> > > On Tue, 2018-10-30 at 16:06 -0700, Evan Green wrote:
> > > >
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
> ---
> sr
On Wed, 2018-10-31 at 18:34 +0200, Boaz Harrosh wrote:
> On 27/10/18 11:20, Christoph Hellwig wrote:
> > The only real user of the T10 OSD protocol, the pNFS object layout
> > driver never went to the point of having shipping products, and we
> > removed it 1.5 years ago. Exofs is just a simple ex
On Tue, 2018-10-30 at 16:06 -0700, Evan Green wrote:
> This series addresses some errors seen when using the loop
> device directly backed by a block device. The first change plumbs
> out the correct error message, and the second change prevents the
> error from occurring in many cases.
Hi Evan,
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:
> >
> > Reviewed-b
> 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 t
On Sat, 2018-10-27 at 10:20 +0200, Christoph Hellwig wrote:
> Now that all the users are gone the SCSI OSD library can be removed
> as well.
Reviewed-by: Bart Van Assche
On Sat, 2018-10-27 at 10:20 +0200, Christoph Hellwig wrote:
> This was an example for using the SCSI OSD protocol, which we're trying
> to remove.
Reviewed-by: Bart Van Assche
On Mon, 2018-10-29 at 14:09 -0600, Jens Axboe wrote:
> hctx->type will be set to the value of the first type. This is all driver
> private, blk-mq could not care less what the value of the type means.
>
> As to the other question, it works just fine since that is the queue
> that is being accessed
On Mon, 2018-10-29 at 13:53 -0600, Jens Axboe wrote:
> On 10/29/18 1:40 PM, Bart Van Assche wrote:
> > On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
> > > -static int cpu_to_queue_index(unsigned int nr_queues, const int cpu)
> > > +static int cpu_to_queue_index(st
On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
> -static int cpu_to_queue_index(unsigned int nr_queues, const int cpu)
> +static int cpu_to_queue_index(struct blk_mq_queue_map *qmap,
> + unsigned int nr_queues, const int cpu)
> {
> - return cpu % nr_queues;
> +
On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
> void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
> {
> struct blk_mq_ctx *this_ctx;
> @@ -1628,7 +1649,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool
> from_schedule)
> struct request *rq;
>
ewed a later patch in this series. Anyway:
Reviewed-by: Bart Van Assche
; + * Maximum number of queues we support. For single sets, we'll never have
^
hardware?
> + * more than the CPUs (software queues). For multiple sets, the tag_set
> + * user may have set ->nr_hw_queues larger.
> + */
Anyway:
Reviewed-by: Bart Van Assche
On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
> -static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
> - unsigned int flags,
> - int cpu)
> +static inline struct blk_mq
On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
> It can be useful for a user to verify what type a given hardware
> queue is, expose this information in sysfs.
Reviewed-by: Bart Van Assche
On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
> The mapping used to be dependent on just the CPU location, but
> now it's a tuple of { type, cpu} instead. This is a prep patch
> for allowing a single software queue to map to multiple hardware
> queues. No functional changes in this patch.
A
On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
> @@ -400,9 +402,15 @@ void blk_mq_sched_insert_requests(struct request_queue
> *q,
> struct blk_mq_ctx *ctx,
> struct list_head *list, bool run_queue_async)
> {
> - struct blk
On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
> diff --git a/block/blk-mq.h b/block/blk-mq.h
> index 889f0069dd80..79c300faa7ce 100644
> --- a/block/blk-mq.h
> +++ b/block/blk-mq.h
> @@ -80,6 +80,12 @@ static inline struct blk_mq_hw_ctx
> *blk_mq_map_queue(struct request_queue *q,
> r
at it is clear that that move is intentional.
Anyway:
Reviewed-by: Bart Van Assche
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
> --- a/src/discont
On Fri, 2018-10-26 at 10:39 -0400, Kyungtae Kim wrote:
> setup_rw_floppy() writes some bytes of array cmd to the floppy disk
> controller, depending on cmd_count.
> Although the size of array cmd is fixed like 16, cmd_count can be much
> larger through raw_cmd_ioctl().
> Noticed there is no bound c
On Fri, 2018-10-26 at 08:32 -0600, Jens Axboe wrote:
> On 10/26/18 1:08 AM, Hannes Reinecke wrote:
> > On 10/25/18 11:10 PM, Jens Axboe wrote:
> > > This check is only viable for non scsi-mq. Since that is going away,
> > > kill this legacy check.
> > >
> &
On Thu, 2018-10-25 at 15:10 -0600, Jens Axboe wrote:
> The first round of this went into 4.20-rc, but we've still some of
> them pending. This patch series converts the remaining drivers to
> blk-mq. The ones that support dual paths (like SCSI and DM) have
> the non-mq path removed. At the end, leg
On Thu, 2018-10-25 at 15:10 -0600, Jens Axboe wrote:
> Nobody sets the helper, so we always return 0. Kill it.
How about changing the description of this patch into something
like "Now that the blk_lld_busy() and blk_queue_lld_busy() callers
have been removed, also remove the implementations of th
On Thu, 2018-10-25 at 15:10 -0600, Jens Axboe wrote:
> @@ -3265,25 +3261,17 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct
> pci_device_id *id)
> base_vha->mgmt_svr_loop_id, host->sg_tablesize);
>
> if (ha->mqenable) {
> - bool mq = false;
> boo
On Thu, 2018-10-25 at 15:10 -0600, Jens Axboe wrote:
> This check is only viable for non scsi-mq. Since that is going away,
> kill this legacy check.
>
> Cc: Bart Van Assche
> Cc: Parav Pandit
> Cc: linux-s...@vger.kernel.org
> Signed-off-by: Jens Axboe
> ---
>
On Wed, 2018-10-24 at 11:37 -0400, Martin K. Petersen wrote:
> Mike,
>
> > > You keep mentioning this, but I don't recall ever seeing anything to
> > > that effect. The rest of the kernel appears to be either arbitrary
> > > ordering or favoring author SoB as the first tag.
> >
> > I've always fe
be perceptible
^ ^^^
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 drivin
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
> + * - "no
On 10/12/18 12:15 AM, Hannes Reinecke wrote:
Hi all,
as we're trying to get rid of the remaining request_fn drivers here's
a patchset to move the DAC960 driver to the SCSI stack.
As per request from hch I've split up the driver into two new SCSI
drivers called 'myrb' and 'myrs'.
Hi Hannes,
Ap
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 look a
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
" 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
ode 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 the preempt-only flag into a counter
block: Split blk_pm_add_request() and blk_pm_put_request()
block: Schedule runtime resume earlier
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/
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, sor
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
> ac
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 (e->type->
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
" 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
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
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 (8):
block: Move power management code into a new source file
block,
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
On Thu, 2018-09-20 at 11:48 +0800, Ming Lei wrote:
> On Wed, Sep 19, 2018 at 03:45:29PM -0700, Bart Van Assche wrote:
> > + ret = -EBUSY;
> > + if (blk_requests_in_flight(q) == 0) {
> > + blk_freeze_queue_start(q);
> > + /*
> > +
" 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
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
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
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
time power 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
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 but
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
401 - 500 of 2721 matches
Mail list logo