From nobody Sun May 21 18:02:55 2023 X-Original-To: dev-commits-src-all@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 4QPT2j55tGz4CHct for ; Sun, 21 May 2023 18:03:09 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 4QPT2j4XY0z3qpD for ; Sun, 21 May 2023 18:03:09 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-3f42c865535so52328145e9.1 for ; Sun, 21 May 2023 11:03:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684692186; x=1687284186; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tOM1yX5eRVKVLoBpkb2lkJ3ChbfD8dQlzltKpV5R0Jc=; b=J7BRXueI/RQD0Zyiot3YV0RDeziEtz1giuuG0+198B+pxnI4+VVrSMPIOTZcRluluP jNDx0bEaGQdBgdpkyCt8wpxJ2SHOc3d27YePuSeIGS4FlJ+Dj29xxQRlabt1PwqEAYMP wvIYI0sHqfJEZr2340JdMmv03YDGhmSsVUM4GiOgcGlbFfTG+TrF9g76ciADPNisns79 Bk+36mHPooOmvCnE/KYP4TS61DjwTXZcdnw0Z2r3ZAFlfyjbTLW4+krprQwayXS9b9bJ uHytnktNzHjgfMHmBAwtM8d9oSTWZIXZ21+l6nnsL94zPxNAJtYdSr1VBtrnirCaIHfT yh2w== X-Gm-Message-State: AC+VfDxmmBylXI2OzHh89b+yfWkvbNlAhzPTGIkix725Ej4ImyjSog7c iYY3/t0I1xpMJCLFWnCSZk4J4w== X-Google-Smtp-Source: ACHHUZ4GLMdotKHJAAMQzLw7M4itHXeyNlyyhSNCjvyOqBbHKbuq7g/WdwCbggox7Voinj+nkNB/Bw== X-Received: by 2002:a05:600c:2608:b0:3f4:22ff:812 with SMTP id h8-20020a05600c260800b003f422ff0812mr5353129wma.26.1684692186637; Sun, 21 May 2023 11:03:06 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id s24-20020a1cf218000000b003f4f1b884cdsm9003433wmc.36.2023.05.21.11.03.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 May 2023 11:03:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: git: 805d759338a2 - main - mlx4: Move DEFINE_MUTEX() outside function body. From: Jessica Clarke In-Reply-To: Date: Sun, 21 May 2023 19:02:55 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <26465813-3B51-4E52-9E9D-F93A0F2AF6BD@freebsd.org> References: <202305211621.34LGLsup059861@gitrepo.freebsd.org> <54EF67D8-2A79-4EAB-8EFB-232F14FFE792@freebsd.org> <21c9532e-4ca7-a7fe-1ff6-07a94cbad6ab@freebsd.org> <3066464F-E4C6-4B84-ADFF-E578AFAFE622@freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3731.500.231) X-Rspamd-Queue-Id: 4QPT2j4XY0z3qpD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 21 May 2023, at 18:46, Hans Petter Selasky = wrote: >=20 > On 5/21/23 19:05, Jessica Clarke wrote: >> On 21 May 2023, at 17:57, Hans Petter Selasky = wrote: >>> If you want to change from static structures to global symbols, then = my change is correct. >> Which will bloat symbol tables excessively. But you didn=E2=80=99t = state this as your goal, you stated it as a behavioural change *today*, = which it=E2=80=99s not (other than changing the scope). Your commit = message was entirely nonsense, and so I told you that. If your goal is = instead to allow for future changes, put that in your commit message. I = am not a mind reader, nor is anyone else. It is extremely unhelpful to = have commits that say one thing but intend to achieve a different thing. >=20 > Hi Jess, >=20 > To me the word "avoid" is agnostic of time. And that's why I used it = there. It doesn't mean there is a bug, but there may easily be a bug = there. I strongly disagree. Your wording heavily implied that you were avoiding = something that currently occurs. > If you have time, I can add you for review more often. Let me know = what you prefer. Code review is encouraged by the project, whether from me or anyone = else. > When the kernel uses dynamic linking, you end up having tons of = relocation entries in the resulting ELF file. Getting rid of symbol = names doesn't stop relocation entries from piling up. >=20 > For example declaring a static mutex: >=20 > At first you have the static mutex. Then the sysinit structure needs = one relocation to refer to the static mutex. Then after that the dataset = mechanism needs another relocation to refer to the sysinit structure. >=20 > sysinit's work, but there may be better ways to do it. I am well aware of how relocations work. I am a compiler and linker = developer (and co-chair of RISC-V=E2=80=99s psABI task group); my = expertise lies in the world of linking. Relocations serve a purpose at = run time. Symbols like this do not. Moreover they now risk clashing as = they=E2=80=99re now visible outside the translation unit. For example, = ib_addr.c and ib_cma.c both have static DEFINE_MUTEX(lock); and that = needs to work as-is because Linux=E2=80=99s DEFINE_MUTEX lets you do = that. So shoving a bunch of symbols into the global namespace is a = non-starter. Jess >>>=20 >>> This change also allows for: >>>=20 >>> https://reviews.freebsd.org/D40193 >> Which looks like a mess to me. > If you have a better way in your mind to do this, then implement it, = and let me know. >=20 > --HPS