Page MenuHomeFreeBSD

Get rid of unneccessary ioctls.
ClosedPublic

Authored by trasz on Oct 15 2018, 12:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 10:59 AM
Unknown Object (File)
Sat, Nov 23, 7:13 AM
Unknown Object (File)
Mon, Nov 4, 4:26 AM
Unknown Object (File)
Oct 10 2024, 3:27 AM
Unknown Object (File)
Oct 1 2024, 2:13 PM
Unknown Object (File)
Sep 29 2024, 11:01 PM
Unknown Object (File)
Sep 27 2024, 11:00 AM
Unknown Object (File)
Sep 26 2024, 12:28 PM
Subscribers

Details

Summary

Prevent flex(1) from generating calls to isatty(3) - and, in turn,
TIOCGETA ioctls - when parsing nsswitch.conf(5).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The flex man page suggests there's a performance improvement if we use -CF or -Cf as well. -CFr or -Cfr may also be beneficial since it beneficial. The man page warns against increased size, but I doubt the differences that were important when flex was written (1995) are relevant today. If we're looking at performance tuning, we should look here.

Adding -CFr does increase the size, but not be enough to matter:

  9978      4    88   10070   0x2756   nslexer.o.no-CFr
26883      4    80   26967   0x6957   nslexer.o.-CFr

so ~16k increase in size. If you have a way to benchmark things, you might see if this is faster or not.

This revision is now accepted and ready to land.Oct 15 2018, 2:32 PM
markj added inline comments.
lib/libc/net/nslexer.l
56 ↗(On Diff #49160)

Keep these sorted?

This revision now requires review to proceed.Oct 15 2018, 3:31 PM
In D17564#374936, @imp wrote:

The flex man page suggests there's a performance improvement if we use -CF or -Cf as well. -CFr or -Cfr may also be beneficial since it beneficial. The man page warns against increased size, but I doubt the differences that were important when flex was written (1995) are relevant today. If we're looking at performance tuning, we should look here.

Adding -CFr does increase the size, but not be enough to matter:

  9978      4    88   10070   0x2756   nslexer.o.no-CFr
26883      4    80   26967   0x6957   nslexer.o.-CFr

so ~16k increase in size. If you have a way to benchmark things, you might see if this is faster or not.

I'll keep that in mind, although for now I'm just shaving off useless syscalls :-)

This revision was not accepted when it landed; it landed in state Needs Review.Oct 15 2018, 7:48 PM
This revision was automatically updated to reflect the committed changes.