Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1235008
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH v2 12/11] sched: Add preempt_count invariant check |
| Date | 2015-09-29 14:10 +0200 |
| Message-ID | <qe1Tk-620-19@gated-at.bofh.it> (permalink) |
| References | <qdZHQ-2IS-3@gated-at.bofh.it> <qe0ud-3SL-1@gated-at.bofh.it> <qe0Xf-4Gw-11@gated-at.bofh.it> <qe1JD-5BG-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Sep 29, 2015 at 07:55:49AM -0400, Linus Torvalds wrote: > On Tue, Sep 29, 2015 at 6:56 AM, Peter Zijlstra <peterz@infradead.org> wrote: > > > > + * Initial preempt_count value; reflects the preempt_count schedule invariant > > + * which states that during schedule preempt_count() == 2. > > Is this actually *true*? > > preempt_count() is two only if preemption is enabled. But spinlocks do > not actually update the preemption count if there is no preemption, so > these kinds of checks and comments that aren't even inside #ifdef > CONFIG_PREEMPT seem to be actively misleading. > > I do believe that the preempt count is stable - but the actual value > would seem to depend on config options. Right, 2*PREEMPT_DISABLE_OFFSET is the 'right' number. That ends up being 0 for !PREEMPT_COUNT configs. I'll update the Changelog to be more accurate on this. -- 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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCH 00/11] sched: Killing PREEMPT_ACTIVE Peter Zijlstra <peterz@infradead.org> - 2015-09-29 11:50 +0200
[RFC][PATCH 12/11] sched: Add preempt_count invariant check Peter Zijlstra <peterz@infradead.org> - 2015-09-29 12:40 +0200
Re: [RFC][PATCH 12/11] sched: Add preempt_count invariant check Peter Zijlstra <peterz@infradead.org> - 2015-09-29 12:40 +0200
[RFC][PATCH v2 12/11] sched: Add preempt_count invariant check Peter Zijlstra <peterz@infradead.org> - 2015-09-29 13:10 +0200
Re: [RFC][PATCH v2 12/11] sched: Add preempt_count invariant check Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-29 14:00 +0200
Re: [RFC][PATCH v2 12/11] sched: Add preempt_count invariant check Peter Zijlstra <peterz@infradead.org> - 2015-09-29 14:10 +0200
Re: [RFC][PATCH 00/11] sched: Killing PREEMPT_ACTIVE Ingo Molnar <mingo@kernel.org> - 2015-09-29 12:40 +0200
csiph-web