Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1235219
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 01/11] sched: Simplify INIT_PREEMPT_COUNT |
| Date | 2015-09-29 17:20 +0200 |
| Message-ID | <qe4Rc-1Nk-35@gated-at.bofh.it> (permalink) |
| References | <qdZHQ-2IS-3@gated-at.bofh.it> <qdZHQ-2IS-15@gated-at.bofh.it> <qe4Hw-1BQ-11@gated-at.bofh.it> <qe4Hw-1BQ-13@gated-at.bofh.it> <qe4Hw-1BQ-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Sep 29, 2015 at 11:00:49AM -0400, Steven Rostedt wrote: > > [ Resend, with the Cc list back ] You seem to have a hard time with these buttons today ;-) > Hmm, I just looked closer and I'm wondering if this still works? > > We have: > > #ifdef CONFIG_PREEMPT_COUNT > #define PREEMPT_DISABLED (1 + PREEMPT_ENABLED) > #else > #define PREEMPT_DISABLED PREEMPT_ENABLED > #endif > > Now if we just remove the PREEMPT_ACTIVE from the INIT_PREEMPT_COUNT, > when CONFIG_PREEMPT_COUNT is not set, wouldn't a _cond_resched() in > boot up schedule? Good point, PREEMPT_COUNT isn't required for voluntary preemption; when I tested the voluntary build nothing bad happened, but that could have been luck of course. So what we can do is use an unconditional 1 for INIT_PREEMPT_COUNT, such that the init task will have a raised preempt_count() during boot, even on !PREEMPT_COUNT kernels. But that means we cannot use INIT_PREEMPT_COUNT for init_task_preempt_count() and such like, as I wanted to. I'll make FORK_PREEMPT_COUNT for that instead. -- 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 | Find similar | Unroll thread
[RFC][PATCH 01/11] sched: Simplify INIT_PREEMPT_COUNT Peter Zijlstra <peterz@infradead.org> - 2015-09-29 11:50 +0200
[tip:sched/core] sched/core: Simplify INIT_PREEMPT_COUNT tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2015-09-29 12:40 +0200
Re: [RFC][PATCH 01/11] sched: Simplify INIT_PREEMPT_COUNT Frederic Weisbecker <fweisbec@gmail.com> - 2015-09-29 15:30 +0200
Re: [RFC][PATCH 01/11] sched: Simplify INIT_PREEMPT_COUNT Steven Rostedt <rostedt@goodmis.org> - 2015-09-29 16:50 +0200
Re: [RFC][PATCH 01/11] sched: Simplify INIT_PREEMPT_COUNT Peter Zijlstra <peterz@infradead.org> - 2015-09-29 17:00 +0200
Re: [RFC][PATCH 01/11] sched: Simplify INIT_PREEMPT_COUNT Steven Rostedt <rostedt@goodmis.org> - 2015-09-29 17:10 +0200
Re: [RFC][PATCH 01/11] sched: Simplify INIT_PREEMPT_COUNT Peter Zijlstra <peterz@infradead.org> - 2015-09-29 17:20 +0200
csiph-web