From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752858AbbCaVai (ORCPT ); Tue, 31 Mar 2015 17:30:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54286 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbbCaVae (ORCPT ); Tue, 31 Mar 2015 17:30:34 -0400 Date: Tue, 31 Mar 2015 14:30:33 -0700 From: Andrew Morton To: maninder1.s@samsung.com Cc: linux-kernel@vger.kernel.org, "yn.gaur@samsung.com" , "ajeet.y@samsung.com" , Peter Zijlstra , Tejun Heo Subject: Re: msgrcv: use freezable blocking call Message-Id: <20150331143033.d30ae11b712526eba3883cc4@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Presumably Peter's review comments for "restart_syscall: use freezable blocking call" also apply here. Please send your signed-off-by: for both patches, as detailed in Documentation/SubmittingPatches section 11, thanks. From: Yogesh Gaur Subject: ipc/msg.c: use freezable blocking call Avoid waking up every thread sleeping in a msgrcv 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. Ref: https://lkml.org/lkml/2013/5/1/424 Backtrace: [] (__schedule+0x0/0x5d8) from [] (schedule+0x8c/0x90) [] (schedule+0x0/0x90) from [] (do_msgrcv+0x2e0/0x368) [] (do_msgrcv+0x0/0x368) from [] (SyS_msgrcv+0x2c/0x38) [] (SyS_msgrcv+0x0/0x38) from [] (ret_fast_syscall+0x0/0x48) tPlay0Cb2 R running 0 297 204 0x00000001 Signed-off-by: Yogesh Gaur Signed-off-by: Manjeet Pawar Reviewed-by : Ajeet Yadav Cc: Peter Zijlstra Cc: Tejun Heo Signed-off-by: Andrew Morton --- ipc/msg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN ipc/msg.c~msgrcv-use-freezable-blocking-call ipc/msg.c --- a/ipc/msg.c~msgrcv-use-freezable-blocking-call +++ a/ipc/msg.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -915,7 +916,7 @@ long do_msgrcv(int msqid, void __user *b ipc_unlock_object(&msq->q_perm); rcu_read_unlock(); - schedule(); + freezable_schedule(); /* Lockless receive, part 1: * Disable preemption. We don't hold a reference to the queue _