From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754670AbaEHKrF (ORCPT ); Thu, 8 May 2014 06:47:05 -0400 Received: from terminus.zytor.com ([198.137.202.10]:33409 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753723AbaEHKrB (ORCPT ); Thu, 8 May 2014 06:47:01 -0400 Date: Thu, 8 May 2014 03:46:09 -0700 From: tip-bot for Peter Zijlstra Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org, zhenglong.cai@cs2c.com.cn, peterz@infradead.org, luto@amacapital.net, mattst88@gmail.com, ink@jurassic.park.msu.ru, tglx@linutronix.de, rth@twiddle.net Reply-To: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, zhenglong.cai@cs2c.com.cn, luto@amacapital.net, mattst88@gmail.com, ink@jurassic.park.msu.ru, tglx@linutronix.de, rth@twiddle.net To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/idle, alpha: Switch from TS_POLLING to TIF_POLLING_NRFLAG Git-Commit-ID: 2a705ad65c9c393df1a684c780f890a29aab1128 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: 2a705ad65c9c393df1a684c780f890a29aab1128 Gitweb: http://git.kernel.org/tip/2a705ad65c9c393df1a684c780f890a29aab1128 Author: Peter Zijlstra AuthorDate: Fri, 11 Apr 2014 09:59:17 +0200 Committer: Ingo Molnar CommitDate: Thu, 8 May 2014 09:16:53 +0200 sched/idle, alpha: Switch from TS_POLLING to TIF_POLLING_NRFLAG Standardize the idle polling indicator to TIF_POLLING_NRFLAG such that both TIF_NEED_RESCHED and TIF_POLLING_NRFLAG are in the same word. This will allow us, using fetch_or(), to both set NEED_RESCHED and check for POLLING_NRFLAG in a single operation and avoid pointless wakeups. Changing from the non-atomic thread_info::status flags to the atomic thread_info::flags shouldn't be a big issue since most polling state changes were followed/preceded by a full memory barrier anyway. Signed-off-by: Peter Zijlstra Acked-by: Richard Henderson Cc: Andy Lutomirski Cc: Ivan Kokshaysky Cc: Linus Torvalds Cc: Matt Turner Cc: Richard Henderson Cc: 蔡正龙 Cc: linux-alpha@vger.kernel.org Link: http://lkml.kernel.org/n/tip-9tfzr196gs0n2afxv0ga8pc3@git.kernel.org Signed-off-by: Ingo Molnar --- arch/alpha/include/asm/thread_info.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index 3d6ce6d..48bbea6 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h @@ -73,12 +73,14 @@ register struct thread_info *__current_thread_info __asm__("$8"); #define TIF_SYSCALL_AUDIT 4 /* syscall audit active */ #define TIF_DIE_IF_KERNEL 9 /* dik recursion lock */ #define TIF_MEMDIE 13 /* is terminating due to OOM killer */ +#define TIF_POLLING_NRFLAG 14 /* idle is polling for TIF_NEED_RESCHED */ #define _TIF_SYSCALL_TRACE (1<