From patchwork Thu May 2 01:35:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Cross X-Patchwork-Id: 2509621 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 3C5F7DF230 for ; Thu, 2 May 2013 01:35:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759016Ab3EBBf0 (ORCPT ); Wed, 1 May 2013 21:35:26 -0400 Received: from mail-gg0-f202.google.com ([209.85.161.202]:45980 "EHLO mail-gg0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758997Ab3EBBfX (ORCPT ); Wed, 1 May 2013 21:35:23 -0400 Received: by mail-gg0-f202.google.com with SMTP id 4so14281ggm.1 for ; Wed, 01 May 2013 18:35:22 -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=qK0iHnRBCJfZq4PYx7KeoCpUDhI467RxDxczF2Y+mvY=; b=BYhWz4NZq6AzKReaPU2mQMJHHwDozikBV7vcGu2vbM33BidzUqo5I1WFahfnAUILss uqHnpT+MC13NN+YInPENIgilla+u9IidjU5Iuau3TagzF7OE++XvmfedG2mZLDAv2UeV LW+dwTmWuBGTdwJ2manKasMpCEoTX6Gp6rRPJxE9YIea/WRUw6Vd1fNs3tlLnIq0t/Yv AUGvmFuH2qhRPykPGrYCV+q3eo7b+JlF/L2DWvaYiuUXL6izVStT4wQ9mBoGB7HKnLM0 +ioe1zvoWS36BzRqzoS46UChZoNMZ3prcL4sR48doBo3WY1URSh87FRdRqpVPZU9WQAU zfRA== X-Received: by 10.236.89.65 with SMTP id b41mr3626617yhf.49.1367458522378; Wed, 01 May 2013 18:35:22 -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 q46si398796yhh.4.2013.05.01.18.35.22 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 01 May 2013 18:35:22 -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 3288931C042; Wed, 1 May 2013 18:35:22 -0700 (PDT) Received: by walnut.mtv.corp.google.com (Postfix, from userid 99897) id E6348160D29; Wed, 1 May 2013 18:35:21 -0700 (PDT) From: Colin Cross To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , arve@android.com, Tejun Heo , Oleg Nesterov , Colin Cross , Al Viro , Andrew Morton , "Eric W. Biederman" , Serge Hallyn Subject: [PATCH v2 09/10] sigtimedwait: use freezable blocking call Date: Wed, 1 May 2013 18:35:07 -0700 Message-Id: <1367458508-9133-10-git-send-email-ccross@android.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1367458508-9133-1-git-send-email-ccross@android.com> References: <1367458508-9133-1-git-send-email-ccross@android.com> X-Gm-Message-State: ALoCoQkAIDd1OXCYpIVHbkQqFIGVLGzxjmwFrI4mgfMKHSCd7NEjH9C6IKoU5k2qWDFjEeA3znKCUY3k/2h7EP+G7nF3xCnBVy52w8qcFsiFVtx0oYmha/yFBcwoGhW4X6+QgbEnCskZjJ6QrGu/5V/pMj6Ce+oGqSBQxnJSOqqyFv5ymYfllGvSSFofLNOFlxIx8D1msKBY 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. 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);