From nobody Tue Apr 18 23:07:07 2023 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 4Q1KLz1B2Tz45pvl for ; Tue, 18 Apr 2023 23:07:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 4Q1KLx5LrNz40VN for ; Tue, 18 Apr 2023 23:07:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-506b20efd4cso1487125a12.3 for ; Tue, 18 Apr 2023 16:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1681859239; x=1684451239; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mA992dh3pj8mJ5oEZQtvuyp0IzCsqdtI3ZWKnX98gEg=; b=JI5MMF8tLP5l9ZkQdIX77wbO0TSJRH8Sl4nujuySdKu00+SmVOoGUPUAHZGzl0uJS1 vChnPjD3E1CW0CISu6BygxHzQNqzZki8h0pi118W7qwwvBid48r9p7TsfckPKqTpmnSk Rwu2Oofe8GFhKfWtZ0OxOVWPtRIA4ws9LIIDyfTZowN1B0ZBA6QHymyrB3nbXcgzxmeE ULyyzCOjO10Gz/qMKFTdcQUfWXzV5XOapo6+OuqvDVox+pUW5DiBNX7SCrF6TzgDt51f kg0ztMAvuEskAntjEjuHcR1C5G+u8RJWaSNqn2IRH+ziHOeLOFynbMvycd9Qwh2v4Ub0 dRkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681859239; x=1684451239; h=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=mA992dh3pj8mJ5oEZQtvuyp0IzCsqdtI3ZWKnX98gEg=; b=KqrsX2ElEdR65uZ90xYnZYl5JctzwLaOLtmSBZtKR0vzEC48JaO9t1YjXcOYGc6G2T t2uN9ZrYKD2h+egP3qCRzSxclbAQuHjwhlkwUTLz1B5dEgQ2tQrwAvhslraFddqTPM8a TglPONmZ6jDo1r4DOis2B/oNl4tvO1bVl8gmvaG02+kXLDeHv/8EdlTB3ZGV9HUtybwP arnV8o0LhlH2xIrsrLZh+vtrDTPowCetWUCq2lj+3fHxFjfaDpYlpZtvhGtAQhFpX7dV sIzyN18YoJxcwmDn34C/1rdfyvw/07rieiVooFLW6rYC4sP9N+/rz4qajNyiX+kiC01v W+RQ== X-Gm-Message-State: AAQBX9eGDgTWD2LYHCYkUlYzGwTkB8vI+9WNvsEmjm6r9gjzF4ujQIVk /E9rFN7HNlBlksDpa+bqtruBbU02Jr7ogR0RQC6RVw== X-Google-Smtp-Source: AKy350bW4hnHbrUnOg0IdbbLrvv4GDOsD1kLU7+e8iQM5KeRGEPp2GVS/O3TYRMTMrIrbH7eJ/bcPz/IodQTd+zspZU= X-Received: by 2002:aa7:dccf:0:b0:506:843f:2f27 with SMTP id w15-20020aa7dccf000000b00506843f2f27mr3683383edu.11.1681859238753; Tue, 18 Apr 2023 16:07:18 -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 References: <202304182131.33ILVSoG020217@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 18 Apr 2023 17:07:07 -0600 Message-ID: Subject: Re: git: 238271f4a66b - main - stand: Add a snarky note about the upstream ZFS situation To: Jessica Clarke Cc: Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000007d0ba505f9a45e9e" X-Rspamd-Queue-Id: 4Q1KLx5LrNz40VN X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000007d0ba505f9a45e9e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 18, 2023 at 4:52=E2=80=AFPM Jessica Clarke = wrote: > On 18 Apr 2023, at 23:49, Warner Losh wrote: > > > > > > > > On Tue, Apr 18, 2023, 3:34 PM Jessica Clarke wrote= : > >> On 18 Apr 2023, at 22:31, Warner Losh wrote: > >> > > >> > The branch main has been updated by imp: > >> > > >> > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D238271f4a66bd06b8b9a232a82f3ee0= 882e4cbb9 > >> > > >> > commit 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9 > >> > Author: Warner Losh > >> > AuthorDate: 2023-04-18 21:29:45 +0000 > >> > Commit: Warner Losh > >> > CommitDate: 2023-04-18 21:31:17 +0000 > >> > > >> > stand: Add a snarky note about the upstream ZFS situation > >> > > >> > The latest import of openzfs broke the hacks that we used to omit > the > >> > special registers being used on arm64. Add snarky note documentin= g > this > >> > situation since it's a mess now since the hack was only partially > >> > undone, leaving behind a mess. > >> > > >> > Sponsored by: Netflix > >> > --- > >> > stand/libsa/zfs/Makefile.inc | 4 ++++ > >> > 1 file changed, 4 insertions(+) > >> > > >> > diff --git a/stand/libsa/zfs/Makefile.inc > b/stand/libsa/zfs/Makefile.inc > >> > index f4cecdbc3085..7660f4ab7baf 100644 > >> > --- a/stand/libsa/zfs/Makefile.inc > >> > +++ b/stand/libsa/zfs/Makefile.inc > >> > @@ -19,6 +19,7 @@ ZSTD_SRC+=3D zstd_common.c > >> > ZSTD_SRC+=3D zstd_ddict.c zstd_decompress.c zstd_decompress_block= .c > >> > ZSTD_SRC+=3D zstd_double_fast.c zstd_fast.c zstd_lazy.c zstd_ldm.= c > >> > > >> > +# This is completely bogus: We should be able to omit this code > completely. > >> > .if ${MACHINE_ARCH} =3D=3D "aarch64" > >> > ZFS_SRC_AS =3D b3_aarch64_sse2.S b3_aarch64_sse41.S > >> > .endif > >> > @@ -90,10 +91,13 @@ CFLAGS.skein_block.c+=3D -DSKEIN_LOOP=3D111 > >> > > >> > # To find blake3_impl.c in OpenZFS tree for our somehat ugly > blake3_impl_hack.c > >> > # that's needed until the necessary tweaks can be upstreamed. > >> > +# XXX the last import gutted all this since upstream changes broke > this hack. > >> > CFLAGS.blake3_impl_hack.c+=3D -I${OZFS}/module/icp/algs/blake3 > -I${OZFS}/module/icp/include > >> > > >> > CWARNFLAGS.zfs.c+=3D ${NO_WDANGLING_POINTER} > >> > > >> > +# Needing to remove the -mgeneral-regs-only is a red flag that this > is not quite > >> > +# right. But it's needed at the moment due to the muddled upstream. > >> > >> This one isn=E2=80=99t bogus? The file is deliberately using NEON so n= eeds > >> access to floating-point registers, which LLVM (mostly) enforces for > >> the assembler, unlike GNU as. > > > > No. It's bogus because we should not be using it at all. The generic > implementation is fast enough for the boot loader and we have a blanket > policy against using extra register sets. The change wasn't discussed > before hand and what's really needed are upstream changes to be able to > omit it entirely. > > Oh I see, I misunderstood the point the comment was making. > It's also the third or fourth time that I've had to sort this, or similar, issues out in the boot loader (after spending a week or two initially to enable the OpenZFS import), so I'm a little frustrated by the situation. Warner > Thanks, > Jess > > > > b3_aarch64_sse2.o: b3_aarch64_sse2.S > > > ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ > > > -o ${.TARGET} > > --0000000000007d0ba505f9a45e9e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Apr 18, 2023 at 4:52=E2=80=AF= PM Jessica Clarke <jrtc27@freebsd.= org> wrote:
On 18 Apr 2023, at 23:49, Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Tue, Apr 18, 2023, 3:34 PM Jessica Clarke <jrtc27@freebsd.org> wrote:
>> On 18 Apr 2023, at 22:31, Warner Losh <imp@FreeBSD.org> wrot= e:
>> >
>> > The branch main has been updated by imp:
>> >
>> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D238271f4a66bd06b8b9a232a82f3ee08= 82e4cbb9
>> >
>> > commit 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9
>> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > AuthorDate: 2023-04-18 21:29:45 +0000
>> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > CommitDate: 2023-04-18 21:31:17 +0000
>> >
>> >=C2=A0 =C2=A0 stand: Add a snarky note about the upstream ZFS = situation
>> >
>> >=C2=A0 =C2=A0 The latest import of openzfs broke the hacks tha= t we used to omit the
>> >=C2=A0 =C2=A0 special registers being used on arm64. Add snark= y note documenting this
>> >=C2=A0 =C2=A0 situation since it's a mess now since the ha= ck was only partially
>> >=C2=A0 =C2=A0 undone, leaving behind a mess.
>> >
>> >=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Netflix
>> > ---
>> > stand/libsa/zfs/Makefile.inc | 4 ++++
>> > 1 file changed, 4 insertions(+)
>> >
>> > diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/M= akefile.inc
>> > index f4cecdbc3085..7660f4ab7baf 100644
>> > --- a/stand/libsa/zfs/Makefile.inc
>> > +++ b/stand/libsa/zfs/Makefile.inc
>> > @@ -19,6 +19,7 @@ ZSTD_SRC+=3D=C2=A0 zstd_common.c
>> > ZSTD_SRC+=3D=C2=A0 =C2=A0 zstd_ddict.c zstd_decompress.c zstd= _decompress_block.c
>> > ZSTD_SRC+=3D=C2=A0 =C2=A0 zstd_double_fast.c zstd_fast.c zstd= _lazy.c zstd_ldm.c
>> >
>> > +# This is completely bogus: We should be able to omit this c= ode completely.
>> > .if ${MACHINE_ARCH} =3D=3D "aarch64"
>> > ZFS_SRC_AS =3D=C2=A0 b3_aarch64_sse2.S b3_aarch64_sse41.S
>> > .endif
>> > @@ -90,10 +91,13 @@ CFLAGS.skein_block.c+=3D=C2=A0 =C2=A0 -DS= KEIN_LOOP=3D111
>> >
>> > # To find blake3_impl.c in OpenZFS tree for our somehat ugly = blake3_impl_hack.c
>> > # that's needed until the necessary tweaks can be upstrea= med.
>> > +# XXX the last import gutted all this since upstream changes= broke this hack.
>> > CFLAGS.blake3_impl_hack.c+=3D -I${OZFS}/module/icp/algs/blake= 3 -I${OZFS}/module/icp/include
>> >
>> > CWARNFLAGS.zfs.c+=3D ${NO_WDANGLING_POINTER}
>> >
>> > +# Needing to remove the -mgeneral-regs-only is a red flag th= at this is not quite
>> > +# right. But it's needed at the moment due to the muddle= d upstream.
>>
>> This one isn=E2=80=99t bogus? The file is deliberately using NEON = so needs
>> access to floating-point registers, which LLVM (mostly) enforces f= or
>> the assembler, unlike GNU as.
>
> No. It's bogus because we should not be using it at all. The gener= ic implementation is fast enough for the boot loader and we have a blanket = policy against using extra register sets. The change wasn't discussed b= efore hand and what's really needed are upstream changes to be able to = omit it entirely.

Oh I see, I misunderstood the point the comment was making.

It's also the third or fourth time that I've h= ad to sort this, or similar, issues out in the boot loader (after spending = a week or two initially to enable the OpenZFS import), so I'm a little = frustrated by the situation.

Warner
=C2= =A0
Thanks,
Jess

> > b3_aarch64_sse2.o: b3_aarch64_sse2.S
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0${CC} -c ${CFLAGS:N-mgeneral-regs-only}= ${WERROR} ${.IMPSRC} \
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-o ${.TARGET}

--0000000000007d0ba505f9a45e9e--