logoalt Hacker News

touisteuryesterday at 9:37 PM1 replyview on HN

I have a reproducible way to have a pwrite syscall on a specific SSD on a specific machine take 15+ seconds and completely block any syscall related to that SSD by any other thread or core during that amount of time. I tried and couldn't preempt it either (sched_fifo and preempt kernel options). I should have a look soon with Intel PT to check whether it's on the same instruction every time :)


Replies

inigyoutoday at 12:31 PM

Won't be the same instruction. It'll be waiting for a hardware interrupt without properly preparing to handle signals at the same time because someone assumed it was fast. Kernel code isn't held together with any less duct tape than user code, although we hope it crashes less.

In Linux, any thread running in the kernel is unkillable unless that section of kernel code made arrangements to be killable. When kernel code blocks, you can get unkillable processes. They show as D state (uninterruptible wait).