Messages in this thread | | | Subject | Re: [PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess | From | "Martin K. Petersen" <> | Date | Fri, 25 Jul 2014 15:08:46 -0400 |
| |
>>>>> "Christoph" == Christoph Hellwig <hch@lst.de> writes:
Christoph> Seems like these counters are missing any sort of Christoph> synchronization for updates, as a over 10 year old comment Christoph> from me noted. Fix this by using atomic counters, and while Christoph> we're at it also make sure they are in the same cacheline as Christoph> the _busy counters and not needlessly stored to in every I/O Christoph> completion.
Christoph> With the new model the _busy counters can temporarily go Christoph> negative, so all the readers are updated to check for > 0 Christoph> values. Longer term every successful I/O completion will Christoph> reset the counters to zero, so the temporarily negative Christoph> values will not cause any harm.
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
-- Martin K. Petersen Oracle Linux Engineering
| |