Date: Fri, 10 Jan 2020 09:32:45 +0100 From: Gary Jennejohn <gljennjohn@gmail.com> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: maximum MAXBSIZE Message-ID: <20200110093245.1d11d175@ernst.home> In-Reply-To: <CANCZdfrY08MRGu3pXLksn%2Bn=CNGqbqkphvuzUFUpObg61X3fiA@mail.gmail.com> References: <d79078c4-f1cb-93b9-ee6e-f689936c1e01@selasky.org> <YQBPR0101MB1427EEDE94AA6E34B49C3C09DD3F0@YQBPR0101MB1427.CANPRD01.PROD.OUTLOOK.COM> <20200108105136.0d54ebce@ernst.home> <alpine.BSF.2.20.2001081452360.44533@puchar.net> <20200108141810.GX23031@kib.kiev.ua> <CAG6CVpUrGyov12nQSKhofCPw5fAiXgDGChxf3-aFu1fKpirJTQ@mail.gmail.com> <alpine.BSF.2.20.2001091057420.96836@puchar.net> <CANCZdfokuE%2BKheFvSnx7M4he9Drx31xLj8o_GKUGJqKk32Oj7g@mail.gmail.com> <alpine.BSF.2.20.2001091520120.10661@puchar.net> <20200109164519.33fc7478@ernst.home> <20200109204943.GC25924@server.rulingia.com> <CANCZdfrY08MRGu3pXLksn%2Bn=CNGqbqkphvuzUFUpObg61X3fiA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 9 Jan 2020 14:14:09 -0700 Warner Losh <imp@bsdimp.com> wrote: > On Thu, Jan 9, 2020 at 1:55 PM Peter Jeremy <peter@rulingia.com> wrote: > > > On 2020-Jan-09 16:45:19 +0100, Gary Jennejohn <gljennjohn@gmail.com> > > wrote: > > >On Thu, 9 Jan 2020 15:21:25 +0100 (CET) > > >Wojciech Puchar <wojtek@puchar.net> wrote: > > >> why FreeBSD default is so completely wrong for modern hardware? > > >> > > >> i think 4MB is OK for HDDs, more may be optimal for RAID5 arrays. > > > > > >POLA (principle of least amazement). I certainly don't need a MAXPHYS set > > >to 4MB on my desktop machine. > > > > What are the downsides of running with MAXPHYS set to 4MB (or similar)? > > > > There's two issues. One, it makes every buf and bio 32 times larger. > Second, there's a lot of drivers that say their max I/O size is MAXPHYS > when really they mean max(128k,MAXPHYS). Newer hardware is better about it, > but not perfect (I had to fix a NVMe bug because the format of SG lists we > used is limited to 4k which means our NVMe driver can't do more than 1MB > I/Os). DFLTPHYS also needs to be raised. There are (or were) some drivers > in the tree that bogusly used DFLTPHYS as the maximum I/O, though I think I > caught all of those. And once you bump MAXPHYS, there's other limits you'll > run into with fast SSDs/NVMe drives (like runningbufs limiting write > throughput). > [I reduced the Cc: list] Not just storage drivers use MAXPHYS. All of the attempts at porting the rtsx SD controller driver from OpenBSD use MAXPHYS. That's due to the OpenBSD code using it; but MAXPHYS on OpenBSD is only 64KiB. It would definitely be a POLA violation if MAXPHYS were suddenly set to e.g. 1MiB. Assuming we ever get the DMA to work. -- Gary Jennejohn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200110093245.1d11d175>