From patchwork Mon Apr 29 21:45:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Cross X-Patchwork-Id: 2502661 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 B4F3C3FD1A for ; Mon, 29 Apr 2013 21:47:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933113Ab3D2Vqy (ORCPT ); Mon, 29 Apr 2013 17:46:54 -0400 Received: from mail-yh0-f74.google.com ([209.85.213.74]:64226 "EHLO mail-yh0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932468Ab3D2VqD (ORCPT ); Mon, 29 Apr 2013 17:46:03 -0400 Received: by mail-yh0-f74.google.com with SMTP id z12so579603yhz.5 for ; Mon, 29 Apr 2013 14:46:01 -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=nFIHSeG9uE+5fPGqMiaea930O8Uv2Da4ev+X6A8a8tM=; b=ZmVVjhQGzPcxcq30LD7IcQctUsZ3vQGgf9z8N7cYxxCwdRYhyUKAHbswN0Mzfhsdn1 jXe40nQ0in+ZPKOhj77P/DonTK6FuwMj+VHEfB+7eOA29Zy3SCCHShVmL3dOdU9nLVrZ y1S+S03azzVf7Q+zx4QP1aRpC1DsKRmfcg1mVmF+f/bzJsGQtyKOxtR5HKCxlZsEbiZd PI2TgnJk3J6C7aN7V983RyMKEBJe1cFy7CACYRBE1sWtJlRIP0PmhsSfwxL1n2RWaKt1 Wvd2w5qF1nt2GWGveEs7WVOvK7cyKrao6tpw4dF7SsfNo1MC64FrFtsfK7nntKqVJWct kIqQ== X-Received: by 10.236.170.7 with SMTP id o7mr28556505yhl.1.1367271961660; Mon, 29 Apr 2013 14:46:01 -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 n23si760704yhi.7.2013.04.29.14.46.01 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 29 Apr 2013 14:46:01 -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 756F931C022; Mon, 29 Apr 2013 14:46:01 -0700 (PDT) Received: by walnut.mtv.corp.google.com (Postfix, from userid 99897) id 282D2160FBB; Mon, 29 Apr 2013 14:45:56 -0700 (PDT) From: Colin Cross To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , arve@android.com, Colin Cross , Al Viro , Andrew Morton , Oleg Nesterov , "Eric W. Biederman" , Serge Hallyn Subject: [PATCH 09/10] sigtimedwait: use freezable blocking call Date: Mon, 29 Apr 2013 14:45:45 -0700 Message-Id: <1367271946-7239-10-git-send-email-ccross@android.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1367271946-7239-1-git-send-email-ccross@android.com> References: <1367271946-7239-1-git-send-email-ccross@android.com> X-Gm-Message-State: ALoCoQnPiba7mYwhxQHgYbRbEp53TTGSfc9uLaq8alaivyboOegdn2plqMVzCDwEb8S/1KPaeceymGhcFe+clzO4h5Ief+pQsf2p2dK4apOJ42x0hFqYeZWJ/pdHl09mrTBV1Zom8qUiWfl91mLjP5BNkTuuJ70/CZjEq8Zbjth7n7JKkvV+3Np10TG3QLb4yPQo0tQwjVVc 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. 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);