StorPort and MaximumSGList

Hi.

This question would probably best addressed to Microsoft, but we have found
out that the StorPort.sys driver does not pay any attention to the
MaximumSGList registry setting. There is code in StorPort.sys to read the
setting but it is currently disabled by some sort of bit mask that’s hard
coded.

I am wondering if anyone has any experience in this area. I know there are
Microsoft folks on this list and hope they will respond as to why this
feature is disabled and if it will be coming back in a future version.

Thanks,

Jerry.

This is the evil feature, which existed only due to SCSIPORT’s being too
primitive in this code path.

This “feature” limited the storage IO request size to something a bit
lesser then 1MB, which made Windows not-so-good in working with serious tape
drives like LTO.

It is very good if STORPORT has no this limitation.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Tuesday, March 09, 2004 5:14 PM
Subject: [ntdev] StorPort and MaximumSGList

>
> Hi.
>
> This question would probably best addressed to Microsoft, but we have found
> out that the StorPort.sys driver does not pay any attention to the
> MaximumSGList registry setting. There is code in StorPort.sys to read the
> setting but it is currently disabled by some sort of bit mask that’s hard
> coded.
>
> I am wondering if anyone has any experience in this area. I know there are
> Microsoft folks on this list and hope they will respond as to why this
> feature is disabled and if it will be coming back in a future version.
>
> Thanks,
>
> Jerry.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

You should assume that MaximumSGList for Storport is 255. We do ignore
this “by design”.

Jeff

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, March 09, 2004 10:01 AM
Subject: Re: StorPort and MaximumSGList

This is the evil feature, which existed only due to SCSIPORT’s being
too
primitive in this code path.

This “feature” limited the storage IO request size to something a
bit
lesser then 1MB, which made Windows not-so-good in working with serious
tape
drives like LTO.

It is very good if STORPORT has no this limitation.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Tuesday, March 09, 2004 5:14 PM
Subject: [ntdev] StorPort and MaximumSGList

>
> Hi.
>
> This question would probably best addressed to Microsoft, but we have
found
> out that the StorPort.sys driver does not pay any attention to the
> MaximumSGList registry setting. There is code in StorPort.sys to read
the
> setting but it is currently disabled by some sort of bit mask that’s
hard
> coded.
>
> I am wondering if anyone has any experience in this area. I know
there are
> Microsoft folks on this list and hope they will respond as to why this
> feature is disabled and if it will be coming back in a future version.
>
> Thanks,
>
> Jerry.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Sorry, Max, but unfortunately StorPort is limiting transfer size to 64k and
without this “feature,” you can’t do anything to increase that limit.

Jerry.

----- Original Message -----
Subject: Re: StorPort and MaximumSGList
From: “Maxim S. Shatskih”
Date: Tue, 9 Mar 2004 21:00:36 +0300
X-Message-Number: 18

This is the evil feature, which existed only due to SCSIPORT’s being
too
primitive in this code path.

This “feature” limited the storage IO request size to something a bit
lesser then 1MB, which made Windows not-so-good in working with serious
tape
drives like LTO.

It is very good if STORPORT has no this limitation.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Tuesday, March 09, 2004 5:14 PM
Subject: [ntdev] StorPort and MaximumSGList

>
> Hi.
>
> This question would probably best addressed to Microsoft, but we have
found
> out that the StorPort.sys driver does not pay any attention to the
> MaximumSGList registry setting. There is code in StorPort.sys to read
the
> setting but it is currently disabled by some sort of bit mask that’s hard
> coded.
>
> I am wondering if anyone has any experience in this area. I know there
are
> Microsoft folks on this list and hope they will respond as to why this
> feature is disabled and if it will be coming back in a future version.
>
> Thanks,
>
> Jerry.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

I don’t know if storport looks at these (scsiport does and I’m
interpolating) but what have you set MaximumTransferLength and
NumberOfPhysicalBreaks to?

-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@attotech.com
Sent: Wednesday, March 10, 2004 5:11 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] StorPort and MaximumSGList

Sorry, Max, but unfortunately StorPort is limiting transfer size to 64k
and without this “feature,” you can’t do anything to increase that
limit.

Jerry.

----- Original Message -----
Subject: Re: StorPort and MaximumSGList
From: “Maxim S. Shatskih”
Date: Tue, 9 Mar 2004 21:00:36 +0300
X-Message-Number: 18

This is the evil feature, which existed only due to SCSIPORT’s being
too primitive in this code path.

This “feature” limited the storage IO request size to something a
bit lesser then 1MB, which made Windows not-so-good in working with
serious tape drives like LTO.

It is very good if STORPORT has no this limitation.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Tuesday, March 09, 2004 5:14 PM
Subject: [ntdev] StorPort and MaximumSGList

>
> Hi.
>
> This question would probably best addressed to Microsoft, but we have
found
> out that the StorPort.sys driver does not pay any attention to the
> MaximumSGList registry setting. There is code in StorPort.sys to read
the
> setting but it is currently disabled by some sort of bit mask that’s
> hard coded.
>
> I am wondering if anyone has any experience in this area. I know
> there
are
> Microsoft folks on this list and hope they will respond as to why this

> feature is disabled and if it will be coming back in a future version.
>
> Thanks,
>
> Jerry.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Repost - sorry, I forgot to change the &%^$# subject line!


Hi, Peter.

So far we are obeying the DDK documentation on NumberOfPhysicalBreaks as
follows:

>>>>>
NumberOfPhysicalBreaks
Specifies the maximum number of breaks between address ranges that a
data buffer can have if the HBA supports scatter/gather. In other
words, the number of scatter/gather lists minus one. By default, the
value of this member is SP_UNINITIALIZED_VALUE, which indicates the
HBA can support an unlimited number of physical discontiguities. If
the port driver sets a value for this member, the miniport driver can
adjust the value lower but no higher. If this member is
SP_UNINITIALIZED_VALUE, the miniport driver must reset this member
according to the HBA’s scatter/gather capacity, with zero representing
no scatter/gather support.
<<<<<<

So, the StorPort driver is calling FindAdapter with a value of 0x11 in
NumberOfPhysicalBreaks and according to the above, we are not allowed to
change it to a higher value. As per my original query, the StorPort code
that reads MaximumSgList from the registry is being disabled by some
hard-coded bit mask.

In our drivers, we have typically set MaximumTransferLength to PAGE_SIZE *
NumberOfPhysicalBreaks.

In reply to Jeffrey, … well, if 255 is the assumed value, then why is
NumberOfPhysicalBreaks coming to us as 0x11?

Are you guys suggesting that the above documentation is wrong for StorPort
and that we can put basically anything we want to in
NumberOfPhysicalBreaks?

Thanks,

Jerry.

-----Original Message-----
Subject: RE: StorPort and MaximumSGList
From: “Peter Wieland”
Date: Wed, 10 Mar 2004 07:47:20 -0800
X-Message-Number: 7

I don’t know if storport looks at these (scsiport does and I’m
interpolating) but what have you set MaximumTransferLength and
NumberOfPhysicalBreaks to?

-p

… and …

-----Original Message-----
Subject: RE: StorPort and MaximumSGList
From: “Jeffrey Goldner”
Date: Tue, 9 Mar 2004 22:50:38 -0800
X-Message-Number: 3

You should assume that MaximumSGList for Storport is 255. We do ignore
this “by design”.

Jeff

I believe Jerry verified today that you can change this value in the
miniport. Sorry if I misled anyone - I hadn’t realized that dev had set
the default to 17. We will adjust the documentation to reflect this.

-----Original Message-----
From: xxxxx@attotech.com [mailto:xxxxx@attotech.com]
Sent: Friday, March 12, 2004 10:39 AM
Subject: RE: StorPort and MaximumSGList

Repost - sorry, I forgot to change the &%^$# subject line!


Hi, Peter.

So far we are obeying the DDK documentation on NumberOfPhysicalBreaks as
follows:

>>>>>
NumberOfPhysicalBreaks
Specifies the maximum number of breaks between address ranges that
a
data buffer can have if the HBA supports scatter/gather. In other
words, the number of scatter/gather lists minus one. By default,
the
value of this member is SP_UNINITIALIZED_VALUE, which indicates the
HBA can support an unlimited number of physical discontiguities. If
the port driver sets a value for this member, the miniport driver
can
adjust the value lower but no higher. If this member is
SP_UNINITIALIZED_VALUE, the miniport driver must reset this member
according to the HBA’s scatter/gather capacity, with zero
representing
no scatter/gather support.
<<<<<<

So, the StorPort driver is calling FindAdapter with a value of 0x11 in
NumberOfPhysicalBreaks and according to the above, we are not allowed to
change it to a higher value. As per my original query, the StorPort
code
that reads MaximumSgList from the registry is being disabled by some
hard-coded bit mask.

In our drivers, we have typically set MaximumTransferLength to PAGE_SIZE
*
NumberOfPhysicalBreaks.

In reply to Jeffrey, … well, if 255 is the assumed value, then why is
NumberOfPhysicalBreaks coming to us as 0x11?

Are you guys suggesting that the above documentation is wrong for
StorPort
and that we can put basically anything we want to in
NumberOfPhysicalBreaks?

Thanks,

Jerry.

-----Original Message-----
Subject: RE: StorPort and MaximumSGList
From: “Peter Wieland”
Date: Wed, 10 Mar 2004 07:47:20 -0800
X-Message-Number: 7

I don’t know if storport looks at these (scsiport does and I’m
interpolating) but what have you set MaximumTransferLength and
NumberOfPhysicalBreaks to?

-p

… and …

-----Original Message-----
Subject: RE: StorPort and MaximumSGList
From: “Jeffrey Goldner”
Date: Tue, 9 Mar 2004 22:50:38 -0800
X-Message-Number: 3

You should assume that MaximumSGList for Storport is 255. We do ignore
this “by design”.

Jeff