lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 4 Apr 2013 07:20:58 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Aaron Lu <aaron.lu@...el.com>
Cc:	Jens Axboe <axboe@...nel.dk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>
Subject: Re: [PATCH] blk: start bypass mode in blk_unregister_queue

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.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists