What storport performance options are available?

What flags are valid in the PERF_CONFIGURATION_DATA on each version of the OS?

I am currently running Server 2008 SP2 x64 and only see two supported flags:

STOR_PERF_DPC_REDIRECTION
STOR_PERF_CONCURRENT_CHANNELS (not supposed to be set by the driver)

I was hoping to use STOR_PERF_OPTIMIZE_FOR_COMPLETION_DURING_STARTIO and there is no indication in the documentation that it is not supported.

What is your problem? These two flags are set up by default. At least I saw them in Windows 7 x64 also. I never see any limitation of using STOR_PERF_OPTIMIZE_FOR_COMPLETION_DURING_STARTIO.
Make StorPortInitializePerfOpts with Query=TRUE, add STOR_PERF_OPTIMIZE_FOR_COMPLETION_DURING_STARTIO in PERF_CONFIGURATION_DATA.Flags and call StorPortInitializePerfOpts with Query=FALSE again.

Igor Sharovar

When I retrieve the settings with StorportInitializePerfOpts I only get two flags, the value is 0x3.

If I set only the DPC_REDIRECTION and COMPLETION_DURING_STARTIO flags, I get an error when I call StorportInitializePerfOpts with Query=FALSE.

I suppose there could be a problem if I don’t keep the CONCURRENT_CHANNELS bit set on the second call. I was unsure if that was appropriate since the documentation mentioned that drivers should never set that. I guess if the value was retrieved on an earlier call, I am not really setting it on my own.

I went back to my debug system and traced through the code a few times.

The query=TRUE call returns a flags value of 0x3.
This does not include the bit for COMPLETION_DURING_STARTIO.

I tried changing flags to 0x11 and 0x13.
Both calls to StorportInitializePerfOpts failed with a return status STOR_STATUS_UNSUCCESSFUL.

I could change flags value and I succeed. I only tested this on Windows 7 x64 PC.
I would recommend to you to set up checkbuild of storport.sys and enable debug messages. You may see something else. Also try to debug StorPortInitializePerfOpts to understand why it returns error value.

Igor Sharovar

What flag bits do you see on Windows 7 when query = TRUE?

>What flag bits do you see on Windows 7 when query = TRUE?
0x3 - STOR_PERF_DPC_REDIRECTION | STOR_PERF_CONCURRENT_CHANNELS.

Igor Sharovar

That seems to contradict the documentation.
http://msdn.microsoft.com/en-us/library/ff567114(v=VS.85).aspx

I would expect query=TRUE to return 0x13 if COMPLETION_DURING_STARTIO can be set.

wrote in message news:xxxxx@ntdev…
> That seems to contradict the documentation.
> http://msdn.microsoft.com/en-us/library/ff567114(v=VS.85).aspx
>
> I would expect query=TRUE to return 0x13 if COMPLETION_DURING_STARTIO can
> be set.
>

What was the value of “Version” that you were using? The document does not
seem to mention the version to be used for each of the flags, but on Win7
x64 I am able to set COMPLETION_DURING_STARTIO with Version=3.

WINVER reports Version 6.0 (Build 6002).

Do you see the value 0x13 when query=TRUE?

wrote in message news:xxxxx@ntdev…
> WINVER reports Version 6.0 (Build 6002).
>
I did not mean the OS version. Instead, I meant the version field of
PERF_CONFIGURATION_DATA structure. Sorry for not being clear.

> Do you see the value 0x13 when query=TRUE?
>
No. On Win2k8 R2, I see that when query=TRUE, the flags returned are 3
(DPC_REDIRECTION | CONCURRENT_CHANNELS), with Version being set to 0.
However, if I set the version to 3, flags to 0x11 (DPC_REDIRECTION |
COMPLETION_DURING_STARTIO) and query=FALSE, the StorPortInitializePerfOpts
returns success. I remember seeing in one of the MS slide deck (DDC or
WinHEC) that the version number decides which flags are supported. Of
course, with query=TRUE, all the supported flags should ideally be returned,
IMO.

I did manage to see a success response from StorportInitializePerfOpts when version was set to 3.

This entire mechanism seems to be badly designed. If the call returns flags when version is 0, those flags should be supported without changing the version flag. It is also frustrating that the version number is undocumented. I wonder what is supported with version 1 and 2?