Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Jan 2017 23:32:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 215836] [PATCH] sbin/dmesg: support new flag for watching messages
Message-ID:  <bug-215836-8-vCino47fYj@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-215836-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-215836-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

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

--- Comment #4 from joe@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.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-215836-8-vCino47fYj>