On 10/14/20, Alexander Richardson <arichard...@freebsd.org> wrote:
> On Wed, 14 Oct 2020 at 14:29, Mateusz Guzik <mjgu...@gmail.com> wrote:
>>
>> This should use copy_file_range (also available on Linux).
>>
>
> I agree. I even mentioned this in
> https://reviews.freebsd.org/D26041#589287.
> This change avoids the two unnecessary syscalls, but I agree that
> longer-term install should share the copy_file_range code with cp.
> The only thing that copy_file_range won't speed up is the check
> whether source and target are already identical.
>

So did a quick check with make install in bin/cp:

install  -s -o root -g wheel -m 555   cp /zoo/lynx4/bin/cp
install  -o root -g wheel -m 444  cp.debug /zoo/lynx4/usr/lib/debug/bin/cp.debug
install  -o root -g wheel -m 444 cp.1.gz  /zoo/lynx4/usr/share/man/man1/

None of these result in calling the compare routine.

Looking at truss output it seems the biggest win for these files would
be to avoid root:wheel translation.

-- 
Mateusz Guzik <mjguzik gmail.com>
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to