Hi All!
I’m inquiring is there any simple way to disable the
file caching, at least the lazy write and read ahead
to a drive, in an NT4 workstation system?
I’ve tried to write a kind of virtual device (disk)
driver and sometime there is necessary about
some 10 second time to lookup information in a
database before my driver can complete the arrived
RW irps. During this time it’s stores the packets on
a private queue. But sometimes the system io somehow
stops (every file io in the system not only that
belongs to my driver).
I think the reason, there are too much uncompleted
pending read and write requests and the file system
driver maybe the lazy write / read ahead working
threads not able to finish their works and become
“busy”.
I have no knowledge about this part of the system
so it’s just a theory, maybe I 'm wrong so what can
be the solution or how can I tell the file system,
handle all request from the user applications to this
“virtual” drive without using the system cache?
regards:
Tim
sorry for the mistakes, I’m not a native English
speaker.
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
How are you queueing the IRPS?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Hakkano
Sent: Tuesday, August 07, 2001 2:33 PM
To: NT Developers Interest List
Subject: [ntdev] How possible disable file caching?
Hi All!
I’m inquiring is there any simple way to disable the
file caching, at least the lazy write and read ahead
to a drive, in an NT4 workstation system?
I’ve tried to write a kind of virtual device (disk)
driver and sometime there is necessary about
some 10 second time to lookup information in a
database before my driver can complete the arrived
RW irps. During this time it’s stores the packets on
a private queue. But sometimes the system io somehow
stops (every file io in the system not only that
belongs to my driver).
I think the reason, there are too much uncompleted
pending read and write requests and the file system
driver maybe the lazy write / read ahead working
threads not able to finish their works and become
“busy”.
I have no knowledge about this part of the system
so it’s just a theory, maybe I 'm wrong so what can
be the solution or how can I tell the file system,
handle all request from the user applications to this
“virtual” drive without using the system cache?
regards:
Tim
sorry for the mistakes, I’m not a native English
speaker.
Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
You are currently
subscribed to ntdev as: xxxxx@storagecraft.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>How are you queuing the IRPS?
By the standard way I think
There is a LIST_ENTRY field
(the “private” queue) in the device extension structure and
the spinlock of course. In my read and write dispatch:
:
IoMarkIrpPending(Irp);
:
ExInterlockedInsertTailList( &devExt->List … )
:
KeSetEvent( &threadEvent… ) // notify the “processing” thread
:
return STATUS_PENDING;
The “processing” part is a thread created with PsCreateSystemThread(),
checks this queue (waits for threadEvent ) asks a user mode service
for the completion data (this sometimes takes 10-30 seconds) then completes
the irp:
while(…) {
KeWaitForSingleObject( &threadEvent, … )
while(
listEntry = ExInterlockedRemoveHeadList(&devExt->List …) ) {
irp = CONTAINING_RECORD(… );
irpStack = IoGetCurrentIrpStackLocation(irp);
// user service notification etc…
// irp completion with user service datas
}
Tim
>-----Original Message-----
>From: xxxxx@lists.osr.com
>[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Hakkano
>Sent: Tuesday, August 07, 2001 2:33 PM
>To: NT Developers Interest List
>Subject: [ntdev] How possible disable file caching?
>
>
>Hi All!
>
>I’m inquiring is there any simple way to disable the
>file caching, at least the lazy write and read ahead
>to a drive, in an NT4 workstation system?
>
>I’ve tried to write a kind of virtual device (disk)
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> By the standard way I think
There is a LIST_ENTRY field
(the “private” queue) in the device extension structure and
the spinlock of course. In my read and write dispatch:
:
IoMarkIrpPending(Irp);
:
ExInterlockedInsertTailList( &devExt->List … )
:
KeSetEvent( &threadEvent… ) // notify the “processing” thread
:
return STATUS_PENDING;
The “processing” part is a thread created with PsCreateSystemThread(),
checks this queue (waits for threadEvent ) asks a user mode service
Can you examine your KeSetEvent logic to be free from races?
A race there would result in queue not empty but event is reset. In this
case, you will have a hang.
Looks like this is your problem since in occurs rarely.
Break in the hung system by the debugger and examine your event state and
list state.
Max
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com