Virtual Storport Miniport Vs Physical Storport Miniport Performance

Hi all,

Would storport virtual miniport give the same performance as
storport physical miniport given the fact that HwStorBuildIo is supported only
in physical miniport. In virtual miniport i use work items to enque requests during
HwStorStartIo and could achieve better perfomance.

Porting WDM to physical miniport still expects good number of functionalities
unavailable in physical miniport. Making a seperate WDM library and bridging the gap
with a wrapper is not straigh forward and brings complications with existing code that already has different locks, queues, worker threads, irp rolling etc.

I have virtual miniport model working fine with merged wdm code, layered over hardware wdm driver.

But would it be worth to bring all the constraints and go physical miniport just
to get the advantage of HwStorBuildIo and will that improve performance (IOPs and CPU)
substantially ?

Thanks

> -----Original Message-----

From: xxxxx@lists.osr.com [mailto:bounce-428739-
xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Friday, October 22, 2010 3:58 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Virtual Storport Miniport Vs Physical Storport Miniport
Performance

Hi all,

Would storport virtual miniport give the same performance as
storport physical miniport given the fact that HwStorBuildIo is supported
only
in physical miniport. In virtual miniport i use work items to enque
requests during
HwStorStartIo and could achieve better perfomance.

Why would you need to do this? If you are merely a ramdisk, you have
everything you need to process the request and return it. Are you doing a
file-backed virtual disk? A disk image stored on a network device?

Porting WDM to physical miniport still expects good number of
functionalities
unavailable in physical miniport. Making a seperate WDM library and
bridging the gap
with a wrapper is not straigh forward and brings complications with
existing code that already has different locks, queues, worker threads,
irp rolling etc.

How does WDM enter into this? What do you need from WDM that storport
doesn’t give you?

I have virtual miniport model working fine with merged wdm code, layered
over hardware wdm driver.

So you have some bit of hardware with a WDM driver for it? Is it a storage
HBA, or something else? If it’s a storage HBA, why the WDM driver, instead
of a miniport in the first place?

But would it be worth to bring all the constraints and go physical
miniport just
to get the advantage of HwStorBuildIo and will that improve performance
(IOPs and CPU)
substantially ?

That really depends on what you already have. You might have merely
achieved all the same effects of a non-virtual miniport with double the
overhead because of all the extra layers involved. Or you may have things
very nearly optimal for the hardware you have. You’d need to explain a bit
more before that judgment could be made. Mostly, you should measure what
you have and decide if it’s good enough or not.

Philip D. Barila (303) 776-1264

> But would it be worth to bring all the constraints and go physical miniport just

to get the advantage of HwStorBuildIo

No advantages of it in virtual miniports. At all.

The “advantage” is just in a bit more smart approach to locking, and virtual miniport is called without locking, and is expected to implement its own locking internally.

So, you can easily use the same “advantage” in the virtual miniport code.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

We began with wdm direct-io storage driver before going for miniport.
With driver already build on WDM model porting to virtual miniport was easy
as the changes were less. We could see performance comparable to wdm direct-io model.
But remodeling it to physical miniport to check the performance improvement, if any, things began getting complicated with revamp of the logics used in WDM model.
I have not thouroughly looked through the physical miniport.
I have a gut feeling that existing logic can be fit into storport physical miniport model
but the approach would not be the same and that would eat substantial amount of time.

So continuing with virtual miniport driver layered upon another driver controlling hardware
would be OK if it tends to get the same i/o & CPU performance as from physical miniport (which would be one monolothic driver instead of 2 (i.e. virtual miniport driver over hardware driver).