Re: [PATCH RFD] alternative kobject release wait mechanism



Hi Tejun,

On 4/20/07, Tejun Heo <htejun@xxxxxxxxx> wrote:
Hello, Dmitry.

Dmitry Torokhov wrote:
> On 4/19/07, Cornelia Huck <cornelia.huck@xxxxxxxxxx> wrote:
>> On Thu, 19 Apr 2007 09:13:43 -0400,
>> "Dmitry Torokhov" <dmitry.torokhov@xxxxxxxxx> wrote:
>>
>> > Because they are managed by 2 different entities. the struct device
>> > objects are managed by device core and driver-specific objects are
>> > managed by their respective driver.
>>
>> Not sure if I understand you here. My view of this was always that the
>> embedding object was kind of an extended device and that the relevant
>> driver/subsystem managed it through the driver core infrastructure.
>>
>
> I am not sure if I agree with this point of view. Driver (or
> subsystem) provides an instance of struct device for the rest of the
> system to iteract uniformly with (suspend/resume/tree
> visualization/etc) i.e. struct device implement an interface for
> subsystems. However most of the system use their own mechanisms to
> manage their devices. They can rely on the driver core to a certain
> degree but driver core is mostly a carries out helper functions, not
> the meat.

Many drivers (at least all the SCSI/IDE ones) consider struct device as
the base class of the devices those drivers implement. I don't think we
can just consider those drivers to be wrong.

I am not saying they are wrong I am just saying that driver core is
not where most work is done. Every subsystem has its own locking rules
and lifetime rules and they are what is important. Whether subsystem
uses embedding or referencing of struct devices is implementation
detail.

What is the goal of driver core? I thought the main goal was to have
an uniform interface for device power management and presentation of
device tree to userspace. It has nothing to do with main purposes of
every individual subsystem - making some set of devices/services work.

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



Relevant Pages

  • Re: [PATCH RFD] alternative kobject release wait mechanism
    ... > I am not saying they are wrong I am just saying that driver core is ... Every subsystem has its own locking rules ... The driver's lifetime rules matters but currently the driver model ... imposes reference counted model to each struct device. ...
    (Linux-Kernel)
  • Re: klists and struct device semaphores
    ... with some help from some core utility functions and some hand ... The driver (or bus subsystem) can determine if the parent needs to ... So, I think we need the counter in struct device, along with some helper ...
    (Linux-Kernel)
  • Re: [PATCH RFD] alternative kobject release wait mechanism
    ... driver/subsystem managed it through the driver core infrastructure. ... subsystem) provides an instance of struct device for the rest of the ...
    (Linux-Kernel)
  • Re: Vista fixes PCIe re-install problem ... why ?
    ... This would cause Server 2003 to avoid the power state transition ... their subsystem ID changes. ... If he sends the vendor/device IDs of the device, ... since a driver uninstall/reinstall doesn't cause the PDO to be recreated, ...
    (microsoft.public.development.device.drivers)
  • Re: [PATCH] Intel Manageability Engine Interface driver
    ... The patch is large so I'm placing the diff on the web for download ... Why does a new driver have "additional char device for legacy mode"? ... Manageability Engine firmware"? ... The core hardware architecture of Intel Active Management Technology ...
    (Linux-Kernel)