[PATCH] D27295: Remove existing file in a separate thread asynchronously.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 18:47:37 PST 2016


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.


On Dec 7, 2016 6:29 PM, "Rafael Avila de Espindola" <
rafael.espindola at gmail.com> wrote:

Rui Ueyama <ruiu at google.com> writes:


> I agree that that's the right way of doing it in the sense that it
> atomically replaces old file with a new result file. There's no chance
that
> we removed a file but we didn't create a new result. However, I guess that
> wouldn't solve the issue that I was trying to address with this patch.
> Maybe the last rename takes 0.25 seconds?

With your current patch we do a rename before starting the thread, so
maybe the rename is fast?

But I was really surprised by unlink being slow, so we really have to
measure to be sure.

Cheers,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161207/91b901f9/attachment.html>


More information about the llvm-commits mailing list