Have you considered having the app issue several asynchronous reads at a
time the data that’s coming up the pipe? If you have the app post
enough buffers you could get the data back to it very quickly without
running dry.
Then you just drop any data that comes in when there’s no pending buffer
rather than hanging 1394.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
Sent: Wednesday, December 20, 2006 1:23 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] ObReferenceObjectByHandle - does it stop object
being paged out?
Hi Dan, Sorry, my misreading of your post - it was the end of a long day
yesterday at this end!
Everyone’s input has helped confirm that a paged out event object is not
the
problem. I just happened to isolate that if I skipped the KeSetEvent()
in
this callback everything works (except of course the app does not see
the
event).
Not clear at the moment why the app responding to the event stops the
isoch
callbacks as it is quite a different thread mostly signalling the user
that
an event has occurred.
My money’s on some delay in KeSetEvent() that is enough to stop further
callbacks (as if a callback is not complete in time for the next it
invariably hangs the 1394 bus driver callback system). I try deferring
the
KeSetEvent().
----- Original Message -----
From: Dan Kyler
To: Windows System Software Devs Interest List
Sent: Tuesday, December 19, 2006 6:27 PM
Subject: RE: [ntdev] ObReferenceObjectByHandle - does it stop object
being
paged out?
I’ll try to be clearer…
A KEVENT object cannot be paged out. That is not your problem.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
Sent: Tuesday, December 19, 2006 11:06 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] ObReferenceObjectByHandle - does it stop object
being
paged out?
Thanks - this is based on Oney’s example for signalling the app but it
is
not clear enough that the KeSetEvent will need to be called at
PASSIVE_LEVEL
only in case the event object is paged out.
Interestingly, the event is actually getting signalled - it’s just that
after this the callback stops happening! Before massively reorganising
the
code I’m trying to work out if this is really what the problem is likely
to
be or it it’s just a blind alley for example, does anyone know what
KeSetEvent() is supposed to do if the object is paged out and it is
called
at DISPATCH_LEVEL? I’d have expected a BSOD…
Thanks, Mike
----- Original Message -----
From: Dan Kyler
To: Windows System Software Devs Interest List
Sent: Tuesday, December 19, 2006 5:25 PM
Subject: RE: [ntdev] ObReferenceObjectByHandle - does it stop object
being
paged out?
ObReferenceObjectByHandle gets me a kernel mode handle to the user mode
event
No, it does not. It gives you a pointer to a kernel mode dispatcher
object,
which just happens to have been created by a call from user mode.
Dispatcher objects (e.g. KEVENTs) are required to be nonpaged. If the
event
was created by a Win32 CreateEvent call, you can bet that it is properly
allocated from nonpaged pool.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mike Kemp
Sent: Tuesday, December 19, 2006 10:13 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] ObReferenceObjectByHandle - does it stop object being
paged
out?
Hi, I’m using ObReferenceObjectByHandle() to access a user mode event
that
is passed into my driver so I can signal an event.
ntStatus = ObReferenceObjectByHandle(hEvent, EVENT_MODIFY_STATE,
*ExEventObjectType, Irp->RequestorMode, (PVOID*) &pkNotifyAppEvent,
NULL);
…(checking okay here, then)
pDeviceExtension->pNotifyAppEvent = pkNotifyAppEvent;
so that later in a callback handler in the driver I can tell the user
that
something has happened
KeSetEvent(pDeviceExtension->pNotifyAppEvent, EVENT_INCREMENT, FALSE);
My problem is that this seems to work okay until I make the system a bit
busier by increasing data throughput. I don’t get a crash, mainly the
callbacks stop - I’m still investigating.
However I wonder if someone can answer a question for me.
ObReferenceObjectByHandle gets me a kernel mode handle to the user mode
event, and guarantees that the object is not going to be deleted. But
does
it lock it in memory? If not my problem is probably that the callback at
DISPATCH_LEVEL is finding that the event is paged out and that’s it.
Thanks, Mike
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer