Read Copy Update

John Baldwin jhb at FreeBSD.org
Tue Mar 16 09:21:10 PST 2004


On Tuesday 16 March 2004 11:33 am, Bosko Milekic wrote:
> 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?

The jhb_acpipci_crit branch.  Like I said, though, it doesn't boot.  There are 
lots of implementation notes in //depot/user/jhb/acpicpi_crit/notes.

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


More information about the freebsd-arch mailing list