From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [question] what's the purpose of smp_send_event_check_mask? Date: Thu, 19 Jan 2012 09:49:35 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kai Huang Cc: Xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 19/01/2012 09:26, "Kai Huang" wrote: > On Thu, Jan 19, 2012 at 5:14 PM, Keir Fraser wrote: >> = >> On 19/01/2012 09:02, "Kai Huang" wrote: >> = >>> Hi, >>> = >>> I see cpu_raise_softirq calls smp_send_event_check_mask after setting >>> softirq bit for target CPU if target CPU is not the current CPU. I >>> thought smp_send_event_check_mask will send IPI to target CPU and then >>> trigger target CPU to run pending irq, but seems >>> smp_send_event_check_mask does nothing but jast ACK the IPI. So what's >>> the purpose of this function? Why do we need this function? >> = >> Xen always checks softirqs on return from interrupt context to guest >> context, and also in its idle loopon wakeup. Hence the event_check inter= rupt >> handler itself doesn't need to do anything. > = > Does this mean if raising softirq for remote CPU, we don't need to > call do_softirq explicitly on target CPU? That's right, it's called automatically from various places, which you can grep for. -- Keir > -cody > = >> = >>> BTW, would someone gives me some knowledge when will the pending irqs >>> be triggered to run after setting up the pending bits? Seems normally >>> they are called asynchronously. >> = >> Yes, of course it's asynchronous, the smp_send_event_check_mask interrup= t is >> just to make sure it happens "soon". >> = >> =A0-- Keir >> = >>> Thanks in advance! >>> = >>> -cody >>> = >>> _______________________________________________ >>> Xen-devel mailing list >>> Xen-devel@lists.xensource.com >>> http://lists.xensource.com/xen-devel >> = >> =