linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Len Brown <lenb@kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	linux-next@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the tip tree
Date: Mon, 20 Jan 2014 10:55:32 +0100	[thread overview]
Message-ID: <20140120095532.GX31570@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <52DCEAF4.3040902@zytor.com>

On Mon, Jan 20, 2014 at 01:23:00AM -0800, H. Peter Anvin wrote:
> On 01/20/2014 01:16 AM, Peter Zijlstra wrote:
> >>
> >> The difference is the STI!
> > 
> > So do the local_irq_enable(); mwait_idle_with_hints(0,0); thing.
> > 
> 
> No, that doesn't work.  The point of __sti_mwait() is that the STI is
> the instruction immediately before the MWAIT, just like the combination
> STI;HLT.  Since the execution of STI is always delayed by one
> instruction, these two instructions form an atomic unit, which means
> interrupts are enabled "after" we have entered MWAIT or HLT.
> 
> > But that's entirely different from saying that core2 doesn't support
> > mwait_idle_with_hints because its a different instruction.
> 
> If you think of STI;MWAIT as a "compound instruction" it kind of is.
> Newer CPUs don't have to play that trick anymore, because there is a
> flag to MWAIT which breaks us out of MWAIT on a pending interrupt
> without having to actually enable interrupts at the point of the MWAIT.

Ok, so I still don't get the problem of enabling interrupts early.

If we enable them early we can get interrupts; which afaict fall into
two groups, those that do and do not set NEED_RESCHED.

For those that do not set NEED_RESCHED, we'd have woken from MWAIT/HLT
and looped right back into it, so receiving those early -- before
actually calling MWAIT/HLT seems like a NO-OP.

For those setting NEED_RESCHED, we test NEED_RESCHED in all the right
places.

 - current_set_polling_and_test(), we test need_resched after telling
   remote CPUs they don't need to send interrupts because we're polling
   for it -- the remote cpus set NEED_RESCHED before testing if we're
   polling for it.

 - we test NEED_RESCHED after setting up the monitor and before calling
   MWAIT. Therefore, if an interrupt would happen right before we call
   MWAIT, the monitor is already set and the MWAIT does an immediate
   exit.

AFAICT we simply cannot get stuck and miss a NEED_RESCHED this way.




  parent reply	other threads:[~2014-01-20  9:56 UTC|newest]

Thread overview: 359+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16  3:58 linux-next: build failure after merge of the tip tree Stephen Rothwell
2014-01-16 12:19 ` Peter Zijlstra
2014-01-16 20:46   ` Stephen Rothwell
2014-01-16 22:25     ` Peter Zijlstra
2014-01-16 22:34       ` Stephen Rothwell
2014-01-16 22:51         ` H. Peter Anvin
2014-01-17  3:45           ` Stephen Rothwell
2014-01-18  9:46             ` Mike Galbraith
2014-01-18 12:44               ` Peter Zijlstra
2014-01-18 14:06                 ` Sabrina Dubroca
2014-01-18 15:21                 ` Mike Galbraith
2014-01-18 19:14                   ` H. Peter Anvin
2014-01-18 21:54                     ` Peter Zijlstra
2014-01-20  3:51               ` Stephen Rothwell
2014-01-20  8:42                 ` Sedat Dilek
2014-01-20  8:46                   ` Sedat Dilek
2014-01-20 13:10                     ` Stephen Rothwell
2014-01-20 15:28                       ` Sedat Dilek
2014-01-20  9:17                   ` Mike Galbraith
2014-01-20  9:25                     ` Sedat Dilek
2014-01-20  9:48                       ` Mike Galbraith
2014-01-20  4:45     ` Len Brown
2014-01-20  8:26       ` Peter Zijlstra
2014-01-20  8:56         ` H. Peter Anvin
2014-01-20  9:16           ` Peter Zijlstra
2014-01-20  9:23             ` H. Peter Anvin
2014-01-20  9:29               ` Ingo Molnar
2014-01-20 21:39                 ` Len Brown
2014-01-20 21:51                   ` Peter Zijlstra
2014-01-21  3:26                     ` Mike Galbraith
2014-01-21 10:47                     ` Ingo Molnar
2014-01-20  9:55               ` Peter Zijlstra [this message]
2014-01-20 11:00                 ` H. Peter Anvin
2014-01-20 11:05                   ` Peter Zijlstra
2014-01-16 20:56   ` H. Peter Anvin
2014-01-20  1:00 ` Len Brown
2014-01-20  1:07   ` H. Peter Anvin
2014-01-20  8:30   ` Peter Zijlstra
2014-01-20 10:13     ` Peter Zijlstra
2014-01-20 10:19       ` H. Peter Anvin
2014-01-20 11:06         ` Peter Zijlstra
  -- strict thread matches above, loose matches on Subject: below --
2024-04-09  2:49 Stephen Rothwell
2024-04-09  6:32 ` Adrian Hunter
2024-01-29  1:22 Stephen Rothwell
2024-01-29  8:14 ` Bartosz Golaszewski
2023-08-15  5:29 Stephen Rothwell
2023-08-15 15:54 ` Edgecombe, Rick P
2023-06-20  4:53 Stephen Rothwell
2023-04-21 16:03 broonie
2023-04-19 18:21 linux-next: Build " broonie
2023-04-19 18:50 ` Borislav Petkov
2022-12-13  1:40 linux-next: build " Stephen Rothwell
2022-12-15 16:34 ` Ricardo Neri
2022-12-05  1:15 Stephen Rothwell
2022-12-02  0:26 Stephen Rothwell
2022-12-02  1:33 ` Benjamin Gray
2022-12-02  9:37 ` Michael Ellerman
2022-03-15  3:06 Stephen Rothwell
2022-03-15  5:23 ` Stephen Rothwell
2022-03-15  5:37   ` Stephen Rothwell
2022-03-15  8:42     ` Stephen Rothwell
2022-03-15  9:22     ` Peter Zijlstra
2022-03-15 10:41       ` Stephen Rothwell
2021-12-13 17:08 broonie
2021-11-26  3:52 Stephen Rothwell
2021-11-26 10:01 ` Arnd Bergmann
2021-12-01 22:05   ` Stephen Rothwell
2021-12-01 22:17     ` Thomas Gleixner
2021-12-01 22:19       ` Thomas Gleixner
2021-12-01 22:31         ` Stephen Rothwell
2021-10-25  4:11 Stephen Rothwell
2021-10-25  7:42 ` Borislav Petkov
2021-10-25  7:58   ` Stephen Rothwell
2021-10-25  8:37     ` Borislav Petkov
2021-10-28  5:10 ` Stephen Rothwell
2021-10-28  8:17   ` Borislav Petkov
2021-10-18  6:23 Stephen Rothwell
2021-10-18  6:45 ` Qi Zheng
2021-10-06  2:58 Stephen Rothwell
2021-10-06  9:31 ` Borislav Petkov
2021-10-06  9:54   ` Stephen Rothwell
2021-10-06  9:56     ` Borislav Petkov
2021-06-28  3:36 Stephen Rothwell
2021-06-28  5:42 ` Ingo Molnar
2021-05-13  2:05 Stephen Rothwell
2021-05-13 10:51 ` Ingo Molnar
2021-05-13 11:11   ` H. Peter Anvin
2021-03-22  3:37 Stephen Rothwell
2021-03-22  9:00 ` Borislav Petkov
2021-03-26  8:57   ` Sedat Dilek
2021-03-26 13:11     ` Borislav Petkov
2021-03-27 11:50       ` Sedat Dilek
2021-03-27 21:26         ` Stephen Rothwell
2021-03-23  8:34 ` Sedat Dilek
2021-03-17  4:08 Stephen Rothwell
2021-03-17 10:54 ` Borislav Petkov
2021-03-17 16:22   ` Ian Rogers
2021-03-17 18:02     ` Borislav Petkov
2021-03-17 18:49       ` Stephen Rothwell
2021-03-17 19:18         ` Borislav Petkov
2021-03-17 20:04           ` Ingo Molnar
2021-03-17 21:54             ` Stephen Rothwell
2021-03-02 23:38 Stephen Rothwell
2021-03-03  9:44 ` Peter Zijlstra
2021-03-03 11:29   ` Stephen Rothwell
2021-01-14  4:11 Stephen Rothwell
2021-01-14 10:07 ` Borislav Petkov
2020-11-27  4:10 Stephen Rothwell
2020-11-27 10:11 ` Ingo Molnar
2020-11-09  3:34 Stephen Rothwell
2020-10-09  4:28 Stephen Rothwell
2020-10-09  6:47 ` Vasily Gorbik
2020-09-08  9:12 Stephen Rothwell
2020-09-08 10:57 ` peterz
2020-09-03  2:35 Stephen Rothwell
2020-09-03  3:51 ` Ingo Molnar
2020-09-03  4:44   ` Stephen Rothwell
2020-08-03  5:45 Stephen Rothwell
2020-07-31  5:53 Stephen Rothwell
2020-07-31  9:57 ` Ingo Molnar
2020-07-31 10:02   ` Stephen Rothwell
2020-06-22  1:37 Stephen Rothwell
2020-06-30  2:54 ` Stephen Rothwell
2020-07-07  2:33   ` Stephen Rothwell
2020-07-14  3:50     ` Stephen Rothwell
2020-07-20  5:37       ` Stephen Rothwell
2020-06-21  6:33 Stephen Rothwell
2020-06-21 10:53 ` Borislav Petkov
2020-06-22  1:38   ` Stephen Rothwell
2020-05-21 17:31 Stephen Rothwell
2020-05-21 17:35 ` Will Deacon
2020-05-22  7:17   ` Stephen Rothwell
2020-05-22  7:49     ` Stephen Rothwell
2020-05-23  0:12       ` Paul E. McKenney
2020-05-23  6:46         ` Borislav Petkov
2020-05-23  9:54           ` Thomas Gleixner
2020-05-23 15:06             ` Paul E. McKenney
2020-05-23 19:05               ` Thomas Gleixner
2020-05-23 21:23                 ` Paul E. McKenney
2020-05-25  0:37                   ` Paul E. McKenney
2020-05-25  8:20                     ` Marco Elver
2020-05-25 16:13                       ` Paul E. McKenney
2020-05-15  6:00 Stephen Rothwell
2020-03-30  3:35 Stephen Rothwell
2020-03-30  3:53 ` H.J. Lu
2020-03-30  4:08   ` Stephen Rothwell
2020-03-30  7:48     ` Borislav Petkov
2020-03-30  8:04       ` Michael Ellerman
2020-03-30  8:16         ` Borislav Petkov
2020-03-30 11:34           ` H.J. Lu
2020-03-26  2:52 Stephen Rothwell
2020-03-26 10:59 ` Qais Yousef
2020-04-01  1:14 ` Stephen Rothwell
2020-04-03  8:15   ` Baolin Wang
2020-04-03  9:50     ` Sebastian Reichel
2019-11-21  3:54 Stephen Rothwell
2019-11-21  8:36 ` Peter Zijlstra
2019-11-21 18:37 ` Alex Deucher
2019-11-18  3:11 Stephen Rothwell
2019-11-18  9:49 ` Jiri Slaby
2019-11-18 12:49 ` Borislav Petkov
2019-10-21  2:13 Stephen Rothwell
2019-10-21  5:51 ` Ingo Molnar
2019-10-21  6:37   ` Stephen Rothwell
2019-10-10  2:14 Stephen Rothwell
2019-10-10  8:02 ` Ingo Molnar
2019-10-10 11:23   ` Stephen Rothwell
2019-10-10 13:44     ` Daniel Vetter
2019-11-06  2:53 ` Stephen Rothwell
2019-11-27 23:39   ` Stephen Rothwell
2019-08-29  6:20 Stephen Rothwell
2019-08-29  7:46 ` Peter Zijlstra
2019-08-29 12:24   ` Thomas Gleixner
2019-08-29 13:04     ` Peter Zijlstra
2019-08-08  4:48 Stephen Rothwell
2019-08-01  3:38 Stephen Rothwell
2019-07-09  6:54 Stephen Rothwell
2019-07-10  0:01 ` Stephen Rothwell
2019-07-10 18:21   ` Ilya Dryomov
2019-07-10 21:38     ` Stephen Rothwell
2019-07-02  5:33 Stephen Rothwell
2019-07-02 10:28 ` David Sterba
2019-07-02 12:57   ` Stephen Rothwell
2019-07-08  6:50   ` Stephen Rothwell
2019-06-25  6:04 Stephen Rothwell
2019-06-25  6:23 ` Kalle Valo
2019-06-25  6:26   ` Thomas Gleixner
2019-06-25  6:36   ` Stephen Rothwell
2019-06-25  6:51     ` Kalle Valo
2019-06-25  6:56     ` Thomas Gleixner
2019-06-25  7:47       ` Kalle Valo
2019-07-09  0:09 ` Stephen Rothwell
2019-07-09  3:46 ` Stephen Rothwell
2018-11-06  0:43 Stephen Rothwell
2018-08-08 23:24 Stephen Rothwell
2018-08-09  9:41 ` Joerg Roedel
2018-04-03  5:41 Stephen Rothwell
2018-04-03  9:30 ` Peter Zijlstra
2018-04-03 12:39 ` David Howells
2018-04-03 12:42   ` Peter Zijlstra
2018-04-03 12:41 ` David Howells
2017-11-08  2:47 Stephen Rothwell
2017-11-08  3:01 ` Josh Poimboeuf
2017-11-08  7:35   ` Stephen Rothwell
2017-11-08  9:18   ` Ingo Molnar
2017-11-08 12:14     ` Stephen Rothwell
2017-11-09  6:18       ` Ingo Molnar
2017-11-08 13:17     ` Josh Poimboeuf
2017-11-09  3:03     ` Stephen Rothwell
2017-11-01 10:51 Stephen Rothwell
2017-11-01 14:32 ` Kees Cook
2017-06-28  3:43 Stephen Rothwell
2017-06-28  4:00 ` jeffy
2017-06-28  4:24   ` Stephen Rothwell
2017-07-03  3:01 ` Stephen Rothwell
2017-05-02  3:17 Stephen Rothwell
2017-04-24  3:32 Stephen Rothwell
2017-04-24  5:31 ` Ingo Molnar
2017-04-05  3:36 Stephen Rothwell
2017-04-05  7:24 ` Mikko Perttunen
2016-12-07  1:37 Stephen Rothwell
2016-12-07  7:45 ` Ingo Molnar
2016-12-07  8:12   ` Jiri Olsa
2016-12-07 14:49     ` Arnaldo Carvalho de Melo
2016-12-07 18:56       ` Ingo Molnar
2016-12-07 20:32         ` Stephen Rothwell
2016-11-17  3:22 Stephen Rothwell
2016-09-29  3:20 Stephen Rothwell
2016-09-29 12:25 ` Rafael J. Wysocki
2016-09-29 15:54   ` Chen, Yu C
2016-09-29 20:50     ` Rafael J. Wysocki
2016-09-21  3:23 Stephen Rothwell
2016-09-21  6:44 ` Viresh Kumar
2016-07-18  8:29 Stephen Rothwell
2016-07-18 14:27 ` Paul Gortmaker
2016-07-18  5:15 Stephen Rothwell
2016-04-18  3:03 Stephen Rothwell
2016-04-14  2:14 Stephen Rothwell
2016-04-14 12:35 ` Arnaldo Carvalho de Melo
2016-04-14 12:55   ` Michael Ellerman
2016-04-14 15:08     ` Arnaldo Carvalho de Melo
2016-04-15 21:15 ` Arnaldo Carvalho de Melo
2016-04-15 21:28   ` Arnaldo Carvalho de Melo
2016-04-17 12:12     ` Jiri Olsa
2016-04-17 13:04       ` Jiri Olsa
2016-04-18 13:24         ` Arnaldo Carvalho de Melo
2016-04-18 13:28           ` Jiri Olsa
2016-03-01  1:29 Stephen Rothwell
2016-03-01  7:07 ` Ingo Molnar
2016-03-01  7:28   ` Sedat Dilek
2016-03-01  7:39     ` H. Peter Anvin
2016-03-01  8:41       ` Sedat Dilek
2016-03-01  9:45       ` Ingo Molnar
2016-03-01  9:40   ` Stephen Rothwell
2015-09-16  1:30 Stephen Rothwell
2015-09-16  4:53 ` David Miller
2015-09-16  0:12 Stephen Rothwell
2015-09-16  6:16 ` Jiri Olsa
2015-09-16  6:38   ` Jiri Olsa
2015-09-16  7:30     ` Stephen Rothwell
2015-09-16 14:17       ` Arnaldo Carvalho de Melo
2015-09-17  0:34   ` Stephen Rothwell
2015-09-30  2:56     ` Stephen Rothwell
2015-09-30  6:08       ` Jiri Olsa
2015-09-30  6:17         ` Stephen Rothwell
2015-07-28  5:33 Stephen Rothwell
2015-07-28 16:34 ` Luis R. Rodriguez
2015-07-28 18:17   ` Luis R. Rodriguez
2015-07-28  2:43 Stephen Rothwell
2015-07-28  8:41 ` Sudeep Holla
2015-07-28  9:43   ` Gregory CLEMENT
2015-07-15  1:01 Stephen Rothwell
2015-07-08  0:56 Stephen Rothwell
2015-07-08  9:40 ` Thomas Gleixner
2015-06-12 10:51 Michael Ellerman
     [not found] ` <BY1PR0701MB17063C25D627AF725A9E0D46FEBB0@BY1PR0701MB1706.namprd07.prod.outlook.com>
2015-06-12 21:22   ` David Miller
2015-06-12 21:25     ` Chickles, Derek
2015-06-09  7:15 Stephen Rothwell
2015-04-07  7:18 Stephen Rothwell
2015-04-07  8:48 ` Ingo Molnar
2015-04-07  8:56   ` Daniel Borkmann
2015-04-07  9:05     ` Stephen Rothwell
2015-04-07 11:13       ` Daniel Borkmann
2015-04-07 16:18         ` Alexei Starovoitov
2015-04-07 19:54           ` Daniel Borkmann
2015-04-08  5:03             ` Stephen Rothwell
2015-04-15  1:25               ` Stephen Rothwell
2015-04-07  8:53 ` Peter Zijlstra
2015-03-30  6:13 Stephen Rothwell
2015-03-30  7:15 ` Russell King - ARM Linux
2015-03-30  8:08   ` Stephen Rothwell
2015-03-30 14:57     ` Nathan Lynch
2015-03-30 15:08       ` Russell King - ARM Linux
2015-03-30 15:24         ` Nathan Lynch
2015-04-13 23:34         ` Stephen Rothwell
2014-07-25  4:45 Stephen Rothwell
2014-07-29 23:56 ` Stephen Rothwell
2014-07-30  3:10   ` John Stultz
2014-06-04  6:05 Stephen Rothwell
2014-06-04 10:49 ` Thomas Gleixner
2014-06-04 14:46   ` Linus Torvalds
2014-06-04 16:23   ` Olof Johansson
2014-06-04 20:02     ` Thomas Gleixner
2014-05-23  7:14 Stephen Rothwell
2014-05-29  1:38 ` Stephen Rothwell
2014-04-24  3:51 Stephen Rothwell
2014-02-12  2:41 Stephen Rothwell
2014-02-12  4:48 ` Preeti U Murthy
2014-02-11  3:00 Stephen Rothwell
2014-01-14  3:26 Stephen Rothwell
2014-01-14 14:14 ` Peter Zijlstra
2014-01-14 19:06   ` Mikulas Patocka
2014-01-14 20:05     ` Peter Zijlstra
2014-01-14 21:43       ` Mikulas Patocka
2014-01-14 22:03         ` Rafael J. Wysocki
2014-01-14 21:52           ` Mikulas Patocka
2014-01-14 22:18             ` Rafael J. Wysocki
2014-01-16 12:14         ` Peter Zijlstra
2013-10-28  9:24 Stephen Rothwell
2013-10-28 10:18 ` Thierry Reding
2013-10-28 10:26   ` Ingo Molnar
2013-10-29  6:00     ` Stephen Rothwell
2013-04-29  5:45 Stephen Rothwell
2013-02-14  2:30 Stephen Rothwell
2013-02-21  2:04 ` Stephen Rothwell
2013-02-02  5:04 Stephen Rothwell
2012-08-16  3:12 Stephen Rothwell
2012-08-16 19:46 ` Paul E. McKenney
2012-08-17  0:56   ` Stephen Rothwell
2012-08-17 11:50     ` Paul E. McKenney
2012-08-20  4:54       ` Stephen Rothwell
2012-08-20 15:09         ` Paul E. McKenney
2012-03-08  4:21 Stephen Rothwell
2012-03-08 18:00 ` Greg KH
2012-03-20 22:00   ` Stephen Rothwell
2012-03-20 22:32     ` Greg KH
2012-03-21  9:53     ` Alan Cox
2012-03-21 12:19     ` Alan Cox
2012-03-21 12:29       ` Stephen Rothwell
2012-02-24  3:47 Stephen Rothwell
2012-02-24  3:34 Stephen Rothwell
2011-10-05  6:25 Stephen Rothwell
2011-10-05  8:46 ` Peter Zijlstra
2011-10-11  6:15   ` Stephen Rothwell
2011-06-27  4:22 Stephen Rothwell
2011-06-28 10:55 ` Stijn Devriendt
2011-04-01  2:00 Stephen Rothwell
2011-01-31  4:42 Stephen Rothwell
2011-02-17  3:47 ` Stephen Rothwell
2011-02-17 13:18   ` Michal Marek
2011-02-17 15:02     ` Michal Marek
2011-02-17 17:11       ` Ingo Molnar
2011-02-17 22:47       ` Stephen Rothwell
2011-02-18  3:54         ` Stephen Rothwell
2010-10-19  5:13 Stephen Rothwell
2010-07-29  3:04 Stephen Rothwell
2010-05-10  4:49 Stephen Rothwell
2010-05-10  5:09 ` H. Peter Anvin
2010-03-12  4:00 Stephen Rothwell

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=20140120095532.GX31570@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /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).