Re: [patch 2/6] mmu_notifier: Callbacks to invalidate addressranges

From: Andrea Arcangeli
Date: Fri Feb 29 2008 - 15:17:56 EST


On Fri, Feb 29, 2008 at 11:55:17AM -0800, Christoph Lameter wrote:
> > post the invalidate in the mmio region of the device
> > smp_call_function()
> > while (mmio device wait-bitflag is on);
>
> So the device driver on UP can only operate through interrupts? If you are
> hogging the only cpu then driver operations may not be possible.

There was no irq involved in the above pseudocode, the irq if
something would run in the remote system. Still irqs can run fine
during the while loop like they run fine on top of
smp_call_function. The send-irq and the following spin-on-a-bitflag
works exactly as smp_call_function except this isn't a numa-CPU to
invalidate.

> And yes I would like to get rid of the mmu_rmap_notifiers altogether. It
> would be much cleaner with just one mmu_notifier that can sleep in all
> functions.

Agreed. I just thought xpmem needed an invalidate-by-page, but
I'm glad if xpmem can go in sync with the KVM/GRU/DRI model in this
regard.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/