Messages in this thread | | | Subject | Re: PROBLEM: pthread-safety bug in write(2) on Linux 2.6.x | From | Alan Cox <> | Date | Fri, 14 Apr 2006 00:05:49 +0100 |
| |
On Iau, 2006-04-13 at 15:40 -0700, Linus Torvalds wrote: > > Outside of O_APPEND the specification says only that > > - The write starts at the file position > > - The file position is updated before the syscall returns > > > > It makes no other guarantee I can see. > > Right. I think this is purely a "quality of implementation" issue. We > already follow the spec, the question is whether we want to be better than > that.
Quality for whom ? There is a measurable cost to all that extra locking which will hurt everyone. Given existing kernels don't make the guarantee and SuS v3 does not make the guarantee the apps that need it will continue to do the extra work themselves anyway.
I'd say the existing approach is the best quality of implementation for those needing performance and that the cost for those needing ordering guarantees in Linux is already astoundingly low thanks to the excellent work done on futex based posix locking in glibc. I can choose to pay the costs today, if we do extra locking I cannot opt out.
And of course I too would like to know if anyone is hitting O_APPEND examples of this problem and if so on what fs ....
Alan
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |