Re: sys_write() racy for multi-threaded append?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Benjamin LaHaise
Date: Thursday, March 8, 2007 - 6:34 pm

> Actually, I think it would make the kernel (negligibly) faster to bump

Any number of things can cause a short write to occur, and rewinding the 
file position after the fact is just as bad.  A sane app has to either 
serialise the writes itself or use a thread safe API like pwrite().

		-ben
-- 
"Time is of no importance, Mr. President, only life is important."
Don't Email: <zyntrop@kvack.org>.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sys_write() racy for multi-threaded append?, Michael K. Edwards, (Thu Mar 8, 4:08 pm)
Re: sys_write() racy for multi-threaded append?, Eric Dumazet, (Thu Mar 8, 4:43 pm)
Re: sys_write() racy for multi-threaded append?, Michael K. Edwards, (Thu Mar 8, 4:57 pm)
Re: sys_write() racy for multi-threaded append?, Eric Dumazet, (Thu Mar 8, 5:15 pm)
Re: sys_write() racy for multi-threaded append?, Alan Cox, (Thu Mar 8, 5:43 pm)
Re: sys_write() racy for multi-threaded append?, Michael K. Edwards, (Thu Mar 8, 5:45 pm)
Re: sys_write() racy for multi-threaded append?, Benjamin LaHaise, (Thu Mar 8, 6:34 pm)
Re: sys_write() racy for multi-threaded append?, Eric Dumazet, (Thu Mar 8, 10:53 pm)
Re: sys_write() racy for multi-threaded append?, Michael K. Edwards, (Fri Mar 9, 4:52 am)
Re: sys_write() racy for multi-threaded append?, Michael K. Edwards, (Fri Mar 9, 5:19 am)
Re: sys_write() racy for multi-threaded append?, Eric Dumazet, (Fri Mar 9, 6:44 am)
Re: sys_write() racy for multi-threaded append?, Alan Cox, (Fri Mar 9, 7:10 am)
Re: sys_write() racy for multi-threaded append?, Benjamin LaHaise, (Fri Mar 9, 7:59 am)
Re: sys_write() racy for multi-threaded append?, Michael K. Edwards, (Fri Mar 9, 11:43 pm)