From nobody Tue Aug 30 15:15:45 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 4MH9qR2ttJz4ZhkT; Tue, 30 Aug 2022 15:15:47 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MH9qR2CQ3z3wd0; Tue, 30 Aug 2022 15:15:47 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lf1-x135.google.com with SMTP id br21so10210410lfb.0; Tue, 30 Aug 2022 08:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc; bh=V+h4TOhaidqEcg/2bqSeGT4Wthpsu8QiPbXtHDmwXvU=; b=j4Q3pVmElEhn9ZpvxT25CcQjl7gEH81koMoCTewivHsORZPC6vtiTOnO6eP585oM1U yJJmFLewsxny+dNp9c4k860bObIpJFBpQ7MGmTZtlm41eKGwezDIx3Pb8hYuiu2KrMJJ aMDfEIBCBj2gm/Lu2u+8a7T8DYt5I8MiUGhO17smeyu+tiWZGByTBsPUeMpeBN9HaLrq 0CwKhAMUiV9HXsr6bNW7jqmpuiuIQgOBvDAhTwPbnmZANVZSNc0hieFwwgn/51d6Wuxa xQ5FXEKH3bXMa9782SLt+lb9YeXIFbpbNzLNtqbuWKRQTakyXWxWUxOxEl86cgZCmVLP frTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc; bh=V+h4TOhaidqEcg/2bqSeGT4Wthpsu8QiPbXtHDmwXvU=; b=ZgmElDu5oXfFBOEJklcvddTUiBpVgH1DYgNNLxmS3MJKGetE3hiHZfxL0a60G4Zhgb TAz1uTqy74y8Iqg6G6K0k9l857tqCBXnJiIix5gQ2YcJKLUIxI++QH3z5yFnUD0kKgJb 9x04Nsi/WhOAPl3TLNx1lvmjMbhUhQKkZW6Xc5La4TR+yy7tZdiB8NP06fXl0OXCw7sG AVkISLQma2THH8Aq0/WTVy7z2ZaFzFhGOqtWzxbHOC4dxZBZ4PUn6YkzjD3aLdSeboJq oAggZUhSh3RDrB7mfFxpUPYpB1gb5OB2kdNWyegUK2mEmkLm3wypM0yWAWhSog+HKjAS 5gnw== X-Gm-Message-State: ACgBeo2QoojBrqXTw0EryQTmtyf13ex1lu93+D+EH7ODcM7zUIxvLKSq J1Z8oi6nFdbahdncd8EyOoWipVWYG4hjmo7iXFwfpDyW X-Google-Smtp-Source: AA6agR4IlwzdFcbG3PgmZ+GXTamWBLijo1U7zuRva5XFP/GnnP1PwywQKOf3lztgvS7elgUT86rgT40RioNTvULrJXQ= X-Received: by 2002:a05:6512:1289:b0:492:ca81:9a8 with SMTP id u9-20020a056512128900b00492ca8109a8mr8821903lfs.457.1661872545884; Tue, 30 Aug 2022 08:15:45 -0700 (PDT) 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 Received: by 2002:a05:6520:14d:b0:211:6cae:be17 with HTTP; Tue, 30 Aug 2022 08:15:45 -0700 (PDT) In-Reply-To: <837f27fc-97b0-6e71-50c0-12b8799e574d@FreeBSD.org> References: <202208301453.27UEroGr037461@gitrepo.freebsd.org> <837f27fc-97b0-6e71-50c0-12b8799e574d@FreeBSD.org> From: Mateusz Guzik Date: Tue, 30 Aug 2022 17:15:45 +0200 Message-ID: Subject: Re: git: 35b7759c05cb - main - cp: Fix build without VM_AND_BUFFER_CACHE_SYNCHRONIZED. To: Alexander Motin Cc: Rick Macklem , "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4MH9qR2CQ3z3wd0 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 On 8/30/22, Alexander Motin wrote: > On 30.08.2022 11:02, Rick Macklem wrote: >> Mateusz Guzik wrote: >>> On 8/30/22, Alexander Motin wrote: >>>> The branch main has been updated by mav: >>>> >>>> URL: >>>> https://cgit.FreeBSD.org/src/commit/?id=35b7759c05cbc65c06d87141da79f0f80af0f458 >>>> >>>> commit 35b7759c05cbc65c06d87141da79f0f80af0f458 >>>> Author: Alexander Motin >>>> AuthorDate: 2022-08-30 14:51:21 +0000 >>>> Commit: Alexander Motin >>>> CommitDate: 2022-08-30 14:51:21 +0000 >>>> >>>> cp: Fix build without VM_AND_BUFFER_CACHE_SYNCHRONIZED. >>>> >>>> It allows to not use mmap() for small files, which is not helpful >>>> in case of ZFS. Should be no functional change. >>>> >>> >>> This should be of no use thanks to copy_file_range >> cp does not use copy_file_range(2) for small files, if I recall >> correctly. > > Right. I tried to look for motivation, but history of this file goes > back to 4.4 Lite. :) I wonder whether copy_file_range(2) for UFS does > something clever, like this mmap() to avoid additional memory copy. For > ZFS though it cause big problem with buffer cache squeezing ARC to > absolute minimum. So if there is agreement to modernize this, I'd > completely support it. > > -- > Alexander Motin > The way I see it userspace cannot do it any faster. Especially with the zfs considerations it makes sense to straight up copy_file_range if you can and let the kernel figure out what to do in a sensible manner. Thought I have no idea if zfs is currently handled in such a way. Someone(tm) should look into it. -- Mateusz Guzik