Read Copy Update

Bosko Milekic bmilekic at technokratis.com
Tue Mar 16 08:35:53 PST 2004


On Tue, Mar 16, 2004 at 10:12:09AM -0500, John Baldwin wrote:
> > I was imagining a a pcpu flag which was a 'soft cli', i.e. if a cpu
> > fields an interrupt and the soft cli flag is set, it just clears the
> > interrupt flag in the trapframe and returns. It all works out the same
> > in the end.

  No because if you're in the middle of modifying a pcpu flag and you
  take an interrupt you may get scheduled over to another CPU.  You
  would also have to temporarily pin down the thread to the current CPU
  unless you do it with an in-thread flag.

  By the way, the point of all this is that with a combination of
  soft-disables and short-term scheduler pinning we should be able to
  take the common memory allocation case in UMA out of any lock
  requirements (lockless in common case).

> I have this partly implemented, but because the VM86 code really sucks (it 
> just always enables interrupts) the invariants checks I have don't make it to 
> single user mode.  I haven't decided what to do about VM86 yet, and I also 
> haven't handled the problem of switching away from interrupt context (for 
> ithread preemption) and switching back and making that all work correctly w/o 
> possibly dropping interrupts.

  Do you have your current changes in a separate p4 repo somewhere?

> -- 
> John Baldwin <john at baldwin.cx>  <><  http://www.baldwin.cx/~john/
> "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org

-- 
Bosko Milekic  *  bmilekic at technokratis.com  *  bmilekic at FreeBSD.org
TECHNOkRATIS Consulting Services  *  http://www.technokratis.com/

"It is impossible for anyone to begin to learn what he believes
 he already knows."  -- Epictetus (c.a.d. 55-c135)


More information about the freebsd-arch mailing list