From jg@jurassic.sfbay.sun.com Tue Aug 21 18:47:40 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7M1leoe021161
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 21 Aug 2007 18:47:40 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7M1j3VK013959;
	Tue, 21 Aug 2007 18:45:07 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN500L17JJ6RE00@brm-avmta-1.central.sun.com>; Tue,
 21 Aug 2007 19:45:06 -0600 (MDT)
Received: from jurassic.eng.sun.com ([129.146.106.105])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN500HS4JJ43QA0@brm-avmta-1.central.sun.com>; Tue,
 21 Aug 2007 19:45:04 -0600 (MDT)
Received: from tethys (tethys.SFBay.Sun.COM [129.146.226.92])
	by jurassic.eng.sun.com (8.13.8+Sun/8.13.8) with SMTP id l7M1j3j4891809; Tue,
 21 Aug 2007 18:45:03 -0700 (PDT)
Date: Tue, 21 Aug 2007 18:43:43 -0700 (PDT)
From: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Subject: 2007/477: Drivers registering devids
To: psarc-ext@sun.com
Cc: chris.horne@sun.com, jerry.gilliam@sun.com
Reply-to: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Message-id: <200708220145.l7M1j3j4891809@jurassic.eng.sun.com>
MIME-version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.7_64 SunOS 5.11 sun4u sparc
Content-type: TEXT/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-MD5: SK5xGHWOX0Gj5QLn0vbPcQ==
X-PMX-Version: 5.2.0.264296
Status: RO
Content-Length: 3613


I am submitting this fast-track on behalf of myself, with
timeout set to 08/28/2007.  Patch/update binding requesed.


-jg


------------


Identification of Drivers Registering Devids

Summary

   This case proposes a new property, 'ddi-devid-registrant'. This
   property will be specified in the driver.conf(4) files of target
   drivers that call ddi_devid_register(9F) [8].  Instead of using
   compiled-in tables, the IO framework will use this new information
   to identify drivers of interest when there is a devid cache [3]
   miss.  NOTE: This property is similar in purpose to the
   'ddi-vhci-class' property approved by [1].

   Immediate consumers (sd, ssd, cmdk, and dad target drivers) are all
   in ON.  There are no contracts needed at this time. I am seeking
   patch binding.

Proposal

   The IO framework maintains a private cache that maps devids to
   /devices paths [3]. If the cache is corrupted, deleted, or the
   requested mapping is not in the cache the IO framework must still
   perform a best-effort search to resolve a devid to a /devices path.
   For this best-effort search the IO framework attaches all instances
   of all drivers that register devids. To do this, the IO framework
   currently has a compiled-in table containing the names of drivers
   known to register a devid.

   The compiled-in list of driver names is a maintenance overhead since
   the list needs to be updated whenever a new driver that a registers
   devid is added to the system (or an existing one is removed). To
   eliminate this overhead, the proposal is to remove this compiled-in
   list and replace it with a mechanism based on the
   'ddi-devid-registrant' property.

   The proposed 'ddi-devid-registrant' property will be specified in
   the driver.conf file of each target driver that calls
   ddi_devid_register(9F).  The IO framework will be modified to use
   this information instead of compiled-in tables.


Interface Summary

Interface		Level		Comments
-------------------------------------------------------------------------
ddi-devid-registrant    Committed 	Property to indicate a driver may
					register a devid for a device


Man page update



Kernel Functions for Drivers                ddi_devid_compare(9F)

NAME
     ddi_devid_register, <...>

SYNOPSIS

     <...>

     int ddi_devid_register(dev_info_t *dip, ddi_devid_t devid );

     <...>

DESCRIPTION

     <...>


     ddi_devid_register() registers the device ID address (devid)
     with  the  DDI  framework,  associating it with the dev_info
     passed in (dip). The drivers must  register  device  IDs  at
     attach time. See attach(9E).
+
+    A driver which calls ddi_devid_register() should place the
+    following line in its driver.conf(4) file.  The presence of
+    this property informs the system that this driver may
+    register a devid for a device when device discovery is
+    necessary.
+
+       ddi-devid-registrant=1;
+


References

    [1]	PSARC/2006/285 MPxIO Driver Properties
	http://sac.sfbay/arc/PSARC/2006/285/

    [2]	PSARC/2004/504 Common Devid/GUID Encode Interfaces for SCSI Devices
	http://sac.sfbay/PSARC/2004/504/

    [3]	PSARC/2004/064 Devid Cache
	http://sac.sfbay/PSARC/2004/064/

    [4]	PSARC/2003/123 Devids for disksets
	http://sac.sfbay/PSARC/2003/123/

    [5]	PSARC/2001/559 New Devid Type for ATA Drives
	http://sac.sfbay/PSARC/2001/559/

    [6]	PSARC/2000/480 Devid Enhancements
	http://sac.sfbay/PSARC/2000/480/

    [7]	PSARC/1999/357 Devid Issues
	http://sac.sfbay/PSARC/1999/357/

    [8]	PSARC/1995/352 Disk Id
	http://sac.sfbay/PSARC/1995/352/



From peter.dennis@sun.com Wed Aug 22 01:35:27 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7M8ZQAp028383
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 22 Aug 2007 01:35:26 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l7M8WmdV014353
	for <@sunmail2sca.sfbay.sun.com:psarc-ext@sun.com>; Wed, 22 Aug 2007 16:32:52 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600F012EQU600@nwk-avmta-1.sfbay.Sun.COM> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Wed, 22 Aug 2007 01:32:50 -0700 (PDT)
Received: from dm-uk-01.uk.sun.com ([129.156.101.115])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN600CR32EPPF80@nwk-avmta-1.sfbay.Sun.COM> for
 psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Wed,
 22 Aug 2007 01:32:50 -0700 (PDT)
Received: from serinus.UK.Sun.COM (serinus.UK.Sun.COM [129.156.173.208])
	by dm-uk-01.uk.sun.com (8.13.7+Sun/8.13.6/ENSMAIL,v2.2)
 with ESMTP id l7M8WcXg003218; Wed, 22 Aug 2007 09:32:38 +0100 (BST)
Received: from [129.156.173.66] (eraser [129.156.173.66])
	by serinus.UK.Sun.COM (8.13.7+Sun/8.13.7/CTE 3.0)
 with ESMTP id l7M8WbTN029187; Wed, 22 Aug 2007 09:32:37 +0100 (BST)
Date: Wed, 22 Aug 2007 09:32:11 +0100
From: Peter Dennis - Solaris Sustaining Engineering <peter.dennis@sun.com>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <200708220145.l7M1j3j4891809@jurassic.eng.sun.com>
To: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Cc: psarc-ext@sun.com, chris.horne@sun.com, jerry.gilliam@sun.com
Message-id: <46CBF48B.6030805@sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708220145.l7M1j3j4891809@jurassic.eng.sun.com>
User-Agent: Thunderbird 2.0.0.4 (X11/20070731)
Status: RO
Content-Length: 4144



Jerry Gilliam wrote:
> I am submitting this fast-track on behalf of myself, with
> timeout set to 08/28/2007.  Patch/update binding requesed.
> 
> 
> -jg
> 
> 
> ------------
> 
> 
> Identification of Drivers Registering Devids
> 
> Summary
> 
>    This case proposes a new property, 'ddi-devid-registrant'. This
>    property will be specified in the driver.conf(4) files of target
>    drivers that call ddi_devid_register(9F) [8].  Instead of using
>    compiled-in tables, the IO framework will use this new information
>    to identify drivers of interest when there is a devid cache [3]
>    miss.  NOTE: This property is similar in purpose to the
>    'ddi-vhci-class' property approved by [1].
> 
>    Immediate consumers (sd, ssd, cmdk, and dad target drivers) are all
>    in ON.  There are no contracts needed at this time. I am seeking
>    patch binding.

There are two other drivers that use ddi_devid_register:
sata and vdc (ldom's virtual disk client) - should they be listed here ?

What happens if a driver uses ddi_devid_register but the corresponding
driver.conf is not updated to have this flag ?

Thanks
pete


> 
> Proposal
> 
>    The IO framework maintains a private cache that maps devids to
>    /devices paths [3]. If the cache is corrupted, deleted, or the
>    requested mapping is not in the cache the IO framework must still
>    perform a best-effort search to resolve a devid to a /devices path.
>    For this best-effort search the IO framework attaches all instances
>    of all drivers that register devids. To do this, the IO framework
>    currently has a compiled-in table containing the names of drivers
>    known to register a devid.
> 
>    The compiled-in list of driver names is a maintenance overhead since
>    the list needs to be updated whenever a new driver that a registers
>    devid is added to the system (or an existing one is removed). To
>    eliminate this overhead, the proposal is to remove this compiled-in
>    list and replace it with a mechanism based on the
>    'ddi-devid-registrant' property.
> 
>    The proposed 'ddi-devid-registrant' property will be specified in
>    the driver.conf file of each target driver that calls
>    ddi_devid_register(9F).  The IO framework will be modified to use
>    this information instead of compiled-in tables.
> 
> 
> Interface Summary
> 
> Interface		Level		Comments
> -------------------------------------------------------------------------
> ddi-devid-registrant    Committed 	Property to indicate a driver may
> 					register a devid for a device
> 
> 
> Man page update
> 
> 
> 
> Kernel Functions for Drivers                ddi_devid_compare(9F)
> 
> NAME
>      ddi_devid_register, <...>
> 
> SYNOPSIS
> 
>      <...>
> 
>      int ddi_devid_register(dev_info_t *dip, ddi_devid_t devid );
> 
>      <...>
> 
> DESCRIPTION
> 
>      <...>
> 
> 
>      ddi_devid_register() registers the device ID address (devid)
>      with  the  DDI  framework,  associating it with the dev_info
>      passed in (dip). The drivers must  register  device  IDs  at
>      attach time. See attach(9E).
> +
> +    A driver which calls ddi_devid_register() should place the
> +    following line in its driver.conf(4) file.  The presence of
> +    this property informs the system that this driver may
> +    register a devid for a device when device discovery is
> +    necessary.
> +
> +       ddi-devid-registrant=1;
> +
> 
> 
> References
> 
>     [1]	PSARC/2006/285 MPxIO Driver Properties
> 	http://sac.sfbay/arc/PSARC/2006/285/
> 
>     [2]	PSARC/2004/504 Common Devid/GUID Encode Interfaces for SCSI Devices
> 	http://sac.sfbay/PSARC/2004/504/
> 
>     [3]	PSARC/2004/064 Devid Cache
> 	http://sac.sfbay/PSARC/2004/064/
> 
>     [4]	PSARC/2003/123 Devids for disksets
> 	http://sac.sfbay/PSARC/2003/123/
> 
>     [5]	PSARC/2001/559 New Devid Type for ATA Drives
> 	http://sac.sfbay/PSARC/2001/559/
> 
>     [6]	PSARC/2000/480 Devid Enhancements
> 	http://sac.sfbay/PSARC/2000/480/
> 
>     [7]	PSARC/1999/357 Devid Issues
> 	http://sac.sfbay/PSARC/1999/357/
> 
>     [8]	PSARC/1995/352 Disk Id
> 	http://sac.sfbay/PSARC/1995/352/
> 
> 

From carlsonj@phorcys.east.sun.com Wed Aug 22 03:53:43 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MArgBG001081
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 03:53:43 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MAothc006141;
	Wed, 22 Aug 2007 11:51:05 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN6002018T4JM00@nwk-avmta-2.sfbay.sun.com>; Wed,
 22 Aug 2007 03:51:04 -0700 (PDT)
Received: from phorcys.east.sun.com ([129.148.174.143])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN6003XM8T3XSC0@nwk-avmta-2.sfbay.sun.com>; Wed,
 22 Aug 2007 03:51:04 -0700 (PDT)
Received: from phorcys.east.sun.com (localhost [127.0.0.1])
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l7MAoprX015109; Wed,
 22 Aug 2007 06:50:51 -0400 (EDT)
Received: (from carlsonj@localhost)
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1/Submit) id l7MAopQu015106; Wed,
 22 Aug 2007 06:50:51 -0400 (EDT)
Date: Wed, 22 Aug 2007 06:50:51 -0400
From: James Carlson <james.d.carlson@sun.com>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <200708220145.l7M1j3j4891809@jurassic.eng.sun.com>
To: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Cc: psarc-ext@sun.com, Chris.Horne@sun.com, Jerry.Gilliam@sun.com
Message-id: <18124.5387.747299.538100@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.01 under Emacs 21.3.1
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708220145.l7M1j3j4891809@jurassic.eng.sun.com>
Status: RO
Content-Length: 717

Jerry Gilliam writes:
>    The proposed 'ddi-devid-registrant' property will be specified in
>    the driver.conf file of each target driver that calls
>    ddi_devid_register(9F).  The IO framework will be modified to use
>    this information instead of compiled-in tables.

What happens if ddi-devid-registrant isn't set, but the driver calls
ddi_devid_register(9F)?

The function has been in the DDI for more than ten years ... has it
been unusable that whole time due to the static list?

-- 
James Carlson, Solaris Networking              <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

From jg@jurassic.sfbay.sun.com Wed Aug 22 10:05:30 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MH5T6Q014294
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 22 Aug 2007 10:05:29 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l7MH2i1D006070;
	Thu, 23 Aug 2007 01:02:52 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600M0HQ0PC500@nwk-avmta-2.sfbay.sun.com>; Wed,
 22 Aug 2007 10:02:49 -0700 (PDT)
Received: from jurassic.eng.sun.com ([129.146.58.166])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN600KNEQ0PXZ80@nwk-avmta-2.sfbay.sun.com>; Wed,
 22 Aug 2007 10:02:49 -0700 (PDT)
Received: from tethys (tethys.SFBay.Sun.COM [129.146.226.92])
	by jurassic.eng.sun.com (8.13.8+Sun/8.13.8) with SMTP id l7MH2mWe937053; Wed,
 22 Aug 2007 10:02:49 -0700 (PDT)
Date: Wed, 22 Aug 2007 10:01:28 -0700 (PDT)
From: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Subject: Re: 2007/477: Drivers registering devids
To: peter.dennis@sun.com
Cc: PSARC-ext@sun.com, chris.horne@sun.com, jerry.gilliam@sun.com
Reply-to: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Message-id: <200708221702.l7MH2mWe937053@jurassic.eng.sun.com>
MIME-version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.7_64 SunOS 5.11 sun4u sparc
Content-type: TEXT/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-MD5: yvi78Nnrtz1fLlFoLTynfA==
X-PMX-Version: 5.2.0.264296
Status: RO
Content-Length: 856



>> 
>>    Immediate consumers (sd, ssd, cmdk, and dad target drivers) are all
>>    in ON.  There are no contracts needed at this time. I am seeking
>>    patch binding.
>
>There are two other drivers that use ddi_devid_register:
>sata and vdc (ldom's virtual disk client) - should they be listed here ?
>

It wasn't apparent to me that vdc needs to provide this property
for its encapsulated devid.  This is either an existing bug or
there is no requirement.  I'll follow up on this.

And with Prasad's work put back now, yes sata is now a devid
registrant.


>What happens if a driver uses ddi_devid_register but the corresponding
>driver.conf is not updated to have this flag ?
>

If the cache were to become damaged or the disk moved, the cache
auto-rebuild mechanism would not include trying to configure that
driver to re-discover the disk.


-jg


From jg@jurassic.sfbay.sun.com Wed Aug 22 10:06:05 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MH642M014320
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 22 Aug 2007 10:06:04 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l7MH2i1Z006070;
	Thu, 23 Aug 2007 01:02:56 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600M11Q0TC700@nwk-avmta-2.sfbay.sun.com>; Wed,
 22 Aug 2007 10:02:53 -0700 (PDT)
Received: from jurassic.eng.sun.com ([129.146.58.166])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN600KH4Q0SXX80@nwk-avmta-2.sfbay.sun.com>; Wed,
 22 Aug 2007 10:02:52 -0700 (PDT)
Received: from tethys (tethys.SFBay.Sun.COM [129.146.226.92])
	by jurassic.eng.sun.com (8.13.8+Sun/8.13.8) with SMTP id l7MH2qqg937114; Wed,
 22 Aug 2007 10:02:52 -0700 (PDT)
Date: Wed, 22 Aug 2007 10:01:31 -0700 (PDT)
From: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Subject: Re: 2007/477: Drivers registering devids
To: james.d.carlson@sun.com
Cc: PSARC-ext@sun.com, Chris.Horne@sun.com, Jerry.Gilliam@sun.com
Reply-to: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Message-id: <200708221702.l7MH2qqg937114@jurassic.eng.sun.com>
MIME-version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.7_64 SunOS 5.11 sun4u sparc
Content-type: TEXT/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-MD5: 3hPEeS3D9nYAF5l9N83LPg==
X-PMX-Version: 5.2.0.264296
Status: RO
Content-Length: 462


>
>What happens if ddi-devid-registrant isn't set, but the driver calls
>ddi_devid_register(9F)?
>

The mechanism to discover the disk when moved or the cache damaged
would not function.


>The function has been in the DDI for more than ten years ... has it
>been unusable that whole time due to the static list?
>

This is a piece of work required to complete the devid cache discovery
mechanism for devid providers not bundled in the ON consolidation.


-jg


From carlsonj@phorcys.east.sun.com Wed Aug 22 10:38:39 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MHccRk016327
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 22 Aug 2007 10:38:38 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l7MHa2FF021417;
	Thu, 23 Aug 2007 01:36:02 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600A15RK0LI00@brm-avmta-1.central.sun.com>; Wed,
 22 Aug 2007 11:36:01 -0600 (MDT)
Received: from phorcys.east.sun.com ([129.148.174.143])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN6009WCRJZDM00@brm-avmta-1.central.sun.com>; Wed,
 22 Aug 2007 11:36:00 -0600 (MDT)
Received: from phorcys.east.sun.com (localhost [127.0.0.1])
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l7MHZn0Z001979; Wed,
 22 Aug 2007 13:35:49 -0400 (EDT)
Received: (from carlsonj@localhost)
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1/Submit) id l7MHZmEG001976; Wed,
 22 Aug 2007 13:35:48 -0400 (EDT)
Date: Wed, 22 Aug 2007 13:35:48 -0400
From: James Carlson <james.d.carlson@sun.com>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <200708221702.l7MH2qqg937114@jurassic.eng.sun.com>
To: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Cc: PSARC-ext@sun.com, Chris.Horne@sun.com, Jerry.Gilliam@sun.com
Message-id: <18124.29684.912201.489083@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.01 under Emacs 21.3.1
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221702.l7MH2qqg937114@jurassic.eng.sun.com>
Status: RO
Content-Length: 931

Jerry Gilliam writes:
> >The function has been in the DDI for more than ten years ... has it
> >been unusable that whole time due to the static list?
> >
> 
> This is a piece of work required to complete the devid cache discovery
> mechanism for devid providers not bundled in the ON consolidation.

OK.  The surprising thing to me was that we added this to the DDI long
ago -- making it theoretically available for others to use -- but if
they ever tried using it, it wouldn't have worked as expected, at
least according to this project.

I had though that meant I was likely missing something (such as a
subsequent change to device enumeration that broke the DDI).  But if
that's not the case, then "ok."

-- 
James Carlson, Solaris Networking              <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

From Charles.Debardeleben@sun.com Wed Aug 22 10:41:59 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MHfwOC016358
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 22 Aug 2007 10:41:59 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l7MHdOL6022522
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Thu, 23 Aug 2007 01:39:26 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600G3LRPPX400@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@Sun.COM); Wed, 22 Aug 2007 10:39:25 -0700 (PDT)
Received: from sca-es-mail-2.sun.com ([192.18.43.133])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN6008KBRPPZMC0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@Sun.COM); Wed,
 22 Aug 2007 10:39:25 -0700 (PDT)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l7MHdPqb021633	for
 <PSARC-ext@Sun.COM>; Wed, 22 Aug 2007 10:39:25 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JN600301RCQ1A00@fe-sfbay-09.sun.com>
 (original mail from Charles.Debardeleben@Sun.COM)
 for PSARC-ext@Sun.COM (ORCPT PSARC-ext@Sun.COM); Wed,
 22 Aug 2007 10:39:25 -0700 (PDT)
Received: from nat.cfdhome.com ([67.100.119.58])
 by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb
 28 2007)) with ESMTPSA id <0JN600KW7RPG3EE0@fe-sfbay-09.sun.com>; Wed,
 22 Aug 2007 10:39:17 -0700 (PDT)
Date: Wed, 22 Aug 2007 10:39:33 -0700
From: Charles DeBardeleben <Charles.Debardeleben@sun.com>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <200708221702.l7MH2mWe937053@jurassic.eng.sun.com>
Sender: Charles.Debardeleben@sun.com
To: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Cc: Peter.Dennis@sun.com, PSARC-ext@sun.com, Chris.Horne@sun.com,
        Jerry.Gilliam@sun.com
Message-id: <46CC74D5.3000603@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221702.l7MH2mWe937053@jurassic.eng.sun.com>
User-Agent: Thunderbird 2.0.0.0 (X11/20070529)
Status: RO
Content-Length: 1829

Two more questions, and a comment.

The Solaris Cluster did driver is both a consumer and calls 
ddi_devid_register.
The device id that we register is related to the device id we consume.

Question 1. Does this mean that we need the new property? The intent is for
an instance of did to always have the same device id.

Question 2. If the disk under us moves, how do we discover this so that 
we can fix up our
layer open to get the correct disk under us.

Comment on virtual disk driver. Solaris cluster requires that anything 
that looks
like a disk or tape driver to have a device id. We require that vdc 
provide a device id.
Another thing, we require that the device id not change if the disk or 
virtual disk is still
the same. So if the device id presented is a fabricated device id, then 
it should be
stored persistently so that it is the same after reboot.

-Charles

Jerry Gilliam wrote:
>   
>>>    Immediate consumers (sd, ssd, cmdk, and dad target drivers) are all
>>>    in ON.  There are no contracts needed at this time. I am seeking
>>>    patch binding.
>>>       
>> There are two other drivers that use ddi_devid_register:
>> sata and vdc (ldom's virtual disk client) - should they be listed here ?
>>
>>     
>
> It wasn't apparent to me that vdc needs to provide this property
> for its encapsulated devid.  This is either an existing bug or
> there is no requirement.  I'll follow up on this.
>
> And with Prasad's work put back now, yes sata is now a devid
> registrant.
>
>
>   
>> What happens if a driver uses ddi_devid_register but the corresponding
>> driver.conf is not updated to have this flag ?
>>
>>     
>
> If the cache were to become damaged or the disk moved, the cache
> auto-rebuild mechanism would not include trying to configure that
> driver to re-discover the disk.
>
>
> -jg
>
>   


From jg@jurassic.sfbay.sun.com Wed Aug 22 11:07:04 2007
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MI74uD017165
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 11:07:04 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MI4BH8024302;
	Wed, 22 Aug 2007 12:04:12 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600C0LSVI8400@brm-avmta-1.central.sun.com>; Wed,
 22 Aug 2007 12:04:30 -0600 (MDT)
Received: from jurassic.eng.sun.com ([129.146.224.130])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN6009YXSVGDX20@brm-avmta-1.central.sun.com>; Wed,
 22 Aug 2007 12:04:29 -0600 (MDT)
Received: from tethys (tethys.SFBay.Sun.COM [129.146.226.92])
	by jurassic.eng.sun.com (8.13.8+Sun/8.13.8) with SMTP id l7MI4Sde943774; Wed,
 22 Aug 2007 11:04:28 -0700 (PDT)
Date: Wed, 22 Aug 2007 11:03:09 -0700 (PDT)
From: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Subject: Re: 2007/477: Drivers registering devids
To: james.d.carlson@sun.com
Cc: PSARC-ext@sun.com, Chris.Horne@sun.com, Jerry.Gilliam@sun.com
Reply-to: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Message-id: <200708221804.l7MI4Sde943774@jurassic.eng.sun.com>
MIME-version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.7_64 SunOS 5.11 sun4u sparc
Content-type: TEXT/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-MD5: AM/GrgrlkBxRrakSKS+ZJA==
X-PMX-Version: 5.2.0.264296
Status: RO
Content-Length: 1335



>> >The function has been in the DDI for more than ten years ... has it
>> >been unusable that whole time due to the static list?
>> >
>> 
>> This is a piece of work required to complete the devid cache discovery
>> mechanism for devid providers not bundled in the ON consolidation.
>
>OK.  The surprising thing to me was that we added this to the DDI long
>ago -- making it theoretically available for others to use -- but if
>they ever tried using it, it wouldn't have worked as expected, at
>least according to this project.
>
>I had though that meant I was likely missing something (such as a
>subsequent change to device enumeration that broke the DDI).  But if
>that's not the case, then "ok."
>

A more complete autopsy here is that pre-devfs, solaris relied on
bottom-up full attach, for all intents and purposes a reconfiguration
boot, to implement open-by-devid.

Devfs itself did not fix this, so open-by-devid still required
full attach.  The devid cache eliminated that so that with a
cache hit, an open-by-devid goes directly to the device.

With a cache miss though, discovery is needed.  The embedded list
of drivers providing devids was a short-term solution to the problem
that has left unbundled drivers out in the cold.  In retrospect,
yes I should have done this as part of the original devid cache
work.


-jg


From Chris.Horne@sun.com Wed Aug 22 11:18:35 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MIIYIS017801
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 11:18:35 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MIFsU1029932
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 22 Aug 2007 19:16:02 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600K1PTEPCD00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 22 Aug 2007 11:16:01 -0700 (PDT)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN600IYNTEOYO20@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 22 Aug 2007 11:16:00 -0700 (PDT)
Received: from fe-amer-06.sun.com ([192.18.108.180])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l7MIG06H029484	for
 <PSARC-ext@sun.com>; Wed, 22 Aug 2007 18:16:00 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JN600101T5NTD00@mail-amer.sun.com>
 (original mail from Chris.Horne@Sun.COM)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 22 Aug 2007 12:16:00 -0600 (MDT)
Received: from [172.20.25.50] by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JN600FX3TENVZT6@mail-amer.sun.com>; Wed,
 22 Aug 2007 12:15:59 -0600 (MDT)
Date: Wed, 22 Aug 2007 12:12:45 -0600
From: Chris Horne <Chris.Horne@sun.com>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <18124.29684.912201.489083@gargle.gargle.HOWL>
Sender: Chris.Horne@sun.com
To: James Carlson <James.D.Carlson@sun.com>
Cc: Jerry Gilliam <jg@jurassic.sfbay.sun.com>, PSARC-ext@sun.com,
        Jerry.Gilliam@sun.com
Message-id: <46CC7C9D.2060306@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221702.l7MH2qqg937114@jurassic.eng.sun.com>
 <18124.29684.912201.489083@gargle.gargle.HOWL>
User-Agent: Thunderbird 1.5.0.8 (X11/20061204)
Status: RO
Content-Length: 937

James Carlson wrote:
> Jerry Gilliam writes:
>   
>>> The function has been in the DDI for more than ten years ... has it
>>> been unusable that whole time due to the static list?
>>>
>>>       
>> This is a piece of work required to complete the devid cache discovery
>> mechanism for devid providers not bundled in the ON consolidation.
>>     
>
> OK.  The surprising thing to me was that we added this to the DDI long
> ago -- making it theoretically available for others to use -- but if
> they ever tried using it, it wouldn't have worked as expected, at
> least according to this project.
>   
This is fixing an s10 regression. The original pre-s10 implementation 
would, in
the extreme, load *all* drivers to resolve a devid. In s10 the *all* 
driver approach
was replaced with a compiled in table, which was not extensible. We are now
providing an extensible mechanism that is more efficient than loading 
all drivers.

-Chris


From carlsonj@phorcys.east.sun.com Wed Aug 22 11:22:45 2007
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MIMjnu017875
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 11:22:45 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MIKDG7005114;
	Wed, 22 Aug 2007 11:20:13 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600D01TLO3J00@brm-avmta-1.central.sun.com>; Wed,
 22 Aug 2007 12:20:12 -0600 (MDT)
Received: from phorcys.east.sun.com ([129.148.174.143])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN6009KBTLNDU30@brm-avmta-1.central.sun.com>; Wed,
 22 Aug 2007 12:20:11 -0600 (MDT)
Received: from phorcys.east.sun.com (localhost [127.0.0.1])
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l7MIJvCt002271; Wed,
 22 Aug 2007 14:19:57 -0400 (EDT)
Received: (from carlsonj@localhost)
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1/Submit) id l7MIJviT002268; Wed,
 22 Aug 2007 14:19:57 -0400 (EDT)
Date: Wed, 22 Aug 2007 14:19:57 -0400
From: James Carlson <james.d.carlson@Sun.COM>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <46CC7C9D.2060306@sun.com>
To: Chris Horne <Chris.Horne@Sun.COM>
Cc: Jerry Gilliam <jg@jurassic.sfbay.sun.com>, PSARC-ext@Sun.COM,
        Jerry.Gilliam@Sun.COM
Message-id: <18124.32333.846921.810238@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.01 under Emacs 21.3.1
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221702.l7MH2qqg937114@jurassic.eng.sun.com>
 <18124.29684.912201.489083@gargle.gargle.HOWL> <46CC7C9D.2060306@sun.com>
Status: RO
Content-Length: 621

Chris Horne writes:
> This is fixing an s10 regression. The original pre-s10 implementation 
> would, in
> the extreme, load *all* drivers to resolve a devid. In s10 the *all* 
> driver approach
> was replaced with a compiled in table, which was not extensible. We are now
> providing an extensible mechanism that is more efficient than loading 
> all drivers.

That fills the gap for me; thanks.

-- 
James Carlson, Solaris Networking              <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

From Garrett.Damore@Sun.COM Wed Aug 22 11:32:01 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MIW0KI018271
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 11:32:01 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MITPjH005651
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 22 Aug 2007 19:29:28 +0100 (BST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600D0NU13HP00@brm-avmta-1.central.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 22 Aug 2007 12:29:27 -0600 (MDT)
Received: from sca-es-mail-1.sun.com ([192.18.43.132])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN600996U12DU40@brm-avmta-1.central.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 22 Aug 2007 12:29:26 -0600 (MDT)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l7MITQjj016420	for
 <PSARC-ext@sun.com>; Wed, 22 Aug 2007 11:29:26 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JN600601TQGCR00@fe-sfbay-09.sun.com>
 (original mail from Garrett.Damore@Sun.COM)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 22 Aug 2007 11:29:26 -0700 (PDT)
Received: from [192.168.251.21] ([76.174.83.55])
 by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb
 28 2007)) with ESMTPSA id <0JN600DSRU11TK50@fe-sfbay-09.sun.com>; Wed,
 22 Aug 2007 11:29:25 -0700 (PDT)
Date: Wed, 22 Aug 2007 11:25:11 -0700
From: "Garrett D'Amore" <Garrett.Damore@Sun.COM>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <18124.32333.846921.810238@gargle.gargle.HOWL>
Sender: Garrett.Damore@Sun.COM
To: James Carlson <james.d.carlson@Sun.COM>
Cc: Chris Horne <Chris.Horne@Sun.COM>,
        Jerry Gilliam <jg@jurassic.sfbay.sun.com>, PSARC-ext@Sun.COM,
        Jerry.Gilliam@Sun.COM
Message-id: <1187807111.909.624.camel@zippy>
Organization: Sun Microsystems, Inc.
MIME-version: 1.0
X-Mailer: Evolution 2.10.2
Content-type: text/plain
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221702.l7MH2qqg937114@jurassic.eng.sun.com>
 <18124.29684.912201.489083@gargle.gargle.HOWL> <46CC7C9D.2060306@sun.com>
 <18124.32333.846921.810238@gargle.gargle.HOWL>
Status: RO
Content-Length: 987

On Wed, 2007-08-22 at 14:19 -0400, James Carlson wrote:
> Chris Horne writes:
> > This is fixing an s10 regression. The original pre-s10 implementation 
> > would, in
> > the extreme, load *all* drivers to resolve a devid. In s10 the *all* 
> > driver approach
> > was replaced with a compiled in table, which was not extensible. We are now
> > providing an extensible mechanism that is more efficient than loading 
> > all drivers.
> 
> That fills the gap for me; thanks.
> 

One concern I have in general, is relying on driver.conf values to
perform this function.

driver.conf seems like a hack to expose things to the framework, whereas
normal driver.conf would be for non-global tunables for the driver (e.g.
per instance configurables, etc.)

I'm not sure that this is a stopper for this case, but I'd like the ARC
to consider whether or not some more general registry (ala
the /etc/driver_aliases, etc. registries) is perhaps better suited to
this kind of purpose.

	-- Garrett



From jg@jurassic.sfbay.sun.com Wed Aug 22 11:43:36 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MIhZln018573
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 11:43:36 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MIemKs012582;
	Wed, 22 Aug 2007 19:40:59 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN60030PUKBQP00@nwk-avmta-2.sfbay.sun.com>; Wed,
 22 Aug 2007 11:40:59 -0700 (PDT)
Received: from jurassic.eng.sun.com ([129.146.226.31])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN6000RTUKACT30@nwk-avmta-2.sfbay.sun.com>; Wed,
 22 Aug 2007 11:40:58 -0700 (PDT)
Received: from tethys (tethys.SFBay.Sun.COM [129.146.226.92])
	by jurassic.eng.sun.com (8.13.8+Sun/8.13.8) with SMTP id l7MIesi2945982; Wed,
 22 Aug 2007 11:40:54 -0700 (PDT)
Date: Wed, 22 Aug 2007 11:39:36 -0700 (PDT)
From: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Subject: Re: 2007/477: Drivers registering devids
To: Garrett.Damore@sun.com
Cc: Chris.Horne@sun.com, PSARC-ext@sun.com, Jerry.Gilliam@sun.com
Reply-to: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Message-id: <200708221840.l7MIesi2945982@jurassic.eng.sun.com>
MIME-version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.7_64 SunOS 5.11 sun4u sparc
Content-type: TEXT/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-MD5: Qq+9/CgMQGN5/qpI8I7Paw==
X-PMX-Version: 5.2.0.264296
Status: RO
Content-Length: 620



>
>One concern I have in general, is relying on driver.conf values to
>perform this function.
>

driver.conf works for the proposed mechanism as early in boot
the system reads in all available conf files to discover properties
such as ddi-forceattach and ddi-vhci-class.


>driver.conf seems like a hack to expose things to the framework, whereas
>normal driver.conf would be for non-global tunables for the driver (e.g.
>per instance configurables, etc.)
>

driver.conf has always been a mixed bag:  part driver implementation
(as here);  global driver administration;  and per-instance
device administration.


-jg


From carlsonj@phorcys.east.sun.com Wed Aug 22 11:48:29 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MImSX4018952
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 22 Aug 2007 11:48:29 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l7MIjn4d025238;
	Thu, 23 Aug 2007 02:45:51 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600E4HUSDG600@brm-avmta-1.central.sun.com>; Wed,
 22 Aug 2007 12:45:49 -0600 (MDT)
Received: from phorcys.east.sun.com ([129.148.174.143])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN600944USAE060@brm-avmta-1.central.sun.com>; Wed,
 22 Aug 2007 12:45:46 -0600 (MDT)
Received: from phorcys.east.sun.com (localhost [127.0.0.1])
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l7MIjdUx002446; Wed,
 22 Aug 2007 14:45:39 -0400 (EDT)
Received: (from carlsonj@localhost)
	by phorcys.east.sun.com (8.14.1+Sun/8.14.1/Submit) id l7MIjdWE002443; Wed,
 22 Aug 2007 14:45:39 -0400 (EDT)
Date: Wed, 22 Aug 2007 14:45:39 -0400
From: James Carlson <james.d.carlson@sun.com>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <1187807111.909.624.camel@zippy>
To: "Garrett D'Amore" <Garrett.Damore@sun.com>
Cc: Chris Horne <Chris.Horne@sun.com>,
        Jerry Gilliam <jg@jurassic.sfbay.sun.com>, PSARC-ext@sun.com,
        Jerry.Gilliam@sun.com
Message-id: <18124.33875.176033.936031@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.01 under Emacs 21.3.1
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221702.l7MH2qqg937114@jurassic.eng.sun.com>
 <18124.29684.912201.489083@gargle.gargle.HOWL> <46CC7C9D.2060306@sun.com>
 <18124.32333.846921.810238@gargle.gargle.HOWL> <1187807111.909.624.camel@zippy>
Status: RO
Content-Length: 1383

Garrett D'Amore writes:
> driver.conf seems like a hack to expose things to the framework, whereas
> normal driver.conf would be for non-global tunables for the driver (e.g.
> per instance configurables, etc.)

It does seem sort of backwards (driver giving values to the framework
rather than the other way around), but I think it makes some sense
here.

> I'm not sure that this is a stopper for this case, but I'd like the ARC
> to consider whether or not some more general registry (ala
> the /etc/driver_aliases, etc. registries) is perhaps better suited to
> this kind of purpose.

The problem with those registries is with upgrade.  You have to
support packaging scripts that may run on version N-2 (so, no new
management utilities will work) and way too many people seem to get
the update-central-file script wrong, breaking upgrade.  As long as
it's not too expensive in terms of performance to scan all those files
on a cache miss, I think this is simpler to manage.

Another way to do it would be in the ELF file itself (looking for a
reference to ddi_devid_register or for some new _depends_on or
-Nfoo/bar type thing), but that might be overkill.

-- 
James Carlson, Solaris Networking              <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

From Garrett.Damore@Sun.COM Wed Aug 22 11:54:22 2007
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MIsMOT019449
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 11:54:22 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MIpo65017356
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 22 Aug 2007 11:51:50 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600M3PV2EZQ00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 22 Aug 2007 11:51:50 -0700 (PDT)
Received: from sca-es-mail-2.sun.com ([192.18.43.133])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN600I9XV2DYOA0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 22 Aug 2007 11:51:49 -0700 (PDT)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l7MIpnr7000835	for
 <PSARC-ext@sun.com>; Wed, 22 Aug 2007 11:51:49 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JN600I01UYOMP00@fe-sfbay-09.sun.com>
 (original mail from Garrett.Damore@Sun.COM)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 22 Aug 2007 11:51:49 -0700 (PDT)
Received: from [192.168.251.21] ([76.174.83.55])
 by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb
 28 2007)) with ESMTPSA id <0JN600D5BV2ATKH0@fe-sfbay-09.sun.com>; Wed,
 22 Aug 2007 11:51:46 -0700 (PDT)
Date: Wed, 22 Aug 2007 11:47:34 -0700
From: "Garrett D'Amore" <Garrett.Damore@Sun.COM>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <200708221840.l7MIesi2945982@jurassic.eng.sun.com>
Sender: Garrett.Damore@Sun.COM
To: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Cc: Chris.Horne@Sun.COM, PSARC-ext@Sun.COM, Jerry.Gilliam@Sun.COM
Message-id: <1187808454.909.635.camel@zippy>
Organization: Sun Microsystems, Inc.
MIME-version: 1.0
X-Mailer: Evolution 2.10.2
Content-type: text/plain
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221840.l7MIesi2945982@jurassic.eng.sun.com>
Status: RO
Content-Length: 1138

On Wed, 2007-08-22 at 11:39 -0700, Jerry Gilliam wrote:
> 
> >
> >One concern I have in general, is relying on driver.conf values to
> >perform this function.
> >
> 
> driver.conf works for the proposed mechanism as early in boot
> the system reads in all available conf files to discover properties
> such as ddi-forceattach and ddi-vhci-class.

I didn't know about ddi-vhci-class, but the ddi-forceattach is another
example of stuff that is going into driver.conf, that I'd rather have
more centrally managed.

> 
> 
> >driver.conf seems like a hack to expose things to the framework, whereas
> >normal driver.conf would be for non-global tunables for the driver (e.g.
> >per instance configurables, etc.)
> >
> 
> driver.conf has always been a mixed bag:  part driver implementation
> (as here);  global driver administration;  and per-instance
> device administration.


Ah, but this is less driver implementation and more *framework* related.
I mind less that drivers register a property in attach(), than that we
rely on the actual driver.conf to be read by the framework and used
before driver attach.

	-- Garrett
> 
> 
> -jg
> 


From sommerfeld@Sun.COM Wed Aug 22 11:58:20 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MIwJin019643
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 11:58:20 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MItirl020632;
	Wed, 22 Aug 2007 19:55:47 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN60000VV8Y4C00@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 22 Aug 2007 11:55:46 -0700 (PDT)
Received: from eastmail1bur.East.Sun.COM ([129.148.9.49])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN600IKMV8UYRB0@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 22 Aug 2007 11:55:43 -0700 (PDT)
Received: from thunk.east.sun.com (thunk.East.Sun.COM [129.148.174.66])
	by eastmail1bur.East.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2)
 with ESMTP id l7MItaCZ016166; Wed, 22 Aug 2007 14:55:36 -0400 (EDT)
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by thunk.east.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l7MItaKh006036; Wed,
 22 Aug 2007 14:55:36 -0400 (EDT)
Date: Wed, 22 Aug 2007 14:55:35 -0400
From: Bill Sommerfeld <sommerfeld@Sun.COM>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <200708221804.l7MI4Sde943774@jurassic.eng.sun.com>
To: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Cc: james.d.carlson@Sun.COM, PSARC-ext@Sun.COM, Chris.Horne@Sun.COM,
        Jerry.Gilliam@Sun.COM
Message-id: <1187808935.5152.59.camel@thunk>
MIME-version: 1.0
X-Mailer: Evolution 2.10.2
Content-type: text/plain
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221804.l7MI4Sde943774@jurassic.eng.sun.com>
Status: RO
Content-Length: 660

On Wed, 2007-08-22 at 11:03 -0700, Jerry Gilliam wrote:
> A more complete autopsy here is that pre-devfs, solaris relied on
> bottom-up full attach, for all intents and purposes a reconfiguration
> boot, to implement open-by-devid.
> 
> Devfs itself did not fix this, so open-by-devid still required
> full attach.  The devid cache eliminated that so that with a
> cache hit, an open-by-devid goes directly to the device.

would it be plausible to persistently record (separately from the devid
cache) which drivers have emitted at least one devid and thus
automatically maintain the list of drivers that must be visited on a
devid cache miss?

				- Bill





From Garrett.Damore@sun.com Wed Aug 22 12:12:17 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MJCGrF019940
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 12:12:16 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MJ7jZd025830
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 22 Aug 2007 20:07:56 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN600409VT7U400@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 22 Aug 2007 12:07:55 -0700 (PDT)
Received: from sca-es-mail-2.sun.com ([192.18.43.133])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN6000LRVT6CW50@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 22 Aug 2007 12:07:55 -0700 (PDT)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l7MJ7sJg002691	for
 <PSARC-ext@sun.com>; Wed, 22 Aug 2007 12:07:54 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JN600D01VNXQC00@fe-sfbay-09.sun.com>
 (original mail from Garrett.Damore@Sun.COM)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 22 Aug 2007 12:07:54 -0700 (PDT)
Received: from [192.168.251.21] ([76.174.83.55])
 by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb
 28 2007)) with ESMTPSA id <0JN600LKTVSRE470@fe-sfbay-09.sun.com>; Wed,
 22 Aug 2007 12:07:40 -0700 (PDT)
Date: Wed, 22 Aug 2007 12:03:25 -0700
From: "Garrett D'Amore" <Garrett.Damore@sun.com>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <18124.33875.176033.936031@gargle.gargle.HOWL>
Sender: Garrett.Damore@sun.com
To: James Carlson <James.D.Carlson@sun.com>
Cc: Chris Horne <Chris.Horne@sun.com>,
        Jerry Gilliam <jg@jurassic.sfbay.sun.com>, PSARC-EXT@sun.com,
        Jerry.Gilliam@sun.com
Message-id: <1187809405.909.652.camel@zippy>
Organization: Sun Microsystems, Inc.
MIME-version: 1.0
X-Mailer: Evolution 2.10.2
Content-type: text/plain
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221702.l7MH2qqg937114@jurassic.eng.sun.com>
 <18124.29684.912201.489083@gargle.gargle.HOWL> <46CC7C9D.2060306@sun.com>
 <18124.32333.846921.810238@gargle.gargle.HOWL>
 <1187807111.909.624.camel@zippy> <18124.33875.176033.936031@gargle.gargle.HOWL>
Status: RO
Content-Length: 1502

On Wed, 2007-08-22 at 14:45 -0400, James Carlson wrote:
> Garrett D'Amore writes:
> > driver.conf seems like a hack to expose things to the framework, whereas
> > normal driver.conf would be for non-global tunables for the driver (e.g.
> > per instance configurables, etc.)
> 
> It does seem sort of backwards (driver giving values to the framework
> rather than the other way around), but I think it makes some sense
> here.
> 
> > I'm not sure that this is a stopper for this case, but I'd like the ARC
> > to consider whether or not some more general registry (ala
> > the /etc/driver_aliases, etc. registries) is perhaps better suited to
> > this kind of purpose.
> 
> The problem with those registries is with upgrade.  You have to
> support packaging scripts that may run on version N-2 (so, no new
> management utilities will work) and way too many people seem to get
> the update-central-file script wrong, breaking upgrade.  As long as
> it's not too expensive in terms of performance to scan all those files
> on a cache miss, I think this is simpler to manage.
> 
> Another way to do it would be in the ELF file itself (looking for a
> reference to ddi_devid_register or for some new _depends_on or
> -Nfoo/bar type thing), but that might be overkill.

Why not allow the driver itself to set a property.  THe framework can
see the property being created, and maintain the master registry on the
driver's behalf, rather than requiring packaging scripts to "do the
right thing".

	-- Garrett


From jg@jurassic.sfbay.sun.com Wed Aug 22 12:58:27 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MJwQCN021525
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 12:58:26 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MJtiXl015074;
	Wed, 22 Aug 2007 20:55:49 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN60041XY0Z6400@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 22 Aug 2007 12:55:47 -0700 (PDT)
Received: from jurassic.eng.sun.com ([129.146.228.31])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN6001KHY0XZR20@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 22 Aug 2007 12:55:45 -0700 (PDT)
Received: from tethys (tethys.SFBay.Sun.COM [129.146.226.92])
	by jurassic.eng.sun.com (8.13.8+Sun/8.13.8) with SMTP id l7MJtiQY949483; Wed,
 22 Aug 2007 12:55:45 -0700 (PDT)
Date: Wed, 22 Aug 2007 12:54:26 -0700 (PDT)
From: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Subject: Re: 2007/477: Drivers registering devids
To: Garrett.Damore@sun.com
Cc: Chris.Horne@sun.com, PSARC-ext@sun.com, Jerry.Gilliam@sun.com
Reply-to: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Message-id: <200708221955.l7MJtiQY949483@jurassic.eng.sun.com>
MIME-version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.7_64 SunOS 5.11 sun4u sparc
Content-type: TEXT/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-MD5: tBCcNch0+szMn4i8OYJ21A==
X-PMX-Version: 5.2.0.264296
Status: RO
Content-Length: 1654



>
>Ah, but this is less driver implementation and more *framework* related.
>I mind less that drivers register a property in attach(), than that we
>rely on the actual driver.conf to be read by the framework and used
>before driver attach.
>
>	-- Garrett


Attach however is per-device and the ddi-devid-registrant property
would be per-driver.  We don't want open-by-devid of the root device
to return to the old days of attach-everything.  Even inspecting
the cb_ops for a flag, searching for elf information or asking the
driver to provide a property at _init(9E) time would require at
minimum loading all drivers.

Persistently recording that information however would allow us
to harvest it once.  And to not have to repeat that process unless
that data were lost.  There would be a dynamic aspect to this,
in that the process would have to be performed on each driver
add and update of a driver.conf file.  (Yes, update_drv(1M)
does inform the system dynamically of driver.conf updates)
I have considered that in the past and suppose I never pursued
it because it hardly seemed worth the trouble.  When I submitted
this case, believe it or not I was half expecting to be chastised
for wasting PSARC's time with such an obvious proposal that
should have been submitted approved/self-reviewed.  Silly me.  ;-)

If we were to cache the data, I can't think of any reason not
to include it in the devid cache itself.  The format of that
file is typed & versioned nvlist data and easily extensible.

The one serious constraint is that the list of drivers would
need to be available before root is mounted to avoid mountroot
requiring discovery.


-jg


From Charles.Debardeleben@sun.com Wed Aug 22 16:33:42 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7MNXfYg029768
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 22 Aug 2007 16:33:41 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7MNUr6L006907
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Thu, 23 Aug 2007 00:31:08 +0100 (BST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN7007057ZVN800@brm-avmta-1.central.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@Sun.COM); Wed, 22 Aug 2007 17:31:07 -0600 (MDT)
Received: from sca-es-mail-2.sun.com ([192.18.43.133])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN7001WC7ZUHRD0@brm-avmta-1.central.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@Sun.COM); Wed,
 22 Aug 2007 17:31:06 -0600 (MDT)
Received: from fe-sfbay-10.sun.com ([192.18.43.129])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l7MNV5Fl029918	for
 <PSARC-ext@Sun.COM>; Wed, 22 Aug 2007 16:31:06 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JN700M017OFSG00@fe-sfbay-10.sun.com>
 (original mail from Charles.Debardeleben@Sun.COM)
 for PSARC-ext@Sun.COM (ORCPT PSARC-ext@Sun.COM); Wed,
 22 Aug 2007 16:29:06 -0700 (PDT)
Received: from [129.146.104.69] by fe-sfbay-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 with ESMTPSA id <0JN700HBQ7W7K130@fe-sfbay-10.sun.com>; Wed,
 22 Aug 2007 16:28:55 -0700 (PDT)
Date: Wed, 22 Aug 2007 16:25:43 -0700
From: Charles Debardeleben <Charles.Debardeleben@sun.com>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <46CC74D5.3000603@sun.com>
Sender: Charles.Debardeleben@sun.com
To: Charles DeBardeleben <Charles.Debardeleben@sun.com>
Cc: Jerry Gilliam <jg@jurassic.sfbay.sun.com>, Peter.Dennis@sun.com,
        PSARC-ext@sun.com, Chris.Horne@sun.com, Jerry.Gilliam@sun.com
Message-id: <46CCC5F7.9050407@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221702.l7MH2mWe937053@jurassic.eng.sun.com>
 <46CC74D5.3000603@sun.com>
User-Agent: Thunderbird 1.5.0.5 (X11/20060814)
Status: RO
Content-Length: 2710

This note is just to let PSARC-ext know that I have talked with Jerry
and we have concluded that this fast track will have no adverse affect on
Solaris Cluster. From a cluster perspective, I have no objection to this 
case.
I am adding my interpretations of the answers to the questions
below.

Charles DeBardeleben wrote:
> Two more questions, and a comment.
>
> The Solaris Cluster did driver is both a consumer and calls 
> ddi_devid_register.
> The device id that we register is related to the device id we consume.
>
> Question 1. Does this mean that we need the new property? The intent 
> is for
> an instance of did to always have the same device id.
No need to add the property.
If you do not provide the property in driver.conf, then this case will 
not change
device ID cache behavior. You get the old behavior.
>
> Question 2. If the disk under us moves, how do we discover this so 
> that we can fix up our
> layer open to get the correct disk under us.
Solaris Cluster currently has manual disk management procedures that 
have been tested. These
remain the same with this change unless Solaris Cluster adds 
ddi-devid-registrant to our device
driver. If Solaris Cluster adds this property to the device driver, we 
may need to review our
procedures.

-Charles
>
> Comment on virtual disk driver. Solaris cluster requires that anything 
> that looks
> like a disk or tape driver to have a device id. We require that vdc 
> provide a device id.
> Another thing, we require that the device id not change if the disk or 
> virtual disk is still
> the same. So if the device id presented is a fabricated device id, 
> then it should be
> stored persistently so that it is the same after reboot.
>
> -Charles
>
> Jerry Gilliam wrote:
>>  
>>>>    Immediate consumers (sd, ssd, cmdk, and dad target drivers) are all
>>>>    in ON.  There are no contracts needed at this time. I am seeking
>>>>    patch binding.
>>>>       
>>> There are two other drivers that use ddi_devid_register:
>>> sata and vdc (ldom's virtual disk client) - should they be listed 
>>> here ?
>>>
>>>     
>>
>> It wasn't apparent to me that vdc needs to provide this property
>> for its encapsulated devid.  This is either an existing bug or
>> there is no requirement.  I'll follow up on this.
>>
>> And with Prasad's work put back now, yes sata is now a devid
>> registrant.
>>
>>
>>  
>>> What happens if a driver uses ddi_devid_register but the corresponding
>>> driver.conf is not updated to have this flag ?
>>>
>>>     
>>
>> If the cache were to become damaged or the disk moved, the cache
>> auto-rebuild mechanism would not include trying to configure that
>> driver to re-discover the disk.
>>
>>
>> -jg
>>
>>   
>


From jek3@sun.com Thu Aug 23 22:29:53 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7O5Trlj003462
	for <psarc-ext@sac.sfbay.Sun.COM>; Thu, 23 Aug 2007 22:29:53 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l7O5R2kE004754;
	Fri, 24 Aug 2007 13:27:13 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JN900L07J5CZ300@nwk-avmta-2.sfbay.sun.com>; Thu,
 23 Aug 2007 22:27:12 -0700 (PDT)
Received: from jurassic-x4600.sfbay.sun.com ([129.146.17.63])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JN900D6FJ5BKQD0@nwk-avmta-2.sfbay.sun.com>; Thu,
 23 Aug 2007 22:27:11 -0700 (PDT)
Received: from [129.150.12.124]
 (vpn-129-150-12-124.SFBay.Sun.COM [129.150.12.124])
	by jurassic-x4600.sfbay.sun.com (8.14.1+Sun/8.14.1)
 with ESMTP id l7O5R9pN421669; Thu, 23 Aug 2007 22:27:10 -0700 (PDT)
Date: Thu, 23 Aug 2007 19:24:03 -1000
From: Joseph Kowalski <jek3@sun.com>
Subject: Re: 2007/477: Drivers registering devids
In-reply-to: <18124.29684.912201.489083@gargle.gargle.HOWL>
To: James Carlson <james.d.carlson@sun.com>
Cc: Jerry Gilliam <jg@jurassic.sfbay.sun.com>, PSARC-ext@sun.com,
        Chris.Horne@sun.com, Jerry.Gilliam@sun.com
Message-id: <46CE6B73.4040809@sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200708221702.l7MH2qqg937114@jurassic.eng.sun.com>
 <18124.29684.912201.489083@gargle.gargle.HOWL>
User-Agent: Thunderbird 1.5.0.5 (X11/20060925)
Status: RO
Content-Length: 429


> Jerry Gilliam writes:
>   
>>> The function has been in the DDI for more than ten years ... has it
>>> been unusable that whole time due to the static list?
>>>
>>>       
>> This is a piece of work required to complete the devid cache discovery
>> mechanism for devid providers not bundled in the ON consolidation.
>>     
Not architectual, but please make sure there is something about this in 
bugster.

- thanks,

- jek3


From jg@jurassic.sfbay.sun.com Tue Aug 28 19:24:05 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l7T2O4RM000779
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 28 Aug 2007 19:24:05 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l7T2LORD029388;
	Wed, 29 Aug 2007 03:21:24 +0100 (BST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JNI00H01JVOTB00@brm-avmta-1.central.sun.com>; Tue,
 28 Aug 2007 20:21:24 -0600 (MDT)
Received: from jurassic.eng.sun.com ([129.146.224.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JNI00GNSJVNXZ00@brm-avmta-1.central.sun.com>; Tue,
 28 Aug 2007 20:21:23 -0600 (MDT)
Received: from tethys (tethys.SFBay.Sun.COM [129.146.226.92])
	by jurassic.eng.sun.com (8.13.8+Sun/8.13.8) with SMTP id l7T2LNAt499341; Tue,
 28 Aug 2007 19:21:23 -0700 (PDT)
Date: Tue, 28 Aug 2007 19:19:59 -0700 (PDT)
From: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Subject: Re: 2007/477: Drivers registering devids
To: PSARC-ext@sun.com
Cc: Chris.Horne@sun.com
Reply-to: Jerry Gilliam <jg@jurassic.sfbay.sun.com>
Message-id: <200708290221.l7T2LNAt499341@jurassic.eng.sun.com>
MIME-version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.7_64 SunOS 5.11 sun4u sparc
Content-type: TEXT/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-MD5: V/J9f9tF8OD13foH/lEQyA==
X-PMX-Version: 5.2.0.264296
Status: RO
Content-Length: 200


>
> please make sure there is something about this in  bugster.
>

Ok, will do.  As the timer on the case has elapsed with
no further unresolved issues, this case is now closed/approved.


thx,
-jg


