From owner-svn-src-all@freebsd.org Wed Oct 14 14:06:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0DE443A4FF; Wed, 14 Oct 2020 14:06:10 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CBDjG66WHz42g6; Wed, 14 Oct 2020 14:06:10 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x442.google.com with SMTP id g12so3993115wrp.10; Wed, 14 Oct 2020 07:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/zqEBS139gaHawBXFwVSSx6fXcyFU61HS2rFMeN7fh0=; b=Mr+gFdsgniiQUaq7euTJZ/hhm72qkrJkRdr6mp+xsNajFC0ewj1cFbnGaruBBpuBbP q5dNeSIAlrkVPyRmLjwZzbB7v2f1eyoga8llzZbvl+rrwaBrC4NvXmNoMZBWiaRvcSIl loplR9GFPs8Flfhqh7bhVonvtNE7i9sQfYE/WavOAoc/fQMs+uBe1RpFG5vv5/uEBIaZ C0EjmcysEiRID2rkrJreq1Y3NajhlDnB0i+ZBmL4wyQNOEBbV//ABHbsxJpkEm1//XhX rnHIhkvr1XM4crGmekedRqOUC/+XFjf10dUAAF4XZh0jFGeiEA3eZ3KNIci+ayYwJpB3 bgAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/zqEBS139gaHawBXFwVSSx6fXcyFU61HS2rFMeN7fh0=; b=tTOP5Vrpu6yCnECbJymazGyD7l19xZejNr/P4I3XxXLawLckkPzca8URSE//HzybmS QZJ9Bh8CU6EGrR29aNhq+ujDsBnDeQx+Ole2jRvbCWA41E1e9IHfvblJ6WYFlE3NHRe4 ZiOQuyM4SRwwt6DdfKc+YRYnZa9Tda5meoNlsPFNTlLGJzdr3iqRHnwS+wBuhX7/APqE WygiRu1dGlwCDrm/e5+x8zBGq3lyMI+t7d97TNuJBcNv2oJIyqeIazznVBn4F2uHkTKZ 65TZnJMVy20nDkniGFUL1qtp5yTf0Kmfezwq3TiuHha5DrUrAzFbdS7B2nie2cO1yvJQ bCLA== X-Gm-Message-State: AOAM530rVL3wXfQEj8ys4ezYKjMe524SaQ1B+kz08v2iWEg5JUhzysTZ SEBmk0RWhdMdKcfgKsbtGzTQDEQALzc5sCBzZgsnEnGtbJU= X-Google-Smtp-Source: ABdhPJzhyYJ12AWN+q5T4H7FmiCw84Qk8sAFzC7Ejzpw+uhWsp4IhfdWDp6pvMpAgH8SsBKZGJpOUqkkpyLo4nOJ1/E= X-Received: by 2002:a5d:4cd1:: with SMTP id c17mr5837081wrt.109.1602684368528; Wed, 14 Oct 2020 07:06:08 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:c448:0:0:0:0:0 with HTTP; Wed, 14 Oct 2020 07:06:07 -0700 (PDT) In-Reply-To: References: <202010141228.09ECSg0D023438@repo.freebsd.org> From: Mateusz Guzik Date: Wed, 14 Oct 2020 16:06:07 +0200 Message-ID: Subject: Re: svn commit: r366697 - head/usr.bin/xinstall To: Alexander Richardson Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CBDjG66WHz42g6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2020 14:06:11 -0000 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, 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