[Bug 215836] [PATCH] sbin/dmesg: support new flag for watching messages

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jan 6 23:32:44 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215836

--- Comment #4 from joe at thrallingpenguin.com ---
Thank you for your feedback.

I cannot simply go through syslog, as too much delay and overhead.

I am proposing three solutions to this. Which sounds the most likely to succeed
in being accepted?

1. In researching "sys/kern/subr_log.c", I see it only accepts a single process
watching (as you've kindly mentioned). Since the whole point of this file is
centered around read-only operations; I feel it would be safe and fairly
non-complex to support multiple processes performing open() and kevent() calls
by switching to a linked list of "struct selinfo". Each waiting process may
then utilize kevent() mechanisms; with additional changes to the mutex calls.

2. Use the value of "kern.log_wakeups_per_second" to calculate a better sleep()
call between loops.

3. Keep the dmesg change locally.

I am willing to accept any of these options, with #3 being done, #2 being very
simple, and #1 being a bit involved, but supporting a number of ideas I have.

Thoughts, suggestions, or ideas are welcomed!
-Joe

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list