Re: BUFSIZ = 1024, still ?

From: Scott Long <scottl_at_samsco.org>
Date: Mon, 20 Aug 2012 19:59:42 -0600
On Aug 18, 2012, at 3:43 PM, Matthew Jacob <mj_at_feral.com> wrote:

> On 8/18/2012 2:36 PM, Poul-Henning Kamp wrote:
>> In message <50300540.9060906_at_feral.com>, Matthew Jacob writes:
>> 
>>> [...] 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.
>> 
>>> 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.
> 
>>> 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!
> 

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
Received on Tue Aug 21 2012 - 00:16:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC