Re: [PATCH v9 7/8] block: Make blk_get_request() block for non-PM requests while suspended

2018-09-19 Thread Ming Lei
On Wed, Sep 19, 2018 at 03:45:29PM -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_get_request() caller block. This change fixes a starvation > issue: it is now

Re: [PATCH v8 6/8] block: Schedule runtime resume earlier

2018-09-19 Thread Ming Lei
On Wed, Sep 19, 2018 at 02:39:35PM -0700, Bart Van Assche wrote: > 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: > > > > ---

[PATCH v9 6/8] block: Schedule runtime resume earlier

2018-09-19 Thread Bart Van Assche
Instead of scheduling runtime resume of a request queue after a request has been queued, schedule asynchronous resume during request allocation. The new pm_request_resume() calls occur after blk_queue_enter() has increased the q_usage_counter request queue member. This change is needed for a later

[PATCH v9 4/8] block, scsi: Change the preempt-only flag into a counter

2018-09-19 Thread Bart Van Assche
The RQF_PREEMPT flag is used for three purposes: - In the SCSI core, for making sure that power management requests are executed even if a device is in the "quiesced" state. - For domain validation by SCSI drivers that use the parallel port. - In the IDE driver, for IDE preempt requests. Rename

[PATCH v9 8/8] blk-mq: Enable support for runtime power management

2018-09-19 Thread Bart Van Assche
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 v9 1/8] blk-mq: Document the functions that iterate over requests

2018-09-19 Thread Bart Van Assche
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:

[PATCH v9 7/8] block: Make blk_get_request() block for non-PM requests while suspended

2018-09-19 Thread Bart Van Assche
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 issue: it is now guaranteed that power management requests will be executed no matter how many

[PATCH v9 0/8] blk-mq: Implement runtime power management

2018-09-19 Thread Bart Van Assche
Hello Jens, One of the pieces that is missing before blk-mq can be made the default is implementing runtime power management support for blk-mq. This patch series not only implements runtime power management for blk-mq but also fixes a starvation issue in the power management code for the legacy

[PATCH v9 2/8] blk-mq: Introduce blk_mq_queue_rq_iter()

2018-09-19 Thread Bart Van Assche
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-tag.c | 44

Re: [PATCH v8 6/8] block: Schedule runtime resume earlier

2018-09-19 Thread Bart Van Assche
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 >

Re: [PATCH v7 5/6] block: Make blk_get_request() block for non-PM requests while suspended

2018-09-19 Thread Bart Van Assche
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 the legacy block layer, nr_pending

[BUG]kmemleak in cfq_get_queue+0x213

2018-09-19 Thread Jinpu Wang
Hi, I notice following kmemleak warning on 4.14.65 when running blktests unreferenced object 0x88031d34f7c0 (size 240): comm "kworker/0:1", pid 18344, jiffies 4301519574 (age 3716.610s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 51 f9 bc 02 88 ff ff .Q.. d0

Re: [RFC PATCH 0/6] lightnvm: pblk: Introduce RAIL to enforce low tail read latency

2018-09-19 Thread Hans Holmberg
On Tue, Sep 18, 2018 at 6:13 PM Heiner Litz wrote: > > Hi Hans, > thanks a lot for your comments! I will send you a git repo to test. I > have a patch which enables/disables RAIL via ioctl and will send that > as well. Great! Once I have the code in a branch i can start creating test cases for

Re: [RFC PATCH 5/6] lightnvm: pblk: Add RAIL interface

2018-09-19 Thread Hans Holmberg
On Tue, Sep 18, 2018 at 6:11 PM Heiner Litz wrote: > > On Tue, Sep 18, 2018 at 4:28 AM Hans Holmberg > wrote: > > > > On Mon, Sep 17, 2018 at 7:30 AM Heiner Litz wrote: > > > > > > In prepartion of supporting RAIL, add the RAIL API. > > > > > > Signed-off-by: Heiner Litz > > > --- > > >