[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] SCHEDOP_block_masked

On Fri, Mar 10, 2006 at 11:03:17AM +0000, Keir Fraser wrote:

> >Introduce SCHEDOP_block_masked, which blocks a VCPU without enabling
> >interrupts.
> >
> >We need this as there are circumstances where we cannot take 
> >interrupts,
> >and are polling in a tight loop. In particular in Solaris's kernel
> >debugger console input. We don't want to burn CPU in a domU, but we're
> >not in a situation where we can safely use SCHEDOP_block.
> Modified do_block() still checks event_pending, even if you do not 
> clear the event_mask. Presumably you don't really want to do that?

It uses event_pending() which will be zero:

     76 #define event_pending(v)                        \
     77     (!!(v)->vcpu_info->evtchn_upcall_pending &  \
     78       !(v)->vcpu_info->evtchn_upcall_mask)

But, now you mention it, I wonder if this wouldn't be better taking an
event channel to check on before sleeping (though we'd still wake on
any). This would avoid the small race (which doesn't really matter in
the context we've been using this).


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.