From: Yong Zhang <yong.zhang0@gmail.com>
To: Venki Pallipadi <venki@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Suresh Siddha <suresh.b.siddha@intel.com>,
Aaron Durbin <adurbin@google.com>, Paul Turner <pjt@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] Extend mwait idle to optimize away IPIs when possible
Date: Mon, 13 Feb 2012 13:34:10 +0800 [thread overview]
Message-ID: <20120213053410.GB24636@zhy> (raw)
In-Reply-To: <CABeCy1aUj9MM8YabvvQCYYFm4FNMsomU3PZ1ZyoKikL9hnc9uQ@mail.gmail.com>
On Fri, Feb 10, 2012 at 06:11:58PM -0800, Venki Pallipadi wrote:
> On Fri, Feb 10, 2012 at 11:19 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Mon, 2012-02-06 at 12:42 -0800, Venkatesh Pallipadi wrote:
> >> smp_call_function_single and ttwu_queue_remote sends unconditional IPI
> >> to target CPU. However, if the target CPU is in mwait based idle, we can
> >> do IPI-less wakeups using the magical powers of monitor-mwait.
> >
> > So I was thinking, why not change native_smp_send_reschedule() and
> > native_send_call_func_single_ipi() and keep the change entirely inside
> > the arch?
> >
> > Ideally its only APIC/idle that know about this detail, the scheduler
> > (or other consumers) really don't care about how the other cpu comes to
> > run the callback.
> >
>
> OK. Moving most of this into arch code will be cleaner. But, Yong
> mentioned in this thread that he was looking to do something similar
> on MIPS. So, we may end up with some code duplication though..
Yeah, most of the things could be shared. Such as the added logic when
return from idle and the hooks into ttwu_queue_remote() and
generic_exec_single().
BTW, I think we should also let the arch provide a wrapper for
TIF_IPI_PENDING, such as tsk_ipi_pending().
Thanks,
Yong
> --
> 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/
--
Only stand for myself
next prev parent reply other threads:[~2012-02-13 5:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 20:42 [RFC] Extend mwait idle to optimize away IPIs when possible Venkatesh Pallipadi
2012-02-06 21:02 ` Peter Zijlstra
2012-02-06 21:26 ` Venki Pallipadi
2012-02-07 0:26 ` David Daney
2012-02-07 1:24 ` H. Peter Anvin
2012-02-07 1:34 ` David Daney
2012-02-07 1:45 ` H. Peter Anvin
2012-02-07 2:03 ` Venki Pallipadi
2012-02-07 2:24 ` Suresh Siddha
2012-02-07 21:39 ` Venki Pallipadi
2012-02-08 6:51 ` Yong Zhang
2012-02-08 23:28 ` Venki Pallipadi
2012-02-09 2:18 ` Yong Zhang
2012-02-10 2:17 ` Venki Pallipadi
2012-02-13 5:27 ` Yong Zhang
2012-02-10 19:19 ` Peter Zijlstra
2012-02-11 2:11 ` Venki Pallipadi
2012-02-11 3:09 ` Peter Zijlstra
2012-02-13 5:34 ` Yong Zhang [this message]
2012-02-14 13:52 ` Peter Zijlstra
2012-02-15 1:39 ` Yong Zhang
2012-02-15 2:32 ` Venki Pallipadi
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=20120213053410.GB24636@zhy \
--to=yong.zhang0@gmail.com \
--cc=adurbin@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=venki@google.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;
as well as URLs for NNTP newsgroup(s).