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

Re: [Xen-devel] [PATCH v8.1 12/27] xsplice: Implement support for applying/reverting/replacing patches.

> >+/* Defines an outstanding patching action. */
> >+struct xsplice_work
> >+{
> >+    atomic_t semaphore;          /* Used for rendezvous. */
> >+    atomic_t irq_semaphore;      /* Used to signal all IRQs disabled. */
> Why do you, btw, need two of them? I would seem to me that having just one
> for both purposes should be fine.

The 'semaphore' is used to get all of the CPUs synced up in the code. Once
they have been synced up (so semaphore == total_cpus-1) we go to the next stage
where all of them disable their IRQs -- and the master patches. Once the 
is done all of them renable their IRQs.

I am not exactly sure how I would reuse the 'semaphore' on the second part of 
(disable IRQs).

Let me ponder this over the weekend with some crayons and paper..

Xen-devel mailing list



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