bin/161756: [patch] sh(1) /bin/sh: read files in 1024-byte chunks rather than 1023

Ian Lepore freebsd at damnhippie.dyndns.org
Wed Oct 19 23:07:15 UTC 2011


I'm sorry to say I don't have any performance numbers, and this change
isn't really important enough to me to spend any time generating them.
I actually noticed the 1023-byte IOs while debugging a problem that led
me to instrument ffs_read() activity on executable files, and the change
to a power-of-2-sized IO was so simple that I took a few extra minutes
to submit a PR for it.  

It takes our 180mhz ARM platforms unreasonably long to run all
the /etc/rc.d scripts, over two minutes.  If this change buys back a
couple seconds from that it'd be nice, but the real motivation for the
patch wasn't that I expected the performance change to blow me away, it
was just that something deep in my core rebels at knowing there's a 1023
byte IO going on when it could just as easily be 1024.  I don't know of
any hardware devices that work better with a 1023 byte IO size.  :)

-- Ian

On Wed, 2011-10-19 at 22:40 +0000, jilles at FreeBSD.org wrote:
> Synopsis: [patch] sh(1) /bin/sh: read files in 1024-byte chunks rather than 1023
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: jilles
> State-Changed-When: Wed Oct 19 22:33:38 UTC 2011
> State-Changed-Why: 
> Although this change looks like an improvement, it does not seem
> fully satisfying. I would like to see performance numbers for the
> change on your slow embedded platform. Also, why use 1023 or 1024?
> Another buffer size may be better.
> 
> 
> Responsible-Changed-From-To: freebsd-bugs->jilles
> Responsible-Changed-By: jilles
> Responsible-Changed-When: Wed Oct 19 22:33:38 UTC 2011
> Responsible-Changed-Why: 
> Take.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=161756



More information about the freebsd-bugs mailing list