Hi Peter,
of course your approach will work.In fact, I built two version of my miniport port driver, one of which uses scsi-miniport schematic and the other one uses storport-miniport schematic. What confused me now is that scsi-port driver can send up to 28K bytes contiguous physical memory to my scsi-miniport driver (and scsi-port driver seldom sends small memory like 4K or 8K bytes when read/write large files), but storport driver always send small memory blocks to my storport-miniport driver. So I’m wondering if I make some mistakes in choosing parameters for the miniport driver. Is it just by design?
thanks!
2008-04-11??“Peter Wieland” xxxxx@windows.microsoft.com:
You read it wrong.
I’m suggesting something more like what NDIS drivers do to consolidate highly fragmented packets before sending. Map the I/O, copy the data into common buffer and then issue one physically contiguous write (or map the I/O, issue one physically contiguous read then copy the data from the common buffer). It introduces resource contention around the shared common buffer, but if fragmented operations are really very slow on this device then it may overall be faster.
-p
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Thursday, April 10, 2008 11:50 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] about scatter/gather storport miniport driver
Hmmmm… If I understand what you’re saying, you’re suggesting he could delay some of his writes (for example), in the hopes that the following writes will be contiguous??
Aren’t there some real problems with this? First, it’s hard to know how long you delay the write in the hope of getting another, contiguous, operation. Do you wait to get the NEXT write and agglomerate it if it’s contiguous? Do you wait for TWO more writes? What if those writes take a long time to arrive?
Also, in this scheme aren’t you risking data loss in the event of system failure? You’ve delayed the write, the system crashes… the file system thinks the data is committed to disk, you’re screwed. No??
Am I on the right track here, or has the sudden warm weather here in New England caused me to totally lose my mind and miss your point entirely?
Peter
OSR
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer