News for hackers. Stuff that matters.
Re:ZFSin: A Windows kernel-mode ZFS driver by lundman on Wednesday October 25, 2017 @09:28AM (#15549893)
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.
Re:ZFSin: A Windows kernel-mode ZFS driver by barrkel on Wednesday October 25, 2017 @09:40AM (#15549974)
I'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 ([email protected]) 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.)

Re:ZFSin: A Windows kernel-mode ZFS driver by lundman on Wednesday October 25, 2017 @09:42AM (#15549992)
Ah that looks interesting. I will research that once I leave SF
Re:ZFSin: A Windows kernel-mode ZFS driver by j_s on Wednesday October 25, 2017 @09:57AM (#15550146)
Another expert to contact: Trent Nelson from 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...

² http://twitter.com/trentnelson

Re:ZFSin: A Windows kernel-mode ZFS driver by moonbug22 on Wednesday October 25, 2017 @01:44PM (#15552249)
Hardly needs 'defending'. It's superb.
Re:ZFSin: A Windows kernel-mode ZFS driver by j_s on Wednesday October 25, 2017 @09:11PM (#15555600)
Yes, maybe evangelising would be a better word.
Re:ZFSin: A Windows kernel-mode ZFS driver by lundman on Wednesday November 01, 2017 @11:24PM (#15607592)
Alas, didn't quite work. Turns out DPC's are not allowed to wait, so the first condvar we hit in zio makes us die :)
Re:ZFSin: A Windows kernel-mode ZFS driver by tinus_hn on Wednesday October 25, 2017 @11:10AM (#15550747)
These are called Deferred Procedure Calls, the purpose is not to delay but to run in a more relaxed context.
Re:ZFSin: A Windows kernel-mode ZFS driver by kyberias on Wednesday October 25, 2017 @01:12PM (#15551930)
Yes, 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.