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
Unknown Object (File)
Jan 29 2024, 5:14 AM
Unknown Object (File)
Dec 20 2023, 12:30 AM
Unknown Object (File)
Dec 8 2023, 10:16 PM
Unknown Object (File)
Dec 8 2023, 9:30 PM
Unknown Object (File)
Dec 8 2023, 12:03 PM
Unknown Object (File)
Dec 8 2023, 7:51 AM
Unknown Object (File)
Dec 4 2023, 2:28 PM
Unknown Object (File)
Nov 29 2023, 5:55 AM
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.