[ofw] Doing queries on subnet every 30 seconds

Smith, Stan stan.smith at intel.com
Wed Jun 1 13:23:17 PDT 2011


>Queries of device relations to the IODEVICE objects should not result in a sweep.  These are for example queries to the IPoIB device, not the
>actual HCA.  In this case, the bus driver sees the query because it is the PDO driver for those child devices.
>

Agree.

>> No log evidence of IoInvalidateDeviceRelation calls?
>
>You'd have to trace it, I wouldn't expect to see it in the trace you showed.   By code inspection, IB_PNP_PORT_ADD event causes a call to
>IoInvalidateDeviceRelations.

Agree, PORT_ADD is the place to queue an ioc rescan.

>If you look at the target, one query goes to the bus, then each IPoIB device receives one too, as you would expect.  Only the one destined
>for the IB_BUS device should cause an IOC rescan (and the PnP IRP should be pending until the scan completes).
>
Makes sense; DEVICE_RELATIONS query for IB_BUS device should trigger an IOC rescan; this covers the 'devcon rescan' case.

To summarize:

 IOC rescan should only occur on 'demand' and only after IBAL is initialized.
No periodic IOC rescan.
IOC rescan requests generated by , IB_PNP_PORT_ADD event or DEVICE_RELATIONS query to the IB_BUS device.

Design considerations:

1) Use existing IOC rescan timer logic, such that the IOC rescan timer callback checks if an IOC rescan was requested or exits if no IOC rescan requested.

Advantages -
  Use existing code with simple modifications to detect nothing to do and skip rescan (low overhead).
  Next timer callback invocation will catch any IOC rescan requested during current IOC rescan.

Disadvantages - Periodic timer callback function runs to discover nothing to do (most common case).


2) Remove IOC rescan timer and timer callback logic,  queue an IoQueueWorkItem to perform an IOC rescan.

Advantages -
  IOC rescan only when requested.
  Queue IOC rescan request if IOC scan not in progress, otherwise record rescan request.
  Use existing Windows system thread work queue mechanisms instead of complib timer callback logic.

Disadvantages -
  Could end up doing back-2-back IOC rescans if rescan request occurs while an IOC rescan is in flight.
  IoWorkQueue setup is similar in complexity to setting up a timer and timer callback; likely a wash.

Thoughts on the subject?




More information about the ofw mailing list