From owner-dev-commits-src-all@freebsd.org Wed Apr 28 01:55:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42E096287C3 for ; Wed, 28 Apr 2021 01:55:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FVMCD1F67z3NFP for ; Wed, 28 Apr 2021 01:55:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf35.google.com with SMTP id dm16so5220346qvb.3 for ; Tue, 27 Apr 2021 18:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vA3HH6IPYlJp08moCBgdj6QE1TJxSXKfoQeXvWRf4/A=; b=tJMrsfKvsespqDkO/FF39HGeNhwXkut+j800Nxto80lwbVJ/gfsStpXM6IU1ChPG/f OOAmf/DbUa4gdYEZjGRcyktHLeJ+5U5carJ0Pntk5ORpDgr1jhTHT3jCzV5be4fiZRb/ 3MeeilVzBXRQIvze/7IXvSzBfYnF5aRhCoiawmkNw7k3XxiCOkIPTx6ji/e9kIlmC6jE hdzmD3cDbRJAHUX7aOY93lNb+oIJiWhVxtPXXH1vrSf7kYY5UyPH8j00c0Bl4Ix0NNw2 4hUpCbtkNBuQ+bPdWbWtxy83zmWTLdMYSzZyBtcC3q0Wv2UvWAFw3ugBtTQvV5RVambd ql9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vA3HH6IPYlJp08moCBgdj6QE1TJxSXKfoQeXvWRf4/A=; b=IDPMaaaWqU4/Nm9naLn7hXlgvwiLW5oWWj+fgFb1QkQV9rAxiW/krpGdQBSz/lcQLw 5j6CV66PnHtULqZk/3INuUbzgYDsrM0Fmb/9jFBbuwj4hjk70Qfs02HiGJf4Gg47u9U/ eIMgPoTNRPxcXsZrifBb5hC8YLhAwX3fYkNGF4v52i6h6UMa/D2kELED3/DcoMboqXX4 edlaDhStEOA4h0sbTSCBjhP0pFtm1h191mEsKAIJO5awyjJDENoBm5qQvtNO1XyTeYAb YwiKs6lVuRzTh8yALaydYsBS56flB2Gn7CI0D/pOFruPudgpSEdGXoz8t1T+wGuohzmJ xZuA== X-Gm-Message-State: AOAM531oYLMFr07fDP+0qGTixrynQMNn1/p+AXABSgxwkeJTrshZNj7q QYX6jyZbqJjnfJ6nkKuwEm/CP+KeByoxFMysOc+DOg== X-Google-Smtp-Source: ABdhPJykMrGapL3Ag77TNLhrSul2GejOEfeq7yvPCCUPCU3ClTsZxVJoQ7XA81LD3VSdMCEOe+cIZ2JCcBOhSNN7dMk= X-Received: by 2002:a05:6214:134a:: with SMTP id b10mr26461177qvw.62.1619574902852; Tue, 27 Apr 2021 18:55:02 -0700 (PDT) MIME-Version: 1.0 References: <202104270309.13R39Lur024105@gitrepo.freebsd.org> <705D11CB-3762-4437-8825-8E3040BBAB9F@panasas.com> <20210427070557.wv3lkor3tscxzdtg@aniel.nours.eu> In-Reply-To: From: Warner Losh Date: Tue, 27 Apr 2021 19:54:50 -0600 Message-ID: Subject: Re: 0cd4b781a6fa - main - pw(8): use openmemstream instead of sbuf(9) To: Ravi Pokala Cc: Baptiste Daroussin , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4FVMCD1F67z3NFP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 01:55:04 -0000 On Tue, Apr 27, 2021, 7:30 PM Ravi Pokala wrote: > -----Original Message----- > From: Baptiste Daroussin > Date: 2021-04-27, Tuesday at 00:05 > To: Ravi Pokala > Cc: , , > > Subject: Re: 0cd4b781a6fa - main - pw(8): use openmemstream instead of > sbuf(9) > > On Mon, Apr 26, 2021 at 09:13:53PM -0700, Ravi Pokala wrote: > > -----Original Message----- > ... > > Hi Baptiste, > > > > pw(8): use openmemstream instead of sbuf(9) > > > > That's the "what", but what's the "why"? > > > > Thanks, > > > You are right about this. Here the why. I have been the one > introducing sbug in > pw(8) when I rewrote it, but since the beginning while I found this > was better > than the solution in place I didn't like adding another external lib > just for > that. > > Fair enough. > > Short after I discovered about open_memstream(3) and figured it could > fill the > same spot here but keeping the dep only on libc. > > I keep forgetting that open_memstream(3) is even a thing. `grep'ing the > src tree, it looks like it's very rarely used. > > I was puzzled about pushing > this change, and the switch to git reminded me about some uncommit > patches > sitting on my tree and I ended up pushing it. > > If people have strong opinion I can revert it back. > > I can't imagine anyone having a problem with this. :-) > Great explanation. Makes sense to me that you'd want to use a more standard way of doing this. Warner Thanks for explaining. > > -Ravi (rpokala@) > > Things that have not been taken in account in the change, but to answer > questions asked privately: > > - I have performed absolutely no performance benchmark, it does not > matter here. > > - The size of the final binary is smaller: > - 76k on amd64 for the new version > - 77k for the old version > > Best regards, > Bapt > > >