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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 10 14:43:00 PST 2016


Rui Ueyama <ruiu at google.com> writes:

> 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.

Yes, it looks like the cost shows up when the last reference to a file goes
away, since the call only returns once the data is freed.

It would still be interesting to benchmark things like open(), unlink()
/*should be fast*/, close(). Maybe the close is fast. Maybe just the
close needs to be in another thread.

Also, windows does async delete, so it should not need the thread.

Cheers,
Rafael


More information about the llvm-commits mailing list