Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754970AbZF3HBR (ORCPT ); Tue, 30 Jun 2009 03:01:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752026AbZF3HBG (ORCPT ); Tue, 30 Jun 2009 03:01:06 -0400 Received: from mail-ew0-f210.google.com ([209.85.219.210]:39451 "EHLO mail-ew0-f210.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbZF3HBG (ORCPT ); Tue, 30 Jun 2009 03:01:06 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=bHNgDlU3E9CWCbxNCNaayG/4A0a7cOfMhPNZXj0S77VhCuUod1l0jMsvoqkco5WKXt 3lYPtylJswhar5OcTKecu7Kf0APs56JK7PEFZdWS+AAFfDstZJxuOLfIJVTXd9QCuspL nt0oC+pEsWhAMv9YkAvyOHksZ0+ca0qY8KPxQ= MIME-Version: 1.0 In-Reply-To: <1246307644.4534.26298.camel@localhost.localdomain> References: <3877989d0906282347i311eb14bp80a7c80878219c31@mail.gmail.com> <1246307644.4534.26298.camel@localhost.localdomain> Date: Tue, 30 Jun 2009 15:01:07 +0800 Message-ID: <3877989d0906300001u2f185fb0lcab5614e245efc21@mail.gmail.com> Subject: Re: [RFC patch] Use IPI_shortcut for lapic timer broadcast From: Luming Yu To: "Pallipadi, Venkatesh" Cc: LKML , "Siddha, Suresh B" , Arjan van de Ven , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar Content-Type: multipart/mixed; boundary=0015174bee88f2b63d046d8b5eb1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3487 Lines: 85 --0015174bee88f2b63d046d8b5eb1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Thanks for review. How about the following patch? /**The patch is enclosed in text attachment** **Using web client to send the patch** **below is for review, please apply attached patch*/ Signed-off-by: Yu Luming apic.c | 5 ++++- apic_flat_64.c | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) --- linux-2.6.30-rc6/arch/x86/kernel/apic/apic.c.0 2009-06-29 23:45:05.000000000 -0600 +++ linux-2.6.30-rc6/arch/x86/kernel/apic/apic.c 2009-06-30 00:37:56.000000000 -0600 @@ -419,7 +419,10 @@ static void lapic_timer_broadcast(const struct cpumask *mask) { #ifdef CONFIG_SMP - apic->send_IPI_mask(mask, LOCAL_TIMER_VECTOR); + if (unlikely(cpumask_weight(mask) == num_online_cpus() -1)) + apic->send_IPI_all(LOCAL_TIMER_VECTOR); + else + apic->send_IPI_mask(mask, LOCAL_TIMER_VECTOR); #endif } --- linux-2.6.30-rc6/arch/x86/kernel/apic/apic_flat_64.c.0 2009-06-29 00:13:26.000000000 -0600 +++ linux-2.6.30-rc6/arch/x86/kernel/apic/apic_flat_64.c 2009-06-29 00:11:23.000000000 -0600 @@ -274,7 +274,12 @@ static void physflat_send_IPI_all(int vector) { - physflat_send_IPI_mask(cpu_online_mask, vector); + if (vector == NMI_VECTOR) { + physflat_send_IPI_mask(cpu_online_mask, vector); + } else { + __default_send_IPI_shortcut(APIC_DEST_ALLINC, + vector, apic->dest_logical); + } } static unsigned int physflat_cpu_mask_to_apicid(const struct cpumask *cpumask) --0015174bee88f2b63d046d8b5eb1 Content-Type: application/octet-stream; name="1.patch" Content-Disposition: attachment; filename="1.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fwk9vuvy0 LS0tIGxpbnV4LTIuNi4zMC1yYzYvYXJjaC94ODYva2VybmVsL2FwaWMvYXBpYy5jLjAJMjAwOS0w Ni0yOSAyMzo0NTowNS4wMDAwMDAwMDAgLTA2MDAKKysrIGxpbnV4LTIuNi4zMC1yYzYvYXJjaC94 ODYva2VybmVsL2FwaWMvYXBpYy5jCTIwMDktMDYtMzAgMDA6Mzc6NTYuMDAwMDAwMDAwIC0wNjAw CkBAIC00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2ljYWwpOworCX0KIH0KIAogc3RhdGljIHVuc2lnbmVkIGludCBw aHlzZmxhdF9jcHVfbWFza190b19hcGljaWQoY29uc3Qgc3RydWN0IGNwdW1hc2sgKmNwdW1hc2sp Cg== --0015174bee88f2b63d046d8b5eb1-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/