Page MenuHomeFreeBSD

Add an option for specifying the default debug flags for mps driver.
AbandonedPublic

Authored by imp on Apr 4 2019, 3:53 AM.

Details

Reviewers
slm
scottl
Summary

Rather than requiring someone hack mps.c to set these, make them a
proper option.

Test Plan

Build w/o this option, and build with options MPS_DEBUG_FLAGS in a kernel config.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 23527
Build 22531: arc lint + arc unit

Event Timeline

imp created this revision.Apr 4 2019, 3:53 AM
imp edited the test plan for this revision. (Show Details)Apr 4 2019, 3:54 AM
imp added a reviewer: scottl.

If this looks good, I'll do the identical changes to mpr as well.

cem added a subscriber: cem.EditedApr 4 2019, 9:36 PM

Why not just cut straight to a tunable instead and save a compile?

ScottL will want a matching change to dev/mpr (if appropriate) to keep them in sync.

Edit: oops, got our lines crossed. I see you plan to do so:

In D19816#424989, @imp wrote:

If this looks good, I'll do the identical changes to mpr as well.

imp added a comment.Apr 5 2019, 3:38 AM
In D19816#425165, @cem wrote:

Why not just cut straight to a tunable instead and save a compile?

Sometimes the deployment is just easier to compile it in. There's a default with /*XXX */ (which I need to change) which suggests that its useful. This has been the debugging default for a long, long time, though...

imp updated this revision to Diff 55827.Apr 5 2019, 6:04 AM
imp edited the test plan for this revision. (Show Details)

mps debug flags in NOTES, as appropriate.

imp added a comment.Apr 5 2019, 6:07 AM

I debated tossing this into sys/conf/NOTES, but didn't want to play whack-a-mole with the architectures that I'd opt out of... Comments?

Eh, I'm not a big fan of this, converting the driver to use strings from sysctl and kenv was intended to make it as easy as possible to set and unset flags from the default. It also adds new touch points in the system that will have to be updated or risk going stale if debugging evolves. Is editing, compiling, and deploying a new kernel easier than editing loader.conf? That said, I don't have a hard objection to it being committed, so long as the first time it goes stale, Warner buys me a nice chopped brisket dinner at Shorty's.

imp abandoned this revision.Jun 3 2019, 6:03 PM

On second thought, I'll use the tunable.