]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc/msg.c: use freezable blocking call
authorYogesh Gaur <yn.gaur@samsung.com>
Tue, 7 Apr 2015 23:45:27 +0000 (09:45 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:45:27 +0000 (09:45 +1000)
commit29f399c3bd8de58489e9c16740a70f6816ca3419
treecdfc06b38aaf62907ead612d57b91a63d7c215be
parent48d537ce509f07ae274a6cb3518f1813ce0d0df1
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

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.

Signed-off-by: Yogesh Gaur <yn.gaur@samsung.com>
Signed-off-by: Manjeet Pawar <manjeet.p@samsung.com>
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by : Ajeet Yadav <ajeet.y@samsung.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/msg.c