From patchwork Mon Apr 29 21:45:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Cross X-Patchwork-Id: 2502741 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 C15323FD1A for ; Mon, 29 Apr 2013 21:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759986Ab3D2Vwn (ORCPT ); Mon, 29 Apr 2013 17:52:43 -0400 Received: from mail-gg0-f202.google.com ([209.85.161.202]:63246 "EHLO mail-gg0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758406Ab3D2Vwm (ORCPT ); Mon, 29 Apr 2013 17:52:42 -0400 Received: by mail-gg0-f202.google.com with SMTP id 4so714273ggm.1 for ; Mon, 29 Apr 2013 14:52:42 -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=BVkXUnoLjhyazPmRx1sDo+nhsqhnVCpdm1TYJ1Xu/fc=; b=dUfAZadkzTGTTKrW1bu4xAh8DKGzH/Ks8+1Z3i8QRiJLjHPOXFfqh9IsZgEv25bzF2 HUbJBqCPVwWnLY2qQcYDkTZbugBcEfJqR5fKkvD95wnnBy1IK+WSi68vEQ3eMGDLJRbF qd9kQ26VawBktGwZ/U5BrAHkxb8Xb1dCLY9cd5gd1x+vXkcIkrsQCBzA+MIJ4A3bvPmL 0OshORYaTYg4x07rK5mba/pkDS4AniPA6XOL3hfi0Lst15icjPFOZJSNgl+TiYRP47u3 iMRUHvFGpP88/Bh3a1tT0Ye8p1d8QLFwVhHKLHEuzd6XZNUdCSSkfN7uIOaMjjAE4W11 FB8Q== X-Received: by 10.236.210.114 with SMTP id t78mr21066234yho.29.1367271957426; Mon, 29 Apr 2013 14:45:57 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id o42si477022yhe.5.2013.04.29.14.45.57 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 29 Apr 2013 14:45:57 -0700 (PDT) Received: from walnut.mtv.corp.google.com (walnut.mtv.corp.google.com [172.18.105.48]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 3FA555A4034; Mon, 29 Apr 2013 14:45:57 -0700 (PDT) Received: by walnut.mtv.corp.google.com (Postfix, from userid 99897) id E8D1D161EB9; Mon, 29 Apr 2013 14:45:51 -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 , Alexander Viro , linux-fsdevel@vger.kernel.org Subject: [PATCH 06/10] select: use freezable blocking call Date: Mon, 29 Apr 2013 14:45:42 -0700 Message-Id: <1367271946-7239-7-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: ALoCoQmN4WqolqbHKhA3shDpZFsRh6zAti7ZRE0/N/SQX/pArwhaX8rBs1f8vU6MwmjbNLb4ysbPjEeR/j0VNOYV+Rh1ckzuT8oM/MoJuQWMJiVFuF2GEOHsZbd1UYYqs+wtFZ8/mnny84LcgcWgtNz2ZtJNl4pynZKU4+KsaUHwKKM328jC+NjXMl0JvfevTqQksbLjDJjc 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 select call during suspend and resume by calling a freezable blocking call. Signed-off-by: Colin Cross --- fs/select.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/select.c b/fs/select.c index 8c1c96c..6b14dc7 100644 --- a/fs/select.c +++ b/fs/select.c @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -236,7 +237,8 @@ int poll_schedule_timeout(struct poll_wqueues *pwq, int state, set_current_state(state); if (!pwq->triggered) - rc = schedule_hrtimeout_range(expires, slack, HRTIMER_MODE_ABS); + rc = freezable_schedule_hrtimeout_range(expires, slack, + HRTIMER_MODE_ABS); __set_current_state(TASK_RUNNING); /*