[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 
patching
is done all of them renable their IRQs.

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

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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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