[PATCH] D34917: ELF: Only unlink regular files

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 18:24:01 PDT 2017


On Fri, Jun 30, 2017 at 5:39 PM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> Rafael Avila de Espindola <rafael.espindola at gmail.com> writes:
>
> > LGTM
> >
> > FileOutputBuffer has something similar, so this is all that we have to
> > do.
> >
> > It is a pity that we have to unlink at all. I will do a quick benchmark
> > to see if rename without unlink is still slow.
>
> There doesn't seem to be any way of avoiding the cost.
>
> What I tried was
>
> * Renaming without unlink: the rename is slow.
> * Opening the file. This makes rename/unlink fast, but close is slow.
> * Not calling close, the process exit is slow.
>

That was my observation too. This is an ugly hack, but there seems to be no
way to circumvent the performance issue of the kernel filesystem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170630/a1a1d592/attachment.html>


More information about the llvm-commits mailing list