From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess Date: Fri, 25 Jul 2014 15:08:46 -0400 Message-ID: References: <1405678393-11497-1-git-send-email-hch@lst.de> <1405678393-11497-10-git-send-email-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1405678393-11497-10-git-send-email-hch@lst.de> (Christoph Hellwig's message of "Fri, 18 Jul 2014 12:13:08 +0200") Sender: linux-kernel-owner@vger.kernel.org To: Christoph Hellwig Cc: James Bottomley , linux-scsi@vger.kernel.org, Jens Axboe , Bart Van Assche , Mike Christie , "Martin K. Petersen" , Robert Elliott , Webb Scales , linux-kernel@vger.kernel.org List-Id: linux-scsi@vger.kernel.org >>>>> "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 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 K. Petersen Oracle Linux Engineering