Re: [PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess

2014-07-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig 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

[PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess

2014-07-18 Thread Christoph Hellwig
Seems like these counters are missing any sort of synchronization for updates, as a over 10 year old comment from me noted. Fix this by using atomic counters, and while we're at it also make sure they are in the same cacheline as the _busy counters and not needlessly stored to in every I/O complet

Re: [PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess

2014-07-09 Thread Christoph Hellwig
On Wed, Jul 09, 2014 at 01:12:17PM +0200, Hannes Reinecke wrote: > Hmm. I guess there is a race window between > atomic_read() and atomic_set(). > Doesn't this cause issues when someone calls atomic_set() just before the > call to atomic_read? There is a race window just _after_ the atomic_read,

Re: [PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess

2014-07-09 Thread Hannes Reinecke
On 06/25/2014 06:51 PM, Christoph Hellwig wrote: Seems like these counters are missing any sort of synchronization for updates, as a over 10 year old comment from me noted. Fix this by using atomic counters, and while we're at it also make sure they are in the same cacheline as the _busy counter

[PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess

2014-06-25 Thread Christoph Hellwig
Seems like these counters are missing any sort of synchronization for updates, as a over 10 year old comment from me noted. Fix this by using atomic counters, and while we're at it also make sure they are in the same cacheline as the _busy counters and not needlessly stored to in every I/O complet

[PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess

2014-06-12 Thread Christoph Hellwig
Seems like these counters are missing any sort of synchronization for updates, as a over 10 year old comment from me noted. Fix this by using atomic counters, and while we're at it also make sure they are in the same cacheline as the _busy counters and not needlessly stored to in every I/O complet