Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753322AbbDAFSt (ORCPT ); Wed, 1 Apr 2015 01:18:49 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:30230 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbbDAFSr (ORCPT ); Wed, 1 Apr 2015 01:18:47 -0400 X-AuditID: cbfee691-f79b86d000004a5a-3d-551b7fb5d7bf Date: Wed, 01 Apr 2015 05:18:45 +0000 (GMT) From: Maninder Singh Subject: Re: Re: msgrcv: use freezable blocking call To: Andrew Morton , Maninder Singh Cc: "linux-kernel@vger.kernel.org" , Yogesh Narayan Gaur , AJEET YADAV , Peter Zijlstra , Tejun Heo Reply-to: maninder1.s@samsung.com MIME-version: 1.0 X-MTR: 20150401051123569@maninder1.s Msgkey: 20150401051123569@maninder1.s X-EPLocale: en_US.windows-1252 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20150401051123569@maninder1.s X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 Message-id: <1685075594.210481427865525094.JavaMail.weblogic@epmlwas09b> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKIsWRmVeSWpSXmKPExsWyRsSkVndrvXSowexbRhaXd81hc2D0+LxJ LoAxissmJTUnsyy1SN8ugSvjaNt3poIVKhW/V6c3MK5R7mLk5BASUJNYtPcxG4gtIWAisa71 ETOELSZx4d56oDgXUM1SRollV+8xwxR9vLSZCSIxh1Hi080/LCAJFgEVif8LZ7CD2GwC+hJn 964DaxAGatix/BdQnINDRCBWYuNmd5BeZoHHjBJPp9xihrhCUWL9jSeMIDavgKDEyZlPWCCW qUj0PtrGDBFXlWi7coAdIi4nsWTqZSYIm1diRvtTFpj4tK9roA6Vljg/awMjzDe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ewDSSOLJrDiu4XXgEPiYOt0xknMMrOQpKahaR9FpJ2 ZDULGFlWMYqmFiQXFCelV5joFSfmFpfmpesl5+duYgSnoWdLdjA2XLA+xCjAwajEw9sQJR0q xJpYVlyZe4hRgoNZSYR3+xGpUCHelMTKqtSi/Pii0pzU4kOMpsBYm8gsJZqcD0yReSXxhsYm 5qbGphYGhubmZkrivP/P5YYICaQnlqRmp6YWpBbB9DFxcEo1MG5r8F12cq9dxf3fT5dWNy8P uDRn9Qwvi+kBnr+P3LjwLe5XhFd4DNvzexm3fmnutl+/b83v16csy1/9OfUub8O1sIuFu08s T8wze7F06Z7o32X9Tj89V56/+C1tU9/B1TWKEwUMpjALXZ8edkdT4WsI695dzV4qeVZqV3Ld 16vJzuNsWZNxXb1ZiaU4I9FQi7moOBEAw0HS1FkDAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t315Isgf000502 Content-Length: 3459 Lines: 93 Hi Andrew, Thanks for making new patch, Actually there is some problem with our mail editor. It changes tabs with spaces and corrupts the patch, we are solving the same at our end. Thats why i am sending you signed -off by only for both patches. 1. For msgrcv: use freezable blocking call Signed-off-by: Yogesh Gaur Signed-off-by: Maninder Singh Signed-off-by: Manjeet Pawar Reviewed-by : Ajeet Yadav Cc: Peter Zijlstra Cc: Tejun Heo Signed-off-by: Andrew Morton 2. For restart_syscall: use freezable blocking call Signed-off-by: Yogesh Gaur Signed-off-by: Maninder Singh Signed-off-by: Amit Arora Reviewed-by : Ajeet Yadav Cc: Peter Zijlstra Cc: Tejun Heo Signed-off-by: Andrew Morton ----> For Peter's Review comment:- This is what, no why mentioned 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. Thanks Maninder Singh 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 _ ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?