<div dir="auto">Renaming onto an existing file may be different than renaming to a fresh nonexistent name because in the former case kernel needs to (atomically) remove the old file.<div><br><div class="gmail_extra"><br><div class="gmail_quote">On Dec 7, 2016 6:29 PM, "Rafael Avila de Espindola" <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> writes:<br>
<br>
<br>
> I agree that that's the right way of doing it in the sense that it<br>
> atomically replaces old file with a new result file. There's no chance that<br>
> we removed a file but we didn't create a new result. However, I guess that<br>
> wouldn't solve the issue that I was trying to address with this patch.<br>
> Maybe the last rename takes 0.25 seconds?<br>
<br>
</div>With your current patch we do a rename before starting the thread, so<br>
maybe the rename is fast?<br>
<br>
But I was really surprised by unlink being slow, so we really have to<br>
measure to be sure.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div></div></div>