From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934683AbbI2Kdb (ORCPT ); Tue, 29 Sep 2015 06:33:31 -0400 Received: from terminus.zytor.com ([198.137.202.10]:39342 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934404AbbI2KdU (ORCPT ); Tue, 29 Sep 2015 06:33:20 -0400 Date: Tue, 29 Sep 2015 03:30:38 -0700 From: tip-bot for Peter Zijlstra Message-ID: Cc: torvalds@linux-foundation.org, hpa@zytor.com, efault@gmx.de, mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Reply-To: torvalds@linux-foundation.org, hpa@zytor.com, efault@gmx.de, peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de In-Reply-To: <20150929093519.706413197@infradead.org> References: <20150929093519.706413197@infradead.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/core: Simplify INIT_PREEMPT_COUNT Git-Commit-ID: aed586c2f11e5cddd52c180ccde651d0d35b736b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: aed586c2f11e5cddd52c180ccde651d0d35b736b Gitweb: http://git.kernel.org/tip/aed586c2f11e5cddd52c180ccde651d0d35b736b Author: Peter Zijlstra AuthorDate: Tue, 29 Sep 2015 11:28:26 +0200 Committer: Ingo Molnar CommitDate: Tue, 29 Sep 2015 12:27:39 +0200 sched/core: Simplify INIT_PREEMPT_COUNT As per commit d86ee4809d03 ("sched: optimize cond_resched()") we need PREEMPT_ACTIVE to avoid cond_resched() from working before the scheduler is setup. However, keeping preemption disabled should do the same thing already, making the PREEMPT_ACTIVE part entirely redundant. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: fweisbec@gmail.com Cc: linux-kernel@vger.kernel.org Cc: oleg@redhat.com Cc: rostedt@goodmis.org Cc: umgwanakikbuti@gmail.com Link: http://lkml.kernel.org/r/20150929093519.706413197@infradead.org Signed-off-by: Ingo Molnar --- include/linux/sched.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 699228b..5ef9e2c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -608,17 +608,14 @@ struct task_cputime_atomic { /* * Disable preemption until the scheduler is running. * Reset by start_kernel()->sched_init()->init_idle(). - * - * We include PREEMPT_ACTIVE to avoid cond_resched() from working - * before the scheduler is active -- see should_resched(). */ -#define INIT_PREEMPT_COUNT (PREEMPT_DISABLED + PREEMPT_ACTIVE) +#define INIT_PREEMPT_COUNT PREEMPT_DISABLED /** * struct thread_group_cputimer - thread group interval timer counts * @cputime_atomic: atomic thread group interval timers. * @running: non-zero when there are timers running and - * @cputime receives updates. + * @cputime receives updates. * * This structure contains the version of task_cputime, above, that is * used for thread group CPU timer calculations.