Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2012 19:59:42 -0600
From:      Scott Long <scottl@samsco.org>
To:        Matt Jacob <mjacob@freebsd.org>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, freebsd-current@freebsd.org
Subject:   Re: BUFSIZ = 1024, still ?
Message-ID:  <E9DDBE53-C188-4CFD-9B7E-6CCDB12CC874@samsco.org>
In-Reply-To: <50300C6D.3030501@feral.com>
References:  <6882.1345325806@critter.freebsd.dk> <50300C6D.3030501@feral.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Aug 18, 2012, at 3:43 PM, Matthew Jacob <mj@feral.com> wrote:

> On 8/18/2012 2:36 PM, Poul-Henning Kamp wrote:
>> In message <50300540.9060906@feral.com>, Matthew Jacob writes:
>>=20
>>> [...] that there might be a measurable
>>> difference for having to copy 4K (unaligned) than 1K (unaligned) to
>>> kernel space for disposition.
>> Actually, as far as I'm aware, the 4K would be page-aligned by
>> default due to our malloc(3) implementation.
>>=20
>>> Wasn't there just a recent discussion about running 1.x binaries?
>> 1.x binaries wouldn't notice and wouldn't be able to tell
>> if BUFSIZ is different in 10.x
> I wasn't concerned about those specifically- I was just using this as =
an example of leaving stuff alone.
>=20
>>> If you're going to talk about making a change to defaults, the =
default
>>> MAXPHYS and DLFTPHYS have been undersized for years now.
>> Indeed, but as I understand it, those require device driver changes ?
> Ah, well 10.X would be an ideal time to find out!
>=20

This gets brought up from time to time, and I honestly thought that I =
swept most of the problems up a few years ago.  The mistake that I made =
in the mlx driver that was recently corrected was evidence of a previous =
sweep.

If anyone wants to do another sweep, the thing to grep for is any =
drivers that use MAXPHYS to size their i/o's.  For the drivers that do =
that, you then have to see if they can actually handle an arbitrary =
number of scatter-gather elements.  If they can't then they need to stop =
using MAXPHYS and start using a constant that applies to the driver.  My =
quick scan shows the following would need to be investigated:

sys/dev/ata (legacy ata)
/sys/dev/isp
/sys/dev/mmcsd
/sys/dev/mvs

The only other problem is that struct but contains an element sized on =
MAXPHYS for doing swapper I/O.  Increasing MAXPHYS will increase this, =
and at one point I think that Alan Cox might have wanted to find a =
better way to hold swap info.  Otherwise, increasing MAXPHYS causes no =
problems and is something that has run in production for quite some time =
at places like Yahoo and Netflix.

Scott




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E9DDBE53-C188-4CFD-9B7E-6CCDB12CC874>