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:	Fri, 8 Jun 2007 23:16:15 +0800
From:	"Huang, Ying" <ying.huang@...el.com>
To:	"Stefan Richter" <stefanr@...6.in-berlin.de>
Cc:	<linux-kernel@...r.kernel.org>, "Greg KH" <greg@...ah.com>
Subject: RE: [PATCH] driver core: multithreaded device matching with dependency

>A bad API.  Subsystems and the driver core will both traverse the trees
>(usually just lists) which can be built from the depend pointers, and
>the trees grow and shrink dynamically.  Perhaps it would be simpler if
>the subsystem would just use a mutex per group of devices which have to
>be serialized.

Yes, this is a bad API. I have a new idea. The /sys/devices is a tree,
which is linked by dev->klist_children, any sub-tree of /sys/devices
tree can be a parallel unit, which can be indicated by a flag of struct
device of root node of sub-tree. In a sub-tree being a parallel unit,
all probing is serialized, while the probing of different sub-trees is
parallelized. The find_next_device_to_check will not traverse through
devices_subsys.list, but traverse through dev->klist_children. In the
IEEE 1394 case, the "node" can be a parallel unit (sub-tree) by set the
corresponding flag in struct device of "node", and the "unit" under
"node" will be probed serially. In general, subsystems can set the flag
in any struct device if necessary, even the root struct device of
subsystem, which means all devices in the subsystem must be probed
serially.

I will work out a new patch based on this new idea.

>*However*, IMO parallelized probing should be implemented in the
>subsystems themselves in the first place, _not in the driver core_.
>
>The subsystems know where parallelism is possible and safe and
>effective, the driver core doesn't.

I totally agree that the parallelized probing should be controlled by
the subsystems. By if the mechanism can be provided by driver core
effectively, the solution will be ideal.

Best Regards,
Huang Ying
-
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