4 ms·
I tried that way first, but because it called the callback at different level, and ZFS grabs a mutex, it just died. Which why I changed it to spawn a taskq to w
by lundman 9y ago
I tried that way first, but because it called the callback at different level, and ZFS grabs a mutex, it just died. Which why I changed it to spawn a taskq to wait for the callback to come back, then tell ZFS about it. So it is async right now, I'm just not happy it has to create yet another taskq to handle it, for each IO request.
- barrkel 9y agoI'm far from expert at NT kernel programming, but I do know that there's not much you can do in the callbacks from interrupts, which is why you use a deferred procedure call (using Io/ExQueueWorkItem) to continue at a level where you can do more things, like potentially blocking calls. The work item execution of the DPC proceeds on a system worker thread, rather than a thread you had to spawn yourself. But perhaps that's what you did. If you're still stuck, I suggest you email Larry Osterman (Firstname.Lastname@microsoft.com) for a clue; Larry has worked on the NTFS driver and he's responded to my emails in the past. For an improved probability of a useful response, I'd send him a link to a Stack Overflow question, so that other people benefit from the reply also. (This is a general rule for emailing people for developer help, you'd be surprised how many random people email system / compiler developers for coding assistance.)
- lundman 9y agoAh that looks interesting. I will research that once I leave SF
- j_s 9y agoAnother expert to contact: Trent Nelson from http://pyparallel.org/ http://pyparallel.org/ a few years back. He pops up here occasionally to defend Windows unique I/O subsystem¹, and monitors Twitter². ¹ https://hn.algolia.com/?query=author:trentnelson&sort=byDate&type=comment https://hn.algolia.com/?query=author:trentnelson&sort=byDate... ² http://twitter.com/trentnelson http://twitter.com/trentnelson
- lundman 9y agoAlas, didn't quite work. Turns out DPC's are not allowed to wait, so the first condvar we hit in zio makes us die :)
- tinus_hn 9y agoThese are called Deferred Procedure Calls, the purpose is not to delay but to run in a more relaxed context.
- kyberias 9y agoYes, but I'm pretty sure in the past they have also been called Delayed Function Calls in Microsoft documentation. It doesn't change the semantics, of course. Same goes for the old Symbian OS.