Date: Thu, 14 May 2015 15:08:38 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Ian Lepore <ian@freebsd.org> Cc: John-Mark Gurney <jmg@funkthat.com>, Adrian Chadd <adrian@freebsd.org>, Hans Petter Selasky <hps@selasky.org>, David Chisnall <theraven@freebsd.org>, Baptiste Daroussin <bapt@freebsd.org>, "current@freebsd.org" <current@freebsd.org> Subject: Re: Increase BUFSIZ to 8192 Message-ID: <48339.1431616118@critter.freebsd.dk> In-Reply-To: <1431615185.1221.57.camel@freebsd.org> References: <20150511230635.GA46991@ivaldir.etoilebsd.net> <20150512032307.GP37063@funkthat.com> <14994.1431412293@critter.freebsd.dk> <20150513080342.GE37063@funkthat.com> <A1224018-7540-4C76-91EF-AEA2655E49A8@FreeBSD.org> <55530CC3.1090204@selasky.org> <1431528249.1221.15.camel@freebsd.org> <CAJ-VmonL9mT4JLqfSefKYiwv5-ecLkx9RZ5=kXt__%2Bs9iO4%2B9Q@mail.gmail.com> <20150513181347.GM37063@funkthat.com> <1431542835.1221.30.camel@freebsd.org> <20150514072155.GT37063@funkthat.com> <62511.1431589335@critter.freebsd.dk> <1431615185.1221.57.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-------- In message <1431615185.1221.57.camel@freebsd.org>, Ian Lepore writes: >I think we've got differing interpretations of what BUFSIZ is for. > >IMO, the one correct use of BUFSIZ outside of libc is "if you are going >to call setbuf() the buffer you pass must be BUFSIZ bytes long." > >Over the years, it seems that many people have somehow gotten the >impression that the intent was "BUFSIZ is the right/ideal/whatever size >to allocate general purpose IO buffers in any program" I don't know when you started, but when I started, on sys-III and v7 in the mid 1980ies, that was exactly what people told you: "Do disk-I/O in BUFSIZ units". I did a quick sampling of src and that seems to be exactly how it is being used in most of the cases I looked at, including libmd where I put it there on exactly that reason back in 1994 (5?) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48339.1431616118>