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

Re: [PATCH] evtchn/Flask: pre-allocate node on send path



On Thu, Oct 1, 2020 at 12:05 PM Julien Grall <julien@xxxxxxx> wrote:
>
> Hi,
>
> On 24/09/2020 11:53, Jan Beulich wrote:
> > xmalloc() & Co may not be called with IRQs off, or else check_lock()
> > will have its assertion trigger about locks getting acquired
> > inconsistently. Re-arranging the locking in evtchn_send() doesn't seem
> > very reasonable, especially since the per-channel lock was introduced to
> > avoid acquiring the per-domain event lock on the send paths. Issue a
> > second call to xsm_evtchn_send() instead, before acquiring the lock, to
> > give XSM / Flask a chance to pre-allocate whatever it may need.
> >
> > As these nodes are used merely for caching earlier decisions' results,
> > allocate just one node in AVC code despite two potentially being needed.
> > Things will merely be not as performant if a second allocation was
> > wanted, just like when the pre-allocation fails.
> >
> > Fixes: c0ddc8634845 ("evtchn: convert per-channel lock to be IRQ-safe")
> > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> As discussed on the community call with one comment below:
>
> Acked-by: Julien Grall <jgrall@xxxxxxxxxx>

Tested-by: Jason Andryuk <jandryuk@xxxxxxxxx>
Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx>

Thanks,
Jason



 


Rackspace

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