Straw man of user space unable to cope with errors
Straw man of user space unable to cope with errors
Posted Mar 11, 2015 9:57 UTC (Wed) by andresfreund (subscriber, #69562)In reply to: Straw man of user space unable to cope with errors by iq-0
Parent article: Allowing small allocations to fail
I don't find that convincing. With EINTR you know that retrying makes sense, and it's easy enough to get them during normal testing. Note that EINTR was already annoying enough to many people , so that SA_RESTART has been introduced.
This would essentially mean that you need to wrap every syscall in a retry loop. But you need to have smarts about how these retry loops look, because ENOMEM *does* have other meanings than 'kernel internal memory allocation failed'. E.g. shmget() will return ENOMEM on some platforms if you exceed configured limits.
So realistically what will happen is that userspace programs will just exit with an error.
> And the most critical applications (like database, webservers and the like) are cross platform. So they're pretty likely to have proper handling of ENOMEM because I don't think many other systems made the decision to handle scarce resource allocation in the most difficult place cope with such problems
I don't think that's the case for many syscalls.