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] Only include online cpus in cpu_mask_to_apicid_f

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, "Sheng Yang" <sheng.yang@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Only include online cpus in cpu_mask_to_apicid_flat
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 31 Aug 2010 09:55:28 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 31 Aug 2010 01:56:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201008311519.02067.sheng.yang@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <201008311519.02067.sheng.yang@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 31.08.10 at 09:19, "Yang, Sheng" <sheng.yang@xxxxxxxxx> wrote:
> The former fix of __bind_irq_vector() can ensure the destination field in 
> IOAPIC 
> redirection table is valid by limiting the cpu_mask to the online cpus. But 
> there 
> is another issue that some interrupts(timer and serial) would like to be 
> delivered to all online cpus with LPR delivery mode. But at the time of 
> bind_irq_vector() called, there were only one cpu(BSP) was online, so the 
> interrupts would always be delivered to BSP. This method can work but not 
> the best 
> one.
> 
> In fact, setup_ioapic_dest() would be called to reprogram the IOAPIC 
> redirection 
> table to follow "irq_cfg->cpu_mask", after SMP initialization work was 
> done. So I think the better choice is to keep the original value in irq_cfg-
>>cpu_mask, and just make sure the value we wrote to the IOAPIC redirection 
> table 
> is valid. Then modifying cpu_mask_to_apicid_flat() seems like a better idea.

Why would you need to modify only this function, but not the other
variants? If a CPU in the passed in mask can be offline, then
first_cpu() (as used in the other variants) can return an offline CPU,
and you don't want to program such into an RTE.

> This patch would revert the fix of __bind_irq_vector(), and modify 
> cpu_mask_to_apicid_flat() to contain only online CPUs.

Jan


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