Page MenuHomeFreeBSD

kern_dump.c: move kernel dump code out of kern_shutdown.c
AbandonedPublic

Authored by markj on Jul 12 2015, 2:18 AM.
Tags
None
Referenced Files
F110993217: D3054.id6864.diff
Tue, Feb 25, 10:18 PM
Unknown Object (File)
Tue, Feb 25, 9:04 AM
Unknown Object (File)
Mon, Feb 24, 5:59 PM
Unknown Object (File)
Sat, Feb 22, 1:28 AM
Unknown Object (File)
Jan 23 2025, 2:37 PM
Unknown Object (File)
Dec 4 2024, 3:37 AM
Unknown Object (File)
Nov 19 2024, 11:01 AM
Unknown Object (File)
Nov 18 2024, 8:44 PM
Subscribers

Details

Reviewers
rstone
Summary

Consolidate kernel dump code in kern_dump.c. Support for compressed
dumps will require extending the dump_write() interface, and
kern_shutdown.c seems like the wrong place to add this code.

Definitions for dumper_t and struct dumperinfo remain in conf.h since
they're required by drivers that implement a dumper routine, and drivers
aren't typically interested in the implementation details of kernel
dumps (which is what kerneldump.h exposes).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

markj retitled this revision from to kern_dump.c: move kernel dump code out of kern_shutdown.c.
markj edited the test plan for this revision. (Show Details)
markj added a reviewer: rstone.
markj updated this object.
markj added a subscriber: cem.
sys/kern/kern_dump.c
81–82

How much do we care about keeping the sysctl kern.shutdown.dumpdevname?

sys/kern/kern_shutdown.c
99–101

Why move this?

I'm on the fence about this change - defining a kern.shutdown sysctl in kern_dump.c is a bit ugly, and kern_dump.c now contains two mostly-distinct groups of code: dumpsys stuff, and I/O stuff. So I'm not sure this is an improvement over keeping stuff in kern_shutdown.c. I would like to keep kernel dump-related stuff out of conf.h and in kerneldump.h, though.

If you have strong feelings either way, please comment. :)

sys/kern/kern_dump.c
81–82

Somewhat? dumpon(8) uses it, and it's in at least my muscle memory.

sys/kern/kern_shutdown.c
99–101

Oops, I'm not sure. I'll move it back.

I think I'd prefer renaming the sysctl. kern.dumpdevname or kern.dump.devname seem reasonably future-proof.

I think kern.shutdown.dumpdevname is a crappy historical accident, but there's a decent argument to be made for not breaking names unnecessarily.

Anyway, not a strong preference, either is okay with me.