Date: Wed, 14 Oct 2020 16:06:07 +0200 From: Mateusz Guzik <mjguzik@gmail.com> To: Alexander Richardson <arichardson@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r366697 - head/usr.bin/xinstall Message-ID: <CAGudoHFVN4=cLpeibFc%2BZV8SsjNApTbPC6akWp2qr0vYCDG_3g@mail.gmail.com> In-Reply-To: <CA%2BZ_v8pvRrmwTdfBr2PbZoOCkNi78MsxpWvnmXHGgW1KQCnSBw@mail.gmail.com> References: <202010141228.09ECSg0D023438@repo.freebsd.org> <CAGudoHE=4NxWKh1OfvNy_y4pBBcR4p=rL%2BQs5-GERzuW4WECjg@mail.gmail.com> <CA%2BZ_v8pvRrmwTdfBr2PbZoOCkNi78MsxpWvnmXHGgW1KQCnSBw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/14/20, Alexander Richardson <arichardson@freebsd.org> wrote: > On Wed, 14 Oct 2020 at 14:29, Mateusz Guzik <mjguzik@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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHFVN4=cLpeibFc%2BZV8SsjNApTbPC6akWp2qr0vYCDG_3g>