Date: Wed, 19 Jan 2022 10:50:15 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Vladimir Kondratyev <vladimir@kondratyev.su>, Konstantin Belousov <kostikbel@gmail.com>, Vladimir Kondratyev <wulf@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 02ea6033020e - main - LinuxKPI: Allow spin_lock_irqsave to be called within a critical section Message-ID: <f83b405b-43c9-2dd5-00f0-2dcceb7d132f@selasky.org> In-Reply-To: <540a6a93-3101-02e8-b86a-50caa19f9653@kondratyev.su> References: <202201182015.20IKFaWL053942@gitrepo.freebsd.org> <YechbCTSWuUs%2BNr5@kib.kiev.ua> <540a6a93-3101-02e8-b86a-50caa19f9653@kondratyev.su>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1/18/22 22:35, Vladimir Kondratyev wrote: > > Any ideas how to avoid it in a generic way? Hi, On a non-SMP system this will lead to deadlock. Is it possible you can pre-lock this spin lock earlier, so that it is already locked, so instead of while(trylock()); You have: assert (trylock() XXX) Or else, convert this particular lock to a native FreeBSD spinlock mutex. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f83b405b-43c9-2dd5-00f0-2dcceb7d132f>