From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Van Assche Subject: Re: [PATCH v6 03/13] block: Avoid that request_fn is invoked on a dead queue Date: Sun, 02 Dec 2012 14:35:52 +0100 Message-ID: <50BB5938.9040207@acm.org> References: <50B60619.4080406@acm.org> <50B60745.8060806@acm.org> <20121202132320.GC15930@mtj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from gerard.telenet-ops.be ([195.130.132.48]:55165 "EHLO gerard.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751770Ab2LBNf4 (ORCPT ); Sun, 2 Dec 2012 08:35:56 -0500 In-Reply-To: <20121202132320.GC15930@mtj.dyndns.org> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Tejun Heo Cc: linux-scsi , James Bottomley , Mike Christie , Jens Axboe , Chanho Min , Hannes Reinecke On 12/02/12 14:23, Tejun Heo wrote: > On Wed, Nov 28, 2012 at 01:44:53PM +0100, Bart Van Assche wrote: >> A block driver may start cleaning up resources needed by its >> request_fn as soon as blk_cleanup_queue() finished, so request_fn >> must not be invoked after draining finished. This is important >> when blk_run_queue() is invoked without any requests in progress. >> As an example, if blk_drain_queue() and scsi_run_queue() run in >> parallel, blk_drain_queue() may have finished all requests after >> scsi_run_queue() has taken a SCSI device off the starved list but >> before that last function has had a chance to run the queue. >> >> Signed-off-by: Bart Van Assche >> Cc: James Bottomley >> Cc: Mike Christie >> Cc: Jens Axboe >> Cc: Tejun Heo >> Cc: Chanho Min > > Acked-by: Tejun Heo > >> +inline void __blk_run_queue_uncond(struct request_queue *q) > > Does this inline actually make a difference in the generated code? Yes. Without that "inline" keyword that function is not inlined in __blk_run_queue() but with that "inline" keyword it is inlined. At least with gcc 4.7.1 - I have not checked any other gcc versions. Bart.