svn commit: r329796 - head/sys/dev/vt
Andriy Gapon
avg at FreeBSD.org
Thu Feb 22 07:18:21 UTC 2018
On 22/02/2018 04:26, John Baldwin wrote:
> Author: jhb
> Date: Thu Feb 22 02:26:29 2018
> New Revision: 329796
> URL: https://svnweb.freebsd.org/changeset/base/329796
>
> Log:
> Avoid grabbing locks when grabbing the vt(4) console for DDB.
>
> Trying to grab locks during cngrab() when entering the debugger is
> deadlock prone as all other CPUs are already halted (and thus unable
> to release locks) when cngrab() is invoked. One could instead use
> try-locks. However, the case that the try-lock fails still has to
> be handled. In addition, if the try-lock works it doesn't provide
> any greater ordering guarantees than is already provided by entering
> and exiting DDB. It is simpler to define a simpler path for the
> case that the try-lock would fail and always use that when entering
> DDB. Messing with timers, etc. when entering DDB is dubious even if
> the try-lock succeeds.
>
> This patch attempts to use the smallest possible set of operations to
> grab the vt(4) console when entering DDB without using any locks.
>
> Reviewed by: emaste
> Tested by: Matthew Macy
> MFC after: 1 week
There are some additional, harder problems in that path:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213334
--
Andriy Gapon
More information about the svn-src-all
mailing list