From owner-freebsd-current@freebsd.org Mon Jun 10 01:32:43 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5505D15B04B5 for ; Mon, 10 Jun 2019 01:32:43 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660046.outbound.protection.outlook.com [40.107.66.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D7FA8D38E for ; Mon, 10 Jun 2019 01:32:41 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YQXPR01MB3128.CANPRD01.PROD.OUTLOOK.COM (52.132.93.160) by YQXPR01MB3048.CANPRD01.PROD.OUTLOOK.COM (52.132.93.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.14; Mon, 10 Jun 2019 01:32:40 +0000 Received: from YQXPR01MB3128.CANPRD01.PROD.OUTLOOK.COM ([fe80::f9fe:559f:fdc:9e5a]) by YQXPR01MB3128.CANPRD01.PROD.OUTLOOK.COM ([fe80::f9fe:559f:fdc:9e5a%3]) with mapi id 15.20.1965.017; Mon, 10 Jun 2019 01:32:40 +0000 From: Rick Macklem To: "freebsd-current@FreeBSD.org" Subject: patch to add a Linux compatible copy_file_range(2) syscall Thread-Topic: patch to add a Linux compatible copy_file_range(2) syscall Thread-Index: AQHVHyu9o5p1TII5CEeKHWgU+iUSsQ== Date: Mon, 10 Jun 2019 01:32:40 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8dcc6099-10ba-4839-3f58-08d6ed4386fe x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:YQXPR01MB3048; x-ms-traffictypediagnostic: YQXPR01MB3048: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0064B3273C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(396003)(366004)(39850400004)(189003)(199004)(186003)(46003)(478600001)(476003)(55016002)(5640700003)(486006)(6436002)(305945005)(66446008)(64756008)(14454004)(966005)(76116006)(66556008)(66476007)(316002)(786003)(66946007)(53936002)(74482002)(2351001)(73956011)(25786009)(33656002)(2906002)(2501003)(68736007)(8676002)(7696005)(8936002)(81166006)(6506007)(81156014)(102836004)(74316002)(9686003)(99286004)(52536014)(6916009)(5660300002)(256004)(86362001)(71190400001)(71200400001)(6306002)(4744005); DIR:OUT; SFP:1101; SCL:1; SRVR:YQXPR01MB3048; H:YQXPR01MB3128.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: KafOLWQH3tDt6sjWgpBBLigpqO2OkUF9zFCzAJQXvj60F1wXM107YAGKdYs5vsJEaURk7dmBXbARk1+HlUowq4tSjoZEqHyILkVGUlq+aN4I0zXjahkU2xQ0wC7KGZ8P1+/QU4e5F757712Cmb8CwN4kATWSA1hsEGX1VMQmGXQGWlaZo7fog/Gct6n0N88nrJF0Gxa91fNa0oonwXYlzrQjsLlIQLJUpL3E7Rxzyde4o6KB0egj92m4Zf9Bp3DqZ9272iJxzPHxfnKWUPKZ3puCc3oXjcTlWDsjNQUHuIoHROJ5iAdN1tRilEwE3BFSvLPaLoYCg/OvnBNps0BgqOwdpz7GEfB+XUn01ELO7tQ2/ontTOQy3P/WYDd6jTrBd6NGlFWb7t0XBzE4QkclF27qUVXUuEu5rYggQK1rrSo= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 8dcc6099-10ba-4839-3f58-08d6ed4386fe X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jun 2019 01:32:40.2245 (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: rmacklem@uoguelph.ca X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQXPR01MB3048 X-Rspamd-Queue-Id: 0D7FA8D38E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.66.46 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-2.60 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.967,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[uoguelph.ca]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com]; NEURAL_HAM_SHORT(-0.32)[-0.325,0]; RCVD_IN_DNSWL_NONE(0.00)[46.66.107.40.list.dnswl.org : 127.0.3.0]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 01:32:43 -0000 Hi, I just put a patch in phabricator that is intended to add a Linux compatibl= e copy_file_range(2) syscall. My main interest in having this is that NFSv4.2= will know how to do file copying locally on the NFS server, saving all the reads= /writes across the wire. It copies the file byte range in the kernel. I don't know how the performan= ce compares with a userland file copy done to a local file system on the machi= ne. (It would save syscalls, but I have no idea if that will result in a notice= able performance difference?) It is at https://reviews.freebsd.org/D20584 I've listed a few guys as possible reviewers, but if anyone else would like= to review it, feel free to add yourself. If anyone is able to test this, it would be appreciated and let me know how= it goes, rick.