News for hackers. Stuff that matters.
Re:Unix System Call Timeouts by klodolph on Sunday March 12, 2017 @11:47PM (#13855087)
I'd like to point out here that the basic Unix assumption is that we don't care about blocking on local disk. So mkdir() should not have a timeout because it should always be fast enough not to need it. Yes, that's not true, local disk can be very slow, and there's NFS and FUSE, but it's the assumption Unix is built on.

Have you ever had a process waiting for disk that you couldn't kill? Like running "ls" in a big directory, which hangs, and you pound ^C over and over again in vain? That's this same assumption at work here. It's the difference between D and S states on Linux. So if you want timeouts on mkdir(), what you really want is a complete reengineering of the Unix system with the philosophy that local disk IO is interruptible.

Re:Unix System Call Timeouts by kosinus on Monday March 13, 2017 @03:05AM (#13855787)
Pretty much, yes. I think that assumption turned bad a really long time ago?

Interruptible sounds like a very strong requirement. Just being able to wait for the result sanely is enough, I think. A process may then decide to lose interest halfway, but having the result be undefined and fds invalid is just fine, from what I've seen in e.g. node.js/libuv.

Re:Unix System Call Timeouts by microcolonel on Monday March 13, 2017 @11:11AM (#13858427)
Keep in mind that local storage is getting lower latency year over year. NVMe was a big step, but there could soon be more hardware memory mapped flash storage (like DIMM SSDs), and 3D XPoint. I think the overhead will soon exceed the operation in terms of cost, especially if it's asynchronous.
Re:Unix System Call Timeouts by vidarh on Monday March 13, 2017 @11:18AM (#13858498)
That assumes uncontended access.