All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH] blk: start bypass mode in blk_unregister_queue
Date: Thu, 04 Apr 2013 22:24:56 +0800	[thread overview]
Message-ID: <515D8D38.3060009@intel.com> (raw)
In-Reply-To: <20130404142058.GF9425@htj.dyndns.org>

On 04/04/2013 10:20 PM, Tejun Heo wrote:
> Hello,
> 
> On Thu, Apr 04, 2013 at 10:16:39PM +0800, Aaron Lu wrote:
>> It probably wouldn't happen for normal user, only for some SCSI driver
>> developers like me, e.g. the sr_mod will normally load during boot, and
>> when I made some changes to the code, I'll unload the driver and reload
>> it. This is found when I was developing ZPODD code and I just found some
>> time to see what happened.
> 
> Does that unregister and register the same queue?  Ah, crap, it does.
> 
>> The queue for the scsi device will always be there, the queue(and the
>> device) will not go away on driver unregistration. So it will be left in
>> normal mode, and on next blk_register_queue call, the warning will show
>> up.
>>
>>> Starting a bypass mode can be very expensive and some drivers create
>>> and destroy a lot of queues during probing.  We don't want a call to
>>> blk_queue_bypass_start() on every queue creation / destruction cycle.
>>
>> By expensive, do you mean the drain of the queue? Since the queue is to
>> be unregistered, I suppose the queue has to be drained somewhere?
> 
> The problematic one is synchronize_rcu().  It adds up pretty quickly.
> I'd suggest just skipping blk_queue_bypass_end() during registration
> if the queue is not bypassing.

OK, thanks for the suggestion!

-Aaron


      reply	other threads:[~2013-04-04 14:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1364308501-1640-1-git-send-email-aaron.lu@intel.com>
2013-04-04 14:01 ` [PATCH] blk: start bypass mode in blk_unregister_queue Aaron Lu
2013-04-04 14:03   ` Tejun Heo
2013-04-04 14:16     ` Aaron Lu
2013-04-04 14:20       ` Tejun Heo
2013-04-04 14:24         ` Aaron Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=515D8D38.3060009@intel.com \
    --to=aaron.lu@intel.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.