mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luming Yu <luming.yu@gmail.com>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	Arjan van de Ven <arjan@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC patch] Use IPI_shortcut for lapic timer broadcast
Date: Fri, 3 Jul 2009 10:04:48 +0800	[thread overview]
Message-ID: <3877989d0907021904g1154ad44m7da3888f9c01416@mail.gmail.com> (raw)
In-Reply-To: <1246580583.4534.32443.camel@localhost.localdomain>

On Fri, Jul 3, 2009 at 8:23 AM, Pallipadi,
Venkatesh<venkatesh.pallipadi@intel.com> wrote:
> On Tue, 2009-06-30 at 00:01 -0700, Luming Yu wrote:
>> 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 <luming.yu@intel.com>
>>
>>  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
>>  }
>
> I dont think it is a good idea to pay the penalty for cpumask_weight and
> num_online_cpus, for the more common tickless case to fix this problem
> with less common no tickeless case.

In NO_HZ, the lapic_timer_broadcast is rare thing too...

>
> We should be able to add an interface to get tick_nohz_enabled from
> tick-sched.c and use that instead.

If we use send_IPI_all just for NO_HZ is disabled, we will leave a corner case
here that lapic_timer_broadcast could be really really being actively used even
NO_HZ enabled... if this will never happen, I would agree with you..

Thanks,
LUming

      reply	other threads:[~2009-07-03  2:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-29  6:47 Luming Yu
2009-06-29  7:20 ` Ingo Molnar
2009-06-29  8:04   ` Luming Yu
2009-06-29  8:16     ` Ingo Molnar
2009-06-29  8:21       ` Luming Yu
2009-06-29  8:30         ` Ingo Molnar
2009-06-29  8:43           ` Luming Yu
2009-06-29  9:15             ` Ingo Molnar
2009-06-29 14:01             ` Arjan van de Ven
2009-06-29 20:34 ` Pallipadi, Venkatesh
2009-06-30  7:01   ` Luming Yu
2009-07-03  0:23     ` Pallipadi, Venkatesh
2009-07-03  2:04       ` Luming Yu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3877989d0907021904g1154ad44m7da3888f9c01416@mail.gmail.com \
    --to=luming.yu@gmail.com \
    --cc=arjan@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®