[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1519967555.25932.3.camel@wdc.com>
Date: Fri, 2 Mar 2018 05:12:36 +0000
From: Bart Van Assche <Bart.VanAssche@....com>
To: "opensource.ganesh@...il.com" <opensource.ganesh@...il.com>
CC: "jejb@...ux.vnet.ibm.com" <jejb@...ux.vnet.ibm.com>,
"hch@....de" <hch@....de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>
Subject: Re: [PATCH] scsi_lib: increase {host|target|device}_busy count after
dispatch cmd
On Fri, 2018-03-02 at 12:56 +0800, Ganesh Mahendran wrote:
> 2018-03-02 7:11 GMT+08:00 Bart Van Assche <Bart.VanAssche@....com>:
> > On Mon, 2017-06-05 at 17:37 +0800, Ganesh Mahendran wrote:
> > > In android system, when there are lots of threads running. Thread A
> > > holding *host_busy* count is easily to be preempted, and if at the
> > > same time, thread B set *host_blocked*, then all other threads will
> > > be io blocked.
> >
> > Have you considered to insert preempt_disable() and preempt_enable() calls
> > where necessary to achieve the same effect? I think that would result in a
> > much less intrusive patch.
>
> Yes, preempt_disable()preempt_enable will also achieve the same effect.
> But I just think preempt_disable()preempt_enable may be a little heavy for
> this problem which can be fixed by increaseing {host|target|device}_busy count
> after dispatch cmd.
Hello Ganesh,
If the {host,target,device}_busy counts would be increased after dispatch,
could that result in scsi_device_unbusy() being called from the completion
path before these counts have been increased?
Additionally, have you noticed that your patch does not apply anymore to
recent kernels since some of the counters are now increased from inside
scsi_mq_get_budget(), a function that is called from inside the block layer?
Thanks,
Bart.
Powered by blists - more mailing lists