deferring completion processing

In the Win2000 DDK, the topic:

Setup, Plug & Play, Power Management
2.3 Postponing PnP IRP Processing Until Lower Drivers Finish
Figure 2.3

indicates that if a completion routine returns MORE_PROCESSING_REQ’D,
then the original thread, in which the IRP was sent to the dispatch
routine, can perform some additional processing and then call
IoCompleteRequest() a second time for the same IRP.

My question: does this deferred processing have to happen in the
original dispatch thread; or in my completion routine can I queue a
work item to an arbitrary system thread and complete the IRP a second
time there (having returned pending from the dispatch routine)?


Dave Cox
Hewlett-Packard Co.
HPSO/SSMO (Santa Barbara)
https://ecardfile.com/id/Dave+Cox

It depends on what type of post processing you are doing and the thread
context. For example, if you defer a read request and intend on accessing
the the buffer and the method is METHOD_NIETHER, you may attempt to access a
buffer located in a process other than the current process (system process
in a system process owned worker thread).

It realy depends on the call and what you intend to do in the completion
routine.

But, yes, you can do what you are indicating. We have written drivers where
the request may be posted off to 3 different worker threads and go though 4
completion routines before the request finally gets completed.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of COX,DAVID
(HP-Roseville,ex1)
Sent: Wednesday, May 10, 2000 3:57 PM
To: NT Developers Interest List
Subject: [ntdev] deferring completion processing

In the Win2000 DDK, the topic:

Setup, Plug & Play, Power Management
2.3 Postponing PnP IRP Processing Until Lower Drivers Finish
Figure 2.3

indicates that if a completion routine returns MORE_PROCESSING_REQ’D,
then the original thread, in which the IRP was sent to the dispatch
routine, can perform some additional processing and then call
IoCompleteRequest() a second time for the same IRP.

My question: does this deferred processing have to happen in the
original dispatch thread; or in my completion routine can I queue a
work item to an arbitrary system thread and complete the IRP a second
time there (having returned pending from the dispatch routine)?


Dave Cox
Hewlett-Packard Co.
HPSO/SSMO (Santa Barbara)
https://ecardfile.com/id/Dave+Cox


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

> But, yes, you can do what you are indicating. We have written drivers
where

the request may be posted off to 3 different worker threads and go though
4
completion routines before the request finally gets completed.

…and IIRC one of these threads allocated about 32MB of memory in the
userspace part of the System process and used it to complete the
request.

Max

Great. Thanks.


Dave Cox
Hewlett-Packard Co.
HPSO/SSMO (Santa Barbara)
https://ecardfile.com/id/Dave+Cox

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, May 10, 2000 4:39 PM
To: NT Developers Interest List
Subject: [ntdev] RE: deferring completion processing

It depends on what type of post processing you are doing and the thread
context. For example, if you defer a read request and intend on accessing
the the buffer and the method is METHOD_NIETHER, you may attempt to access a
buffer located in a process other than the current process (system process
in a system process owned worker thread).

It realy depends on the call and what you intend to do in the completion
routine.

But, yes, you can do what you are indicating. We have written drivers where
the request may be posted off to 3 different worker threads and go though 4
completion routines before the request finally gets completed.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of COX,DAVID
(HP-Roseville,ex1)
Sent: Wednesday, May 10, 2000 3:57 PM
To: NT Developers Interest List
Subject: [ntdev] deferring completion processing

In the Win2000 DDK, the topic:

Setup, Plug & Play, Power Management
2.3 Postponing PnP IRP Processing Until Lower Drivers Finish
Figure 2.3

indicates that if a completion routine returns MORE_PROCESSING_REQ’D,
then the original thread, in which the IRP was sent to the dispatch
routine, can perform some additional processing and then call
IoCompleteRequest() a second time for the same IRP.

My question: does this deferred processing have to happen in the
original dispatch thread; or in my completion routine can I queue a
work item to an arbitrary system thread and complete the IRP a second
time there (having returned pending from the dispatch routine)?


Dave Cox
Hewlett-Packard Co.
HPSO/SSMO (Santa Barbara)
https://ecardfile.com/id/Dave+Cox


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)


You are currently subscribed to ntdev as: david_cox2@hp.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)