Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752971Ab3FYVQg (ORCPT ); Tue, 25 Jun 2013 17:16:36 -0400 Received: from terminus.zytor.com ([198.137.202.10]:48599 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752622Ab3FYVQf (ORCPT ); Tue, 25 Jun 2013 17:16:35 -0400 Date: Tue, 25 Jun 2013 14:15:51 -0700 From: tip-bot for Colin Cross Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, dvhart@linux.intel.com, rdunlap@infradead.org, viro@zeniv.linux.org.uk, ccross@android.com, tj@kernel.org, tglx@linutronix.de, oleg@redhat.com, rjw@sisk.pl Reply-To: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, dvhart@linux.intel.com, rdunlap@infradead.org, viro@zeniv.linux.org.uk, ccross@android.com, tj@kernel.org, oleg@redhat.com, tglx@linutronix.de, rjw@sisk.pl In-Reply-To: <1367458508-9133-8-git-send-email-ccross@android.com> References: <1367458508-9133-8-git-send-email-ccross@android.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:core/locking] futex: Use freezable blocking call Git-Commit-ID: 88c8004fd3a5fdd2378069de86b90b21110d33a4 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (terminus.zytor.com [127.0.0.1]); Tue, 25 Jun 2013 14:15:57 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2175 Lines: 60 Commit-ID: 88c8004fd3a5fdd2378069de86b90b21110d33a4 Gitweb: http://git.kernel.org/tip/88c8004fd3a5fdd2378069de86b90b21110d33a4 Author: Colin Cross AuthorDate: Wed, 1 May 2013 18:35:05 -0700 Committer: Thomas Gleixner CommitDate: Tue, 25 Jun 2013 23:11:19 +0200 futex: Use freezable blocking call Avoid waking up every thread sleeping in a futex_wait call during suspend and resume by calling a freezable blocking call. Previous patches modified the freezer to avoid sending wakeups to threads that are blocked in freezable blocking calls. This call was selected to be converted to a freezable call because it doesn't hold any locks or release any resources when interrupted that might be needed by another freezing task or a kernel driver during suspend, and is a common site where idle userspace tasks are blocked. Signed-off-by: Colin Cross Cc: Rafael J. Wysocki Cc: arve@android.com Cc: Tejun Heo Cc: Oleg Nesterov Cc: Darren Hart Cc: Randy Dunlap Cc: Al Viro Link: http://lkml.kernel.org/r/1367458508-9133-8-git-send-email-ccross@android.com Signed-off-by: Thomas Gleixner --- kernel/futex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/futex.c b/kernel/futex.c index 49dacfb..c3a1a55 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -62,6 +62,7 @@ #include #include #include +#include #include @@ -1808,7 +1809,7 @@ static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, * is no timeout, or if it has yet to expire. */ if (!timeout || timeout->task) - schedule(); + freezable_schedule(); } __set_current_state(TASK_RUNNING); } -- 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/