From patchwork Mon May 6 23:50:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Cross X-Patchwork-Id: 2528851 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6E05A400ED for ; Mon, 6 May 2013 23:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932317Ab3EFXup (ORCPT ); Mon, 6 May 2013 19:50:45 -0400 Received: from mail-vc0-f202.google.com ([209.85.220.202]:43698 "EHLO mail-vc0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932557Ab3EFXug (ORCPT ); Mon, 6 May 2013 19:50:36 -0400 Received: by mail-vc0-f202.google.com with SMTP id gf12so447584vcb.1 for ; Mon, 06 May 2013 16:50:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=+kxDTWqkbE2DgcUCHMApfpNM2A+h0ynQH9TCUldZ/1I=; b=CAtv0TVFqogiEGcHBVpjcoqHGCedH9pWARR202hD7bvC1Ew4Fhp8uN0Gmem/naePpT I455Sz7+OGaU0MvZDszo4g+FjAQLohw2EO2hgggvmCVpE02S+kAs/XGCwpyBJO5fD3UJ ftQHCASOeAOhZR3uYUqove8v97585ME64Hd6swCs2NNG2GLTmABjxwB5y2VT1Mo90cJ4 ukuSvryeS/SW9m0QX2CstTBNcTccvZunmHqljLJzr9HxXcrzspfN5Me+ffCkwLteq6uK Tx5ybjyqX42peGiTcga/AbzowlBoRJtZnDs/q+KXdGkjJJosGPX4wUbBsv8TRHmvUoQp BYYQ== X-Received: by 10.236.210.114 with SMTP id t78mr16928872yho.29.1367884235388; Mon, 06 May 2013 16:50:35 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id k33si2186876yhi.3.2013.05.06.16.50.35 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 06 May 2013 16:50:35 -0700 (PDT) Received: from walnut.mtv.corp.google.com (walnut.mtv.corp.google.com [172.18.105.48]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 392FA31C25C; Mon, 6 May 2013 16:50:35 -0700 (PDT) Received: by walnut.mtv.corp.google.com (Postfix, from userid 99897) id E078916078C; Mon, 6 May 2013 16:50:34 -0700 (PDT) From: Colin Cross To: linux-kernel@vger.kernel.org Cc: Pavel Machek , "Rafael J. Wysocki" , Peter Zijlstra , Ingo Molnar , Andrew Morton , Mandeep Singh Baines , Colin Cross , Oleg Nesterov , linux-nfs@vger.kernel.org, linux-pm@vger.kernel.org, netdev@vger.kernel.org, Linus Torvalds , Tejun Heo , Al Viro , "Eric W. Biederman" , Kees Cook Subject: [PATCH v3 15/16] sigtimedwait: use freezable blocking call Date: Mon, 6 May 2013 16:50:20 -0700 Message-Id: <1367884221-20462-16-git-send-email-ccross@android.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1367884221-20462-1-git-send-email-ccross@android.com> References: <1367884221-20462-1-git-send-email-ccross@android.com> X-Gm-Message-State: ALoCoQlo5J0XylYKaIDzYhBYNP9cFPcD6zWgrXlpgmoHkkIqClnXHTOYNkIJg/6NTY+JGl1vuf19mDL3eJLCVTeCJFX4ULIfPZoGW+7gkSVX3esItlTXDea8YqFNrdfMQoMwY9hlt3s3rziEZ+e1Kc4a0N93w2bqTnKgItA+GZk9POVnnaMDJm5YFUihOhRTORw9H1GyWLQh Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Avoid waking up every thread sleeping in a sigtimedwait 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. Acked-by: Tejun Heo Signed-off-by: Colin Cross --- kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/signal.c b/kernel/signal.c index 598dc06..10a70a0 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2845,7 +2845,7 @@ int do_sigtimedwait(const sigset_t *which, siginfo_t *info, recalc_sigpending(); spin_unlock_irq(&tsk->sighand->siglock); - timeout = schedule_timeout_interruptible(timeout); + timeout = freezable_schedule_timeout_interruptible(timeout); spin_lock_irq(&tsk->sighand->siglock); __set_task_blocked(tsk, &tsk->real_blocked);