WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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).

regards
john

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel