Hi,
I implement a lower filter driver to queue IPR by using cancel-safe
queue framework. The system seems not to send IRP again when the number
of IRP is about 25. The following is my test:

1. create a lower filter driver under Disk.sys
2. Queue IRP_MJ_SCSI in lower filter driver.
3. The system seems not to send IRP_MJ_SCSI again when the number of
IRP_MJ_SCSI in queue is about 25. Lower filter driver dont release
IRP_MJ_SCSI in queue until after ten minutes.
5. Lower filter driver release IRP_MJ_SCSI and it's ok.

Question:
1. How many IRP can be queued at most by using cancel-safe queue
framework?
2. Will it cause problem if lower filter driver queue IRP ten minutes
or even more?
3. Why the system dont send IRP_MJ_SCSI again when the number of IRP
in queue is about 25? What's mechanism?

Thanks in advanced.

Brian

Re: How many IRPs are queued at most when use cancel-safe queue framework? by Doron

Doron
Thu Aug 11 01:51:26 CDT 2005

the number of queued requests in a CSQ is limited by system memory, there is
no hardcoded limit. what i think you are seeing is that the stack above you
(disk) has a hard coded limit of transfers. this limit is probably based on
the maximum number of concurrent transfers the disk controller can handle
(which is queried at runtime during startup).

why are you holding onto the requests and never letting them complete?

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Brian" <Brian8701@gmail.com> wrote in message
news:1123726599.363812.35500@g49g2000cwa.googlegroups.com...
> Hi,
> I implement a lower filter driver to queue IPR by using cancel-safe
> queue framework. The system seems not to send IRP again when the number
> of IRP is about 25. The following is my test:
>
> 1. create a lower filter driver under Disk.sys
> 2. Queue IRP_MJ_SCSI in lower filter driver.
> 3. The system seems not to send IRP_MJ_SCSI again when the number of
> IRP_MJ_SCSI in queue is about 25. Lower filter driver dont release
> IRP_MJ_SCSI in queue until after ten minutes.
> 5. Lower filter driver release IRP_MJ_SCSI and it's ok.
>
> Question:
> 1. How many IRP can be queued at most by using cancel-safe queue
> framework?
> 2. Will it cause problem if lower filter driver queue IRP ten minutes
> or even more?
> 3. Why the system dont send IRP_MJ_SCSI again when the number of IRP
> in queue is about 25? What's mechanism?
>
> Thanks in advanced.
>
> Brian
>



Re: How many IRPs are queued at most when use cancel-safe queue framework? by Brian

Brian
Thu Aug 11 03:23:02 CDT 2005

Hi,
Thanks for reply.

The purpose of queuing IRP is that I want to park disk under specific
condition and then unpark disk after a while to do previous IRP_MJ_SCSI
in queue. So, first I must lock IRP_MJ_SCSI and then do park/unpard
action. The item I concern is whether the number of IRP in queue is
over limitation of system and than system crash?
By the way, I hold on request about 50 minutes and system is ok
after releasing IRP.

Brian

Doron Holan [MS] =E5=AF=AB=E9=81=93=EF=BC=9A

> the number of queued requests in a CSQ is limited by system memory, there=
is
> no hardcoded limit. what i think you are seeing is that the stack above =
you
> (disk) has a hard coded limit of transfers. this limit is probably based=
on
> the maximum number of concurrent transfers the disk controller can handle
> (which is queried at runtime during startup).
>
> why are you holding onto the requests and never letting them complete?
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no right=
s=2E
>
>
> "Brian" <Brian8701@gmail.com> wrote in message
> news:1123726599.363812.35500@g49g2000cwa.googlegroups.com...
> > Hi,
> > I implement a lower filter driver to queue IPR by using cancel-safe
> > queue framework. The system seems not to send IRP again when the number
> > of IRP is about 25. The following is my test:
> >
> > 1. create a lower filter driver under Disk.sys
> > 2. Queue IRP_MJ_SCSI in lower filter driver.
> > 3. The system seems not to send IRP_MJ_SCSI again when the number of
> > IRP_MJ_SCSI in queue is about 25. Lower filter driver dont release
> > IRP_MJ_SCSI in queue until after ten minutes.
> > 5. Lower filter driver release IRP_MJ_SCSI and it's ok.
> >
> > Question:
> > 1. How many IRP can be queued at most by using cancel-safe queue
> > framework?
> > 2. Will it cause problem if lower filter driver queue IRP ten minutes
> > or even more?
> > 3. Why the system dont send IRP_MJ_SCSI again when the number of IRP
> > in queue is about 25? What's mechanism?
> >
> > Thanks in advanced.
> >
> > Brian
> >


Re: How many IRPs are queued at most when use cancel-safe queue framework? by Maxim

Maxim
Thu Aug 11 04:18:55 CDT 2005

IIRC the storage stacks support the "freeze queue" SRB which must be sent
down to the storage port. Storage port has its own queue.

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

"Brian" <Brian8701@gmail.com> wrote in message
news:1123748582.477503.265980@g47g2000cwa.googlegroups.com...
Hi,
Thanks for reply.

The purpose of queuing IRP is that I want to park disk under specific
condition and then unpark disk after a while to do previous IRP_MJ_SCSI
in queue. So, first I must lock IRP_MJ_SCSI and then do park/unpard
action. The item I concern is whether the number of IRP in queue is
over limitation of system and than system crash?
By the way, I hold on request about 50 minutes and system is ok
after releasing IRP.

Brian

Doron Holan [MS] ???

> the number of queued requests in a CSQ is limited by system memory, there is
> no hardcoded limit. what i think you are seeing is that the stack above you
> (disk) has a hard coded limit of transfers. this limit is probably based on
> the maximum number of concurrent transfers the disk controller can handle
> (which is queried at runtime during startup).
>
> why are you holding onto the requests and never letting them complete?
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "Brian" <Brian8701@gmail.com> wrote in message
> news:1123726599.363812.35500@g49g2000cwa.googlegroups.com...
> > Hi,
> > I implement a lower filter driver to queue IPR by using cancel-safe
> > queue framework. The system seems not to send IRP again when the number
> > of IRP is about 25. The following is my test:
> >
> > 1. create a lower filter driver under Disk.sys
> > 2. Queue IRP_MJ_SCSI in lower filter driver.
> > 3. The system seems not to send IRP_MJ_SCSI again when the number of
> > IRP_MJ_SCSI in queue is about 25. Lower filter driver dont release
> > IRP_MJ_SCSI in queue until after ten minutes.
> > 5. Lower filter driver release IRP_MJ_SCSI and it's ok.
> >
> > Question:
> > 1. How many IRP can be queued at most by using cancel-safe queue
> > framework?
> > 2. Will it cause problem if lower filter driver queue IRP ten minutes
> > or even more?
> > 3. Why the system dont send IRP_MJ_SCSI again when the number of IRP
> > in queue is about 25? What's mechanism?
> >
> > Thanks in advanced.
> >
> > Brian
> >



Re: How many IRPs are queued at most when use cancel-safe queue framework? by Brian

Brian
Fri Aug 12 00:16:46 CDT 2005

Hi,
Could you tell me how to set SBR to freeze queue? I cant find any
parameter in "Function" element of SRB about "freeze queue". Thanks a
lots.


Maxim S. Shatskih =E5=AF=AB=E9=81=93=EF=BC=9A

> IIRC the storage stacks support the "freeze queue" SRB which must be sent
> down to the storage port. Storage port has its own queue.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "Brian" <Brian8701@gmail.com> wrote in message
> news:1123748582.477503.265980@g47g2000cwa.googlegroups.com...
> Hi,
> Thanks for reply.
>
> The purpose of queuing IRP is that I want to park disk under specific
> condition and then unpark disk after a while to do previous IRP_MJ_SCSI
> in queue. So, first I must lock IRP_MJ_SCSI and then do park/unpard
> action. The item I concern is whether the number of IRP in queue is
> over limitation of system and than system crash?
> By the way, I hold on request about 50 minutes and system is ok
> after releasing IRP.
>
> Brian
>
> Doron Holan [MS] ???
>
> > the number of queued requests in a CSQ is limited by system memory, the=
re is
> > no hardcoded limit. what i think you are seeing is that the stack abov=
e you
> > (disk) has a hard coded limit of transfers. this limit is probably bas=
ed on
> > the maximum number of concurrent transfers the disk controller can hand=
le
> > (which is queried at runtime during startup).
> >
> > why are you holding onto the requests and never letting them complete?
> >
> > d
> >
> > --
> > Please do not send e-mail directly to this alias. this alias is for
> > newsgroup purposes only.
> > This posting is provided "AS IS" with no warranties, and confers no rig=
hts.
> >
> >
> > "Brian" <Brian8701@gmail.com> wrote in message
> > news:1123726599.363812.35500@g49g2000cwa.googlegroups.com...
> > > Hi,
> > > I implement a lower filter driver to queue IPR by using cancel-safe
> > > queue framework. The system seems not to send IRP again when the numb=
er
> > > of IRP is about 25. The following is my test:
> > >
> > > 1. create a lower filter driver under Disk.sys
> > > 2. Queue IRP_MJ_SCSI in lower filter driver.
> > > 3. The system seems not to send IRP_MJ_SCSI again when the number of
> > > IRP_MJ_SCSI in queue is about 25. Lower filter driver dont release
> > > IRP_MJ_SCSI in queue until after ten minutes.
> > > 5. Lower filter driver release IRP_MJ_SCSI and it's ok.
> > >
> > > Question:
> > > 1. How many IRP can be queued at most by using cancel-safe queue
> > > framework?
> > > 2. Will it cause problem if lower filter driver queue IRP ten minutes
> > > or even more?
> > > 3. Why the system dont send IRP_MJ_SCSI again when the number of IRP
> > > in queue is about 25? What's mechanism?
> > >
> > > Thanks in advanced.
> > >
> > > Brian
> > >


Re: How many IRPs are queued at most when use cancel-safe queue framework? by Maxim

Maxim
Fri Aug 12 04:55:43 CDT 2005

Try this DDK article in MSDN"

"Locking SCSI Port Driver's Internal Queue"

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

"Brian" <Brian8701@gmail.com> wrote in message
news:1123823806.577777.262420@g14g2000cwa.googlegroups.com...
Hi,
Could you tell me how to set SBR to freeze queue? I cant find any
parameter in "Function" element of SRB about "freeze queue". Thanks a
lots.


Maxim S. Shatskih ???

> IIRC the storage stacks support the "freeze queue" SRB which must be sent
> down to the storage port. Storage port has its own queue.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "Brian" <Brian8701@gmail.com> wrote in message
> news:1123748582.477503.265980@g47g2000cwa.googlegroups.com...
> Hi,
> Thanks for reply.
>
> The purpose of queuing IRP is that I want to park disk under specific
> condition and then unpark disk after a while to do previous IRP_MJ_SCSI
> in queue. So, first I must lock IRP_MJ_SCSI and then do park/unpard
> action. The item I concern is whether the number of IRP in queue is
> over limitation of system and than system crash?
> By the way, I hold on request about 50 minutes and system is ok
> after releasing IRP.
>
> Brian
>
> Doron Holan [MS] ???
>
> > the number of queued requests in a CSQ is limited by system memory, there
is
> > no hardcoded limit. what i think you are seeing is that the stack above
you
> > (disk) has a hard coded limit of transfers. this limit is probably based
on
> > the maximum number of concurrent transfers the disk controller can handle
> > (which is queried at runtime during startup).
> >
> > why are you holding onto the requests and never letting them complete?
> >
> > d
> >
> > --
> > Please do not send e-mail directly to this alias. this alias is for
> > newsgroup purposes only.
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> >
> > "Brian" <Brian8701@gmail.com> wrote in message
> > news:1123726599.363812.35500@g49g2000cwa.googlegroups.com...
> > > Hi,
> > > I implement a lower filter driver to queue IPR by using cancel-safe
> > > queue framework. The system seems not to send IRP again when the number
> > > of IRP is about 25. The following is my test:
> > >
> > > 1. create a lower filter driver under Disk.sys
> > > 2. Queue IRP_MJ_SCSI in lower filter driver.
> > > 3. The system seems not to send IRP_MJ_SCSI again when the number of
> > > IRP_MJ_SCSI in queue is about 25. Lower filter driver dont release
> > > IRP_MJ_SCSI in queue until after ten minutes.
> > > 5. Lower filter driver release IRP_MJ_SCSI and it's ok.
> > >
> > > Question:
> > > 1. How many IRP can be queued at most by using cancel-safe queue
> > > framework?
> > > 2. Will it cause problem if lower filter driver queue IRP ten minutes
> > > or even more?
> > > 3. Why the system dont send IRP_MJ_SCSI again when the number of IRP
> > > in queue is about 25? What's mechanism?
> > >
> > > Thanks in advanced.
> > >
> > > Brian
> > >



Re: How many IRPs are queued at most when use cancel-safe queue framework? by Brian

Brian
Sun Aug 14 21:51:38 CDT 2005

Hi,
I tried it, but the returned value of SrbStatus in SRB is
SRB_STATUS_INVALID_REQUEST.
In DDK, this belongs SCSI Port Driver's Queue Management. Is it
suitable for IDE HDD? There is no document about IDE port's Queue
Management in DDK.

Regards,
Brian
Maxim S. Shatskih =E5=AF=AB=E9=81=93=EF=BC=9A

> Try this DDK article in MSDN"
>
> "Locking SCSI Port Driver's Internal Queue"
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "Brian" <Brian8701@gmail.com> wrote in message
> news:1123823806.577777.262420@g14g2000cwa.googlegroups.com...
> Hi,
> Could you tell me how to set SBR to freeze queue? I cant find any
> parameter in "Function" element of SRB about "freeze queue". Thanks a
> lots.
>
>
> Maxim S. Shatskih ???
>
> > IIRC the storage stacks support the "freeze queue" SRB which must be se=
nt
> > down to the storage port. Storage port has its own queue.
> >
> > --
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > maxim@storagecraft.com
> > http://www.storagecraft.com
> >
> > "Brian" <Brian8701@gmail.com> wrote in message
> > news:1123748582.477503.265980@g47g2000cwa.googlegroups.com...
> > Hi,
> > Thanks for reply.
> >
> > The purpose of queuing IRP is that I want to park disk under specific
> > condition and then unpark disk after a while to do previous IRP_MJ_SCSI
> > in queue. So, first I must lock IRP_MJ_SCSI and then do park/unpard
> > action. The item I concern is whether the number of IRP in queue is
> > over limitation of system and than system crash?
> > By the way, I hold on request about 50 minutes and system is ok
> > after releasing IRP.
> >
> > Brian
> >
> > Doron Holan [MS] ???
> >
> > > the number of queued requests in a CSQ is limited by system memory, t=
here
> is
> > > no hardcoded limit. what i think you are seeing is that the stack ab=
ove
> you
> > > (disk) has a hard coded limit of transfers. this limit is probably b=
ased
> on
> > > the maximum number of concurrent transfers the disk controller can ha=
ndle
> > > (which is queried at runtime during startup).
> > >
> > > why are you holding onto the requests and never letting them complete?
> > >
> > > d
> > >
> > > --
> > > Please do not send e-mail directly to this alias. this alias is for
> > > newsgroup purposes only.
> > > This posting is provided "AS IS" with no warranties, and confers no r=
ights.
> > >
> > >
> > > "Brian" <Brian8701@gmail.com> wrote in message
> > > news:1123726599.363812.35500@g49g2000cwa.googlegroups.com...
> > > > Hi,
> > > > I implement a lower filter driver to queue IPR by using cancel-safe
> > > > queue framework. The system seems not to send IRP again when the nu=
mber
> > > > of IRP is about 25. The following is my test:
> > > >
> > > > 1. create a lower filter driver under Disk.sys
> > > > 2. Queue IRP_MJ_SCSI in lower filter driver.
> > > > 3. The system seems not to send IRP_MJ_SCSI again when the number =
of
> > > > IRP_MJ_SCSI in queue is about 25. Lower filter driver dont release
> > > > IRP_MJ_SCSI in queue until after ten minutes.
> > > > 5. Lower filter driver release IRP_MJ_SCSI and it's ok.
> > > >
> > > > Question:
> > > > 1. How many IRP can be queued at most by using cancel-safe queue
> > > > framework?
> > > > 2. Will it cause problem if lower filter driver queue IRP ten minu=
tes
> > > > or even more?
> > > > 3. Why the system dont send IRP_MJ_SCSI again when the number of I=
RP
> > > > in queue is about 25? What's mechanism?
> > > >
> > > > Thanks in advanced.
> > > >
> > > > Brian
> > > >