Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-14 Thread Greg KH
On Tue, Jun 12, 2007 at 04:30:57PM +0200, Stefan Richter wrote: > > There is so much unskilled labor in driver hacking land (I'm merely > speaking for myself of course) that something like the driver core > /really/ needs well-working, easy to understand, and well-documented APIs. > > PS: By a

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-14 Thread Greg KH
On Tue, Jun 12, 2007 at 04:30:57PM +0200, Stefan Richter wrote: There is so much unskilled labor in driver hacking land (I'm merely speaking for myself of course) that something like the driver core /really/ needs well-working, easy to understand, and well-documented APIs. PS: By a

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-12 Thread Stefan Richter
Huang, Ying wrote: > The summary of dependency rule is as follow: > > 1. A flag as follow is added to struct device. > unsigned multithreaded_probe:1; > If it is set, the devices sub-tree with this device as root will be > probed parallelized with other devices sub-tree. If it is clear, the

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-12 Thread Stefan Richter
Huang, Ying wrote: The summary of dependency rule is as follow: 1. A flag as follow is added to struct device. unsigned multithreaded_probe:1; If it is set, the devices sub-tree with this device as root will be probed parallelized with other devices sub-tree. If it is clear, the

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-11 Thread Huang, Ying
> > Index: linux-2.6.22-rc4/include/linux/device.h > > === > > --- linux-2.6.22-rc4.orig/include/linux/device.h2007-06-08 > > 18:26:11.0 +0800 > > +++ linux-2.6.22-rc4/include/linux/device.h 2007-06-09 > >

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-11 Thread Huang, Ying
Index: linux-2.6.22-rc4/include/linux/device.h === --- linux-2.6.22-rc4.orig/include/linux/device.h2007-06-08 18:26:11.0 +0800 +++ linux-2.6.22-rc4/include/linux/device.h 2007-06-09 19:41:03.0 +0800

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-09 Thread Stefan Richter
Huang, Ying wrote: > Can this mechanism solve the demand of IEEE1394 subsystem effectively? Probably. I don't know when I will have time to try it. (BTW, we should actually be able to probe subunits in parallel, however I suspect that some firmwares will not tolerate this.) ... > +/** > + *

RE: [PATCH] driver core: multithreaded device matching with dependency

2007-06-09 Thread Huang, Ying
Hi, Stefan, I have worked out a new patch with single-threaded unit supported in multithreaded device probing. A new flag as follow is added to struct device, unsigned singlethreaded_probe:1; Which indicate that the device node and all its children node must be probed single-threaded. During

RE: [PATCH] driver core: multithreaded device matching with dependency

2007-06-09 Thread Huang, Ying
Hi, Stefan, I have worked out a new patch with single-threaded unit supported in multithreaded device probing. A new flag as follow is added to struct device, unsigned singlethreaded_probe:1; Which indicate that the device node and all its children node must be probed single-threaded. During

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-09 Thread Stefan Richter
Huang, Ying wrote: Can this mechanism solve the demand of IEEE1394 subsystem effectively? Probably. I don't know when I will have time to try it. (BTW, we should actually be able to probe subunits in parallel, however I suspect that some firmwares will not tolerate this.) ... +/** + *

RE: [PATCH] driver core: multithreaded device matching with dependency

2007-06-08 Thread Huang, Ying
>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

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-08 Thread Stefan Richter
Huang, Ying wrote: >>From: Stefan Richter [mailto:[EMAIL PROTECTED] >> >>How can subsystems control multithreaded vs. singlethreaded probes? >> >>For example, the IEEE 1394 subsystem should probe different nodes in >>parallel, but different units on the same node serially. Similar >>requirements

RE: [PATCH] driver core: multithreaded device matching with dependency

2007-06-08 Thread Huang, Ying
>From: Stefan Richter [mailto:[EMAIL PROTECTED] > >How can subsystems control multithreaded vs. singlethreaded probes? > >For example, the IEEE 1394 subsystem should probe different nodes in >parallel, but different units on the same node serially. Similar >requirements exist with other hardware.

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-08 Thread Stefan Richter
Huang, Ying wrote: > This is another solution to implement multithreaded device matching > (probing). The device matching is delayed until all drivers are > registered. The driver registering is executed one by one, this > eliminates the potential of interdependency between driver. All devices >

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-08 Thread Stefan Richter
Huang, Ying wrote: This is another solution to implement multithreaded device matching (probing). The device matching is delayed until all drivers are registered. The driver registering is executed one by one, this eliminates the potential of interdependency between driver. All devices are

RE: [PATCH] driver core: multithreaded device matching with dependency

2007-06-08 Thread Huang, Ying
From: Stefan Richter [mailto:[EMAIL PROTECTED] How can subsystems control multithreaded vs. singlethreaded probes? For example, the IEEE 1394 subsystem should probe different nodes in parallel, but different units on the same node serially. Similar requirements exist with other hardware. For

Re: [PATCH] driver core: multithreaded device matching with dependency

2007-06-08 Thread Stefan Richter
Huang, Ying wrote: From: Stefan Richter [mailto:[EMAIL PROTECTED] How can subsystems control multithreaded vs. singlethreaded probes? For example, the IEEE 1394 subsystem should probe different nodes in parallel, but different units on the same node serially. Similar requirements exist with

RE: [PATCH] driver core: multithreaded device matching with dependency

2007-06-08 Thread Huang, Ying
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