From nobody Sat Jan 18 00:03:08 2025 X-Original-To: freebsd-hackers@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 4YZcJJ30vMz5kS1J for ; Sat, 18 Jan 2025 00:03:28 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YZcJH1gD4z3PJh; Sat, 18 Jan 2025 00:03:27 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZHovMYGK; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2a00:1450:4864:20::52b as permitted sender) smtp.mailfrom=rick.macklem@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5da135d3162so4394702a12.3; Fri, 17 Jan 2025 16:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737158605; x=1737763405; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pV0nbIlnC0fmNm4cZ9vqyrERUsk0O4JHyL8wFz/XTXU=; b=ZHovMYGKQYDCBeTMx9BLPFINw2el4aD7HPuprNcE0JERqe6tySHBAM3pDw0dU83Kvj qvlMZojsHJu6y1GlE2yVRgQJXi2fVKy8rH0/LgB3L0ALrsIh37zRlrB8GiKgD9hnH7ny N5dgxtk943Tyj/DVlvl4ZTnogDgS4wcLy9DjR2wXm9b49wGSZcArnLIJjMUbrAlLflvC SL8FzC+h+vgCVWsY39wqAaN05hrO9g8xIm+qHK2Ipzs7vTUH3qgHsKaVmOCU0scQw7AO NZ0PoMgIICmhWx8DzLy/T6IZ8KGutxWFM8YE9/Z8k4A0nFSUZKyR6dP/0xK3uA62968k CVDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737158605; x=1737763405; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pV0nbIlnC0fmNm4cZ9vqyrERUsk0O4JHyL8wFz/XTXU=; b=jxOlCHN9iM6gkXfHsWk8tHWbomkyVFDau05PisIXZZhFTn6jzjn2U3yalvwfp6Lr1m rpy8stUeCbC/lya6TA0LucIYIChaO+EwurBXCiKxOOpUNdsvd36NS4A7vHVuBHYuUznN mcJo2dG9RAbUsahsTxTrsiFZViz5NH0RnVv+UFpP2oIpleML+jUGK7AO38NB6xph+Au2 P/1dvp5OzpHTbCUogpVecqsyLS3zauMXnr8FmoJlkcJhVDmJAU35Y3gPp2iz32Q1S/9m GFOaJ4+CcINLbUlPGj4/fw6+QRXAB3asu2/GHkwP8GQyBqQPQHeAyVEswo5Risoyxap6 Ui+A== X-Forwarded-Encrypted: i=1; AJvYcCV+oXpSpFTa2btee/w/GaO4ozmxyu33yPCRuBG+9xJa7PEG2nLH6eaEgQUTXyau2I+6QfoaUBmgLdID7YC7hL0=@freebsd.org X-Gm-Message-State: AOJu0Yxo3KWQPHruMr7tzRIZZ+aWZyd+gWSZyrESEhp5+aPQNaSR2PPo d+pa1EhiB4pgnyDrXThieUfxmV6nVDERRYmStF7xD/RGN8sg5QQnwLmsq3GMmjgXEQgT2I8OdbY PIuHudcZVfQiKZlE1GLsXDHauYLLRTIE= X-Gm-Gg: ASbGncsJl2rFOL9Q5R/1RVdDQm230iVOz3Ia24H1LS4RG8kQIMXlCv4khGgQZXijNjl Cm8UQ6wePgl/dYYKOaNWRl6XsFbMo6k3CFCjLZqwo44FgQdFcw5QXNfH74f+B1PYqvsQWJsY= X-Google-Smtp-Source: AGHT+IGoG6i8M9VGinhqftpf91IsB2YzDYPx87V4GR/PBMDjJPTpvPiDmE351F6XdUT4s7URWh/R37MXAfqXo1t+HJI= X-Received: by 2002:a05:6402:2548:b0:5d3:e79b:3b4c with SMTP id 4fb4d7f45d1cf-5db7db2bfebmr4577955a12.31.1737158604624; Fri, 17 Jan 2025 16:03:24 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Fri, 17 Jan 2025 16:03:08 -0800 X-Gm-Features: AbW1kvYh4B3QNmgaXpw_t_0ctStfyd0gU1I-kk4UDcOBfQ27wVRmqMrF5fT2JUY Message-ID: Subject: Re: WRITE_SAME support in FreeBSD nfsd NFSv4.1 mode? To: Alan Somers Cc: Cedric Blancher , freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.95 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.95)[-0.954]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TAGGED_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_RCPT(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52b:from]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Spamd-Bar: -- X-Rspamd-Queue-Id: 4YZcJH1gD4z3PJh On Sun, Jan 12, 2025 at 1:18=E2=80=AFPM Alan Somers w= rote: > > On Sun, Jan 12, 2025 at 12:23=E2=80=AFAM Cedric Blancher > wrote: > > > > On Fri, 10 Jan 2025 at 16:02, Alan Somers wrote: > > > > > > On Thu, Jan 9, 2025 at 5:31=E2=80=AFPM Dan Shelton wrote: > > > > > > > > Hello! > > > > > > > > Does FreeBSD nfsd support the WRITE_SAME request in NFSv4.1 mode? > > > > > > > > Dan > > > > -- > > > > Dan Shelton - Cluster Specialist Win/Lin/Bsd > > > > > > Out of curiosity, what is your use case? > > > > As discussed in the linux-nfs@ list, is a typical "big data" and > > database accelerator, for example fast pattern fill (1 WRITE_SAME > > command over the write, compared to commands with data block, > > where is typically > 200 average), or just zero fill for blocks. > > It's basically reducing network traffic dramatically. > > > > Windows SMB 3.0 already supports that, and is a main selling point for > > M$ to keep database people on the W$ platform. They even added several > > Windows syscalls like > > https://learn.microsoft.com/en-us/windows/win32/api/winioctl/ni-winioct= l-fsctl_set_zero_data > > > > Ced > > I understand why WRITE SAME would greatly reduce network traffic > compared to writing the same data n times. But my question is, what > real application requires that, where the data isn't simply all-zeros? > Are there database operations that require writing the same non-zero > pattern to multiple blocks? You might find the discussion on the linux-nfs@vger.kernel.org mailing list interesting. It is under this subject line: [LSF/MM/BPF TOPIC] Implementing the NFS v4.2 WRITE_SAME operation: VFS or NFS ioctl() ? Although there is no consensus, it seems to me that there is not a lot of use for anything beyond zeroing blocks. Unfortunately a WRITE_SAME implementation needs to do a lot more that zero blocks. I am holding off on any server implementation until there is an apparent ne= ed. rick >