Re: svn commit: r366697 - head/usr.bin/xinstall

2020-12-28 Thread Alan Somers
BTW, I have a WIP patch to xinstall to make it use copy_file_range. The patch works, but I never wrote a fallback path in case copy_file_range fails for some reason. Alex, would you be interested to finish the patch? -Alan On Wed, Oct 14, 2020 at 7:35 AM Alexander Richardson <

Re: svn commit: r366697 - head/usr.bin/xinstall

2020-10-15 Thread Alexander Richardson
On Thu, 15 Oct 2020 at 06:59, Enji Cooper wrote: > > > > On Oct 14, 2020, at 5:28 AM, Alex Richardson > > wrote: > > > > Author: arichardson > > Date: Wed Oct 14 12:28:41 2020 > > New Revision: 366697 > > URL: https://svnweb.freebsd.org/changeset/base/366697 > > > > Log: > > install(1): Avoid

Re: svn commit: r366697 - head/usr.bin/xinstall

2020-10-14 Thread Enji Cooper
> On Oct 14, 2020, at 5:28 AM, Alex Richardson wrote: > > Author: arichardson > Date: Wed Oct 14 12:28:41 2020 > New Revision: 366697 > URL: https://svnweb.freebsd.org/changeset/base/366697 > > Log: > install(1): Avoid unncessary fstatfs() calls and use mmap() based on size > > According

Re: svn commit: r366697 - head/usr.bin/xinstall

2020-10-14 Thread Brooks Davis
On Wed, Oct 14, 2020 at 02:40:42PM +0100, Jessica Clarke wrote: > On 14 Oct 2020, at 14:28, Mateusz Guzik wrote: > > > > This should use copy_file_range (also available on Linux). > > I assume this is a bootstrap tool and hence the system OS and version > is relevant. macOS does not have

Re: svn commit: r366697 - head/usr.bin/xinstall

2020-10-14 Thread Mateusz Guzik
On 10/14/20, Alexander Richardson wrote: > On Wed, 14 Oct 2020 at 14:29, Mateusz Guzik 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,

Re: svn commit: r366697 - head/usr.bin/xinstall

2020-10-14 Thread Jessica Clarke
On 14 Oct 2020, at 14:28, Mateusz Guzik wrote: > > This should use copy_file_range (also available on Linux). I assume this is a bootstrap tool and hence the system OS and version is relevant. macOS does not have copy_file_range, and FreeBSD only has it in -CURRENT so that would break building

Re: svn commit: r366697 - head/usr.bin/xinstall

2020-10-14 Thread Alexander Richardson
On Wed, 14 Oct 2020 at 14:29, Mateusz Guzik 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

Re: svn commit: r366697 - head/usr.bin/xinstall

2020-10-14 Thread Mateusz Guzik
This should use copy_file_range (also available on Linux). On 10/14/20, Alex Richardson wrote: > Author: arichardson > Date: Wed Oct 14 12:28:41 2020 > New Revision: 366697 > URL: https://svnweb.freebsd.org/changeset/base/366697 > > Log: > install(1): Avoid unncessary fstatfs() calls and use

svn commit: r366697 - head/usr.bin/xinstall

2020-10-14 Thread Alex Richardson
Author: arichardson Date: Wed Oct 14 12:28:41 2020 New Revision: 366697 URL: https://svnweb.freebsd.org/changeset/base/366697 Log: install(1): Avoid unncessary fstatfs() calls and use mmap() based on size According to git blame the trymmap() function was added in 1996 to skip mmap()