From nobody Tue Aug 30 15:41:59 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MHBPj2V6dz4Zky5; Tue, 30 Aug 2022 15:42:01 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-YQB-obe.outbound.protection.outlook.com (mail-yqbcan01on2071.outbound.protection.outlook.com [40.107.116.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MHBPj1nkhz40SH; Tue, 30 Aug 2022 15:42:01 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CGo6ucDEgiq15JLH/5ZEyxKWBzMADBToK2KrQU1u535bgrrjZBSkzagBprpVl8vQ1a78UNg7JhpqYXwmWZPHxIr+ZCIrIxpCpyIJENlk+Ez6lLydW5htMDWexXWKJdKjHu+wEtgxmYiGH2woNAWhmxjmZ42uojtekcQ1zOeDZbW8t31nPcPvupjO4d846Qc9o6icnSM7UW/iSuAR4BVdwhEHAj0o+K6wH6sAc5RQljN0lmx58q4/r5H42PaPnEJCdUiRyFmgcLpSKAQYEBk2rxknzbAHwTq/xM9P8N8afBTfJVAe+7+pAIkfN72E/08WNI2MqfHeJd37TUYGamUgpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gRZ6jGor2LX8PhBb0mUW9csXjEloczcF95ZzEIjff0Y=; b=SIBj5Ak2Shc1NjSfIuGQ7grB56cVSKTDb0kCp3yoLpFJGo0V9trzlRcYf/UNKU7BE827ab9VOESKMms47SP2u3fWZUj++4c1QKIFH4mGMmEnOn2PGmNo39pdH//Q9/PfkPRHSdx8rh8/4Ys5XEJP0mkOzEOnxreaISo7tum/OiCxV5MlzKiHhu5PLH5xcEaKLh6gtZIS9mUh7MtxMUeXxh5Gh5LNjdxog0wDKxOmwjQy7guQisRbRHlBYH56o9nI7hysI45of2P4i3fk88Ez76iBp3NT+MBh5m8Y0fWEMKgEICelssM9zOn4/tTo5ct+mP00huLUEwik7pyvrAZ2qA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gRZ6jGor2LX8PhBb0mUW9csXjEloczcF95ZzEIjff0Y=; b=apM6uEATfg21f34GuOZK/gLpeZjMV6gspNmDrhvyrvlq6MRs1sZmE9igKbdtD8g3TkAOHhq2mwYMVChbxB3A0Qiapl0DZNJLd4L4Yvu4w7dDsRBp9b2BIswgMwzI5QDtvtlrn/0yPLPOwI79EdvfgPz4+B30w++vkPbqT8GChmB0/yTK2+HwpVgvy7Qa1fwqzmu2Qj3qo5DY3wfC5FsPMq+iG6FuwkAvSYbkvEHLLmAY6hV7+k1yv/3NCuQ99YPM5G9A9bgDbme+X2OJa7KcPjLctWxsryQtTMSAPHkXv6Aml9OXISMuxf0HQc4xmTZmta/b9mDwUTmwVSFa0ueMFQ== Received: from YQXPR01MB4150.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:6::7) by YT3PR01MB8420.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:79::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Tue, 30 Aug 2022 15:41:59 +0000 Received: from YQXPR01MB4150.CANPRD01.PROD.OUTLOOK.COM ([fe80::980d:23ea:9bc2:9f37]) by YQXPR01MB4150.CANPRD01.PROD.OUTLOOK.COM ([fe80::980d:23ea:9bc2:9f37%9]) with mapi id 15.20.5588.010; Tue, 30 Aug 2022 15:41:59 +0000 From: Rick Macklem To: Mateusz Guzik , Alexander Motin , Alan Somers CC: "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" Subject: Re: git: 35b7759c05cb - main - cp: Fix build without VM_AND_BUFFER_CACHE_SYNCHRONIZED. Thread-Topic: git: 35b7759c05cb - main - cp: Fix build without VM_AND_BUFFER_CACHE_SYNCHRONIZED. Thread-Index: AQHYvIBVkyWh0RTCA02Oxy3neY+KA63HiPSAgAAATzyAAAGdAIAAAt+AgAAEvT0= Date: Tue, 30 Aug 2022 15:41:59 +0000 Message-ID: References: <202208301453.27UEroGr037461@gitrepo.freebsd.org> <837f27fc-97b0-6e71-50c0-12b8799e574d@FreeBSD.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f2fdc760-3c7e-4366-e70d-08da8a9e2d37 x-ms-traffictypediagnostic: YT3PR01MB8420:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sql/RBrEH8HBO6FmvujCy2gxNi+ajrIJp6Ps5nKDjvR/YTWUp57Nutq9yw6BNJnWcMxcqnw3AGh7X5MUtIcxHSjRXYujsAIrigtU/rbQn+W90BWT9tnrFIMppSwQ0eck758QnpjokipyqxwQmBDXbIv/AkP2STOgip/aKGrG9tCpNqI7T1z7D2iFkBwzJ2Zz3WAJ9dE/ehkxT9H9fwBeV6+JfzRc87wLxTXnecmrN6X9DRBfpmvMi7gRzzEEO1LXf5GCgZQrby14uJOc9Q9kWUGts9m1fUQ9kzJOFNU4H8dcUfEeSC1TjiMnfYxYuvxZubwtx1Glsg71z6WzXDjrJokUYC7iHwdprW2JcWKDf5OGhJOrj6Zv8iLo4gUqFaKd4FPscpVGoynaIjzWo+J/5NrAt04ath4ZWfUhvHk9fg/W6QXOZbK69nPOSeuWEhnhWr0ZnJxIkRfcdRm7tVs7nDs95LGMsbA/iHVv0rB7LkRlq/RpQ4ut2U1Sez0Ouu7tLTuAmvzlQ4gKW23N5HEUxdBRMdBI2+WuuYdzADYbwLvLDEX/9d31qG1GaiZfbeWbINHw4ZqZMryxjpCjtxnCjaLA1MOoj/QvkxGuOkPFpLfFgC+/Wi8KpSxr/dWCBJeE75/7G3VfpfLd8Okmx66ZxuzUXRoB+NCRU54tnlBcqEntWG5w01uB69q2+C5GQcyCP6/vwXFmqkILB9f6GEaeDtosfMPnrhJj5p+rJleYPSKUi1GcWzqzNsvEgYT7UPzF/dcXBW+1H+G7nxVpMWCYtvpO4R+f+k053xfv+LKfCZ4= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:YQXPR01MB4150.CANPRD01.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230016)(4636009)(376002)(39860400002)(136003)(366004)(346002)(396003)(9686003)(53546011)(86362001)(71200400001)(478600001)(966005)(55016003)(7696005)(6506007)(41300700001)(38100700002)(186003)(122000001)(38070700005)(83380400001)(66476007)(41320700001)(66446008)(54906003)(5660300002)(66556008)(66946007)(110136005)(8936002)(52536014)(64756008)(4326008)(8676002)(2906002)(786003)(316002)(91956017)(33656002)(76116006);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?NsHAiuQvQNPQmAp5qOxKcL7JUn2S8VJdB2hb0ouD5Y7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UJfvBN1vMGDTXdhYHe0/hpk2WozJRd++hqkV+JJpm7ZAXE8gccH69Qlh?= =?iso-8859-1?Q?g39wkuPt5vCt5KTCsx+cEvHn4lBlfk9vl1gK0CP0uXDoH5/uWJ5HzC7M7G?= =?iso-8859-1?Q?rsyx3IO5ozdPGUt2erx1iQvFXg2OZhLBXyKQ+LFOJ8teA55BVlvVMubn5E?= =?iso-8859-1?Q?Da/Nzc/u5R/VpPb7FdRxde9HW8+JjJrpiXrazW8i7Xz788OhHM9Tl2wMQg?= =?iso-8859-1?Q?OtV2uGJ0MVoqgLRLO8seN7ywEI7aa31KT14Q8tBdCaWw+hOe6nfu0RN5Pc?= =?iso-8859-1?Q?u6A1oa1UiOg9QGhLuSqh/jgcaTWPUfLttadn2VXADKY8z5U68Rlf6ldWSV?= =?iso-8859-1?Q?lwFEHdgQRF84hTId54KaO8z+P/W8TMWyHj8W7lufEF6BuusUyylV8wAcVO?= =?iso-8859-1?Q?hnujirCCbRJi6L/LvW9kV/TQYTKAynIuuPwbz9BQC7HkywRvcNeK+wx0cI?= =?iso-8859-1?Q?bslBZXSKoHeTvKcYaDMwEEdh+Jm8xqu/MPq+gGwB5knk4rlkIFShxXvzMW?= =?iso-8859-1?Q?C3GkpSojznDBhwWC6iJ4t3YXit1MuRmAGUMQ/7InPTk2FuMarcg5kN+Sw0?= =?iso-8859-1?Q?VpQB15o2AJJw1Bh4+kVkVPBbEALqHjLt1YkxR8WdZJ6q4+vqrGlojWOFJT?= =?iso-8859-1?Q?lph3GIpUmqXAd7lzm3NBMGwdqF9/xmRXE9kmROADqDDkgNbZR7mraUdiB+?= =?iso-8859-1?Q?EtmKgDUKeoAO0MqDqD4x5qus8lPHPgCQP9K3KtQVMjp+yJK3m717bEm7S0?= =?iso-8859-1?Q?vti6XwDb1Uc6zTeb3GmNG6gUBb5tpdWDfq1Clc2Q?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YQXPR01MB4150.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: f2fdc760-3c7e-4366-e70d-08da8a9e2d37 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2022 15:41:59.4139 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LP8d0koXb7uFOxlxIplda0Mtj6HAFWMZx1yBp0ROSpISfgcOrH7gRuhmyrzryJIdslNP9AJyQfBlMkb8Mf4K0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YT3PR01MB8420 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4MHBPj1nkhz40SH X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Mateusz Guzik wrote:=0A= > On 8/30/22, Alexander Motin wrote:=0A= >> On 30.08.2022 11:02, Rick Macklem wrote:=0A= >>> Mateusz Guzik wrote:=0A= >>>> On 8/30/22, Alexander Motin wrote:=0A= >>>>> The branch main has been updated by mav:=0A= >>>>>=0A= >>>>> URL:=0A= >>>>> https://cgit.FreeBSD.org/src/commit/?id=3D35b7759c05cbc65c06d87141da7= 9f0f80af0f458=0A= >>>>>=0A= >>>>> commit 35b7759c05cbc65c06d87141da79f0f80af0f458=0A= >>>>> Author: Alexander Motin =0A= >>>>> AuthorDate: 2022-08-30 14:51:21 +0000=0A= >>>>> Commit: Alexander Motin =0A= >>>>> CommitDate: 2022-08-30 14:51:21 +0000=0A= >>>>>=0A= >>>>> cp: Fix build without VM_AND_BUFFER_CACHE_SYNCHRONIZED.=0A= >>>>>=0A= >>>>> It allows to not use mmap() for small files, which is not helpfu= l=0A= >>>>> in case of ZFS. Should be no functional change.=0A= >>>>>=0A= >>>>=0A= >>>> This should be of no use thanks to copy_file_range=0A= >>> cp does not use copy_file_range(2) for small files, if I recall=0A= >>> correctly.=0A= >>=0A= >> Right. I tried to look for motivation, but history of this file goes=0A= >> back to 4.4 Lite. :) I wonder whether copy_file_range(2) for UFS does= =0A= >> something clever, like this mmap() to avoid additional memory copy.=0A= It does not at this time. Unless both files are on the same file system and= =0A= the file system provides a custom VOP_COPY_FILE_RANGE() { only NFS has=0A= one at this time }, it simply uses vn_rdwr() to do the file system I/O.=0A= =0A= A custom VOP_COPY_FILE_RANGE() can be implemented for file systems,=0A= if there is a better way for that file system.=0A= =0A= >> For=0A= >> ZFS though it cause big problem with buffer cache squeezing ARC to=0A= >> absolute minimum. So if there is agreement to modernize this, I'd=0A= >> completely support it.=0A= >>=0A= >> --=0A= >> Alexander Motin=0A= >>=0A= >=0A= >The way I see it userspace cannot do it any faster.=0A= >=0A= >Especially with the zfs considerations it makes sense to straight up=0A= >copy_file_range if you can and let the kernel figure out what to do in=0A= >a sensible manner. Thought I have no idea if zfs is currently handled=0A= >in such a way. Someone(tm) should look into it.=0A= I've added asomers@, since he did the commit to cp so that=0A= it used copy_file_range(2) and left it doing small files using mmap(2).=0A= =0A= rick=0A= =0A= --=0A= Mateusz Guzik =0A=