From patchwork Mon Apr 29 21:45:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Cross X-Patchwork-Id: 2502611 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 4E695E0172 for ; Mon, 29 Apr 2013 21:46:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932503Ab3D2Vp7 (ORCPT ); Mon, 29 Apr 2013 17:45:59 -0400 Received: from mail-qc0-f201.google.com ([209.85.216.201]:33772 "EHLO mail-qc0-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932453Ab3D2Vp5 (ORCPT ); Mon, 29 Apr 2013 17:45:57 -0400 Received: by mail-qc0-f201.google.com with SMTP id o22so712369qcr.2 for ; Mon, 29 Apr 2013 14:45:57 -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=n1e0kgVLUSlK7iYc+00tRb+WBSGaRAA6DfRPcmonDI0=; b=IkDjwRtMmrq94M8gWEZyfUa2qBPghYyDqkW42rLF3jXLHd1PSjacijIrpsKfuECu5m mZN6bukJk5MOVnUyUB/vWlnczP9Gboj54dTvRX08lzL7wlCSr21Bc9xWn/nmmN56y0mD wbH7vpUkPmOO20lfZYU9KYzDMOrWUC/mg4NPgPaEF1eKXpcwt8FKRY35PaNmM1Fm49Um MquxGH77jDXPJhaVSy1Mar9JZAxmflaAc96FPQ5iW7iEWrIG67r23FbuzDmA6qymy671 p81+mFYfic1R8OvVsjHJrkTP4Je/Jugu9L7Zc/JczC/DtwkmIozpmkuC6biLuA8+c5Xf 3Bzw== X-Received: by 10.236.36.44 with SMTP id v32mr8837791yha.33.1367271957164; Mon, 29 Apr 2013 14:45:57 -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 o42si476997yhe.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-1.hot.corp.google.com (Postfix) with ESMTP id 0293E31C022; Mon, 29 Apr 2013 14:45:57 -0700 (PDT) Received: by walnut.mtv.corp.google.com (Postfix, from userid 99897) id 9D4FB161F1F; 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 05/10] epoll: use freezable blocking call Date: Mon, 29 Apr 2013 14:45:41 -0700 Message-Id: <1367271946-7239-6-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: ALoCoQlEbdOD6TpHQJw5UDz1QLtLJU30oqm18uo+LQ86d+/9bsnA6g9Au2DUkXzZUPisyxXTL+MxNZVaII/xbHeg9FAZ+Sh2k/p2xzG4qanVUppfqDS51C2tDWCAYfXmrEbAiggTT/WAn9X+Xs4OXBhtS3MXdqtL+8mtvl9yMrt1UMnY7N7JkuSYZ5IxxD/4Dig1DLpBZIwl 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 an epoll_wait call during suspend and resume by calling a freezable blocking call. Signed-off-by: Colin Cross --- fs/eventpoll.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 9fec183..65245e7 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -1543,7 +1544,8 @@ fetch_events: } spin_unlock_irqrestore(&ep->lock, flags); - if (!schedule_hrtimeout_range(to, slack, HRTIMER_MODE_ABS)) + if (!freezable_schedule_hrtimeout_range(to, slack, + HRTIMER_MODE_ABS)) timed_out = 1; spin_lock_irqsave(&ep->lock, flags);