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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 03 Mar 2008 18:58:32 +0100
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Kristian Høgsberg <krh@...planet.net>
CC:	linux1394-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] firewire: reread config ROM when device reset the bus

Kristian Høgsberg wrote:
> On Mon, Mar 3, 2008 at 11:51 AM, Stefan Richter
> <stefanr@...6.in-berlin.de> wrote:
> ...
>>  Maybe I should rather use fw-device.c::idr_rwsem instead of device.sem,
>>  to have better control over who takes the mutex when.  Could also be a
>>  new dedicated mutex but we don't want to end up with too many of them...
>>  Do you have an opinion?
> 
> Using the struct device mutex is fine, and it parallelizes better than
> the global idr_mutex (FWIW).  The only concern I have there is that
> the device core structs seem to change now and then, and it's not
> clear what is implementation details and what is exported for drivers
> to use (eg the subsystem sem).

This may be more of a concern to anybody who wanted to change the driver 
core internals and might be unsure what to do with those three dev->sem 
taking sites which I added; not so much a concern from the firewire 
driver maintenance POV.

OTOH, contention for idr_rwsem is low and there can be multiple readers 
of course.  The most time consuming thing that could happen would be 
waiting for GFP_KERNEL allocations of new IDR tree leaves.  And maybe 
having the dev->sem in a cacheline but idr_rwsem not is probably not a 
concern for the stuff that the writer and the two readers of the ROM 
cache do.

Ah, wait, there is a 3rd reader: sbp2_probe's sbp2_scan_unit_dir.  So, 
using dev->sem is actually the nicest way for now.
-- 
Stefan Richter
-=====-==--- --== ---==
http://arcgraph.de/sr/
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ