Date: Tue, 25 Nov 2014 00:42:58 +0900
   From: Masao Uebayashi <uebay...@gmail.com>

   On Mon, Nov 24, 2014 at 11:16 PM, Taylor R Campbell
   <campbell+netbsd-tech-k...@mumble.net> wrote:
   >    Date: Mon, 24 Nov 2014 15:26:21 +0900
   >    From: Masao Uebayashi <uebay...@gmail.com>
   >
   >    I think pserialize_read_{enter,exit}() should explicitly call
   >    KPREEMPT_{DISABLE,ENABLE}(), as is done in percpu_{getref,putref}().
   >
   > Not necessary -- splsoftserial is sufficient to prevent switching, and
   > is necessary to block the pserialize cross-call until the reader is
   > finished.

   I want stronger constraint than softint context.  Softint prevents
   threads from being preempted implicitly, but still allows to sleep.  I
   want pserialize(9)'ed readers to never sleep (critical section).
   KPREEMPT_DISABLE() (and kpreempt_disable()) sets l_noprempt.  Which
   seems the official way to declare entering critical section.

Different kinds of critical section.  Neither one actually prevents
sleep.  It would be nice if pserialize_read and percpu communicated
with ASSERT_SLEEPABLE, but that's not the case right now.

Reply via email to