Re: [PATCH 2/6] scsi: avoid taking host_lock in scsi_run_queue unless nessecary

2014-02-12 Thread Christoph Hellwig
On Wed, Feb 12, 2014 at 12:08:35PM +0100, Hannes Reinecke wrote: > What happens when another CPU is just modifying the starved list > at this point? > We probably won't be seeing the update until when the next command > completed. That's correct if the last was emptry previous. list_empty won't r

Re: [PATCH 2/6] scsi: avoid taking host_lock in scsi_run_queue unless nessecary

2014-02-12 Thread Hannes Reinecke
On 02/06/2014 07:43 PM, Christoph Hellwig wrote: > If we don't have starved devices we don't need to take the host lock > to iterate over them. Also split the function up to be more clear. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/scsi_lib.c | 43 --

[PATCH 2/6] scsi: avoid taking host_lock in scsi_run_queue unless nessecary

2014-02-06 Thread Christoph Hellwig
If we don't have starved devices we don't need to take the host lock to iterate over them. Also split the function up to be more clear. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_lib.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions