On Wed, Sep 26, 2018 at 11:24:55AM -0700, Bart Van Assche wrote:
> 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
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, 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
actually some places in the kernel that follow this pattern.
On Wed, Sep 26, 2018 at 04:43:57PM +0200, Johannes Thumshirn wrote:
> > assert, so I guess we'll have to live with it..
>
> How about:
> if (IS_ENABLED(CONFIG_PM))
> WARN_ON_ONCE(q->rpm_status == RPM_SUSPENDED);
I don't think this actually works
On Wed, Sep 26, 2018 at 04:27:40PM +0200, Christoph Hellwig wrote:
> > list_for_each_entry(rq, >queue_head, queuelist) {
> > - if (blk_pm_allow_request(rq))
> > - return rq;
> > -
> > - if (rq->rq_flags & RQF_SOFTBARRIER)
>
> list_for_each_entry(rq, >queue_head, queuelist) {
> - if (blk_pm_allow_request(rq))
> - return rq;
> -
> - if (rq->rq_flags & RQF_SOFTBARRIER)
> - break;
> +#ifdef CONFIG_PM
> +
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