[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1685075594.210481427865525094.JavaMail.weblogic@epmlwas09b>
Date: Wed, 01 Apr 2015 05:18:45 +0000 (GMT)
From: Maninder Singh <maninder1.s@...sung.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Maninder Singh <maninder1.s@...sung.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Yogesh Narayan Gaur <yn.gaur@...sung.com>,
AJEET YADAV <ajeet.y@...sung.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Tejun Heo <tj@...nel.org>
Subject: Re: Re: msgrcv: use freezable blocking call
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 <yn.gaur@...sung.com>
Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
Signed-off-by: Manjeet Pawar <manjeet.p@...sung.com>
Reviewed-by : Ajeet Yadav <ajeet.y@...sung.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Tejun Heo <tj@...nel.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
2. For restart_syscall: use freezable blocking call
Signed-off-by: Yogesh Gaur <yn.gaur@...sung.com>
Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
Signed-off-by: Amit Arora <amit.arora@...sung.com>
Reviewed-by : Ajeet Yadav <ajeet.y@...sung.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Tejun Heo <tj@...nel.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
----> 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 <yn.gaur@...sung.com>
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:
[<c03e3924>] (__schedule+0x0/0x5d8) from [<c03e3f88>] (schedule+0x8c/0x90)
[<c03e3efc>] (schedule+0x0/0x90) from [<c01ef9f8>] (do_msgrcv+0x2e0/0x368)
[<c01ef718>] (do_msgrcv+0x0/0x368) from [<c01efaac>] (SyS_msgrcv+0x2c/0x38)
[<c01efa80>] (SyS_msgrcv+0x0/0x38) from [<c001a180>] (ret_fast_syscall+0x0/0x48)
tPlay0Cb2 R running 0 297 204 0x00000001
Signed-off-by: Yogesh Gaur <yn.gaur@...sung.com>
Signed-off-by: Manjeet Pawar <manjeet.p@...sung.com>
Reviewed-by : Ajeet Yadav <ajeet.y@...sung.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Tejun Heo <tj@...nel.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
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 <linux/rwsem.h>
#include <linux/nsproxy.h>
#include <linux/ipc_namespace.h>
+#include <linux/freezer.h>
#include <asm/current.h>
#include <linux/uaccess.h>
@@ -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
_
Powered by blists - more mailing lists