[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1403347040.147731430911797047.JavaMail.weblogic@epmlwas03a>
Date: Wed, 06 May 2015 11:29:57 +0000 (GMT)
From: Maninder Singh <maninder1.s@...sung.com>
To: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Cc: "v.narang@...sung.com" <v.narang@...sung.com>
Subject: [EDT][PATCH 1/1] msgsnd use freezable blocking call
EP-F6AA0618C49C4AEDA73BFF1B39950BAB
Hi ,
Recently shared a patch for using freezable_schedule instead of schedule in msgrcv,
and after analysing message queuie implemntation we have realized even msgsnd can also block, if queue is full,
So in this scenerio msgsnd sets task state as TASK_INTERRUPTIBLE and can schedule function, similar behaviour as msgrcv.
This change is applicable for msgsnd as well.
we have created patch for remotes/linux-next/akpm, because msgrcv patch is already applied at this branch.
so we didnt include <linux/freezer.h>
Signed-off-by: Vaneet narang <v.narang@...sung.com>
Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
---
ipc/msg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ipc/msg.c b/ipc/msg.c
index a7261d5..da5658e 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -674,7 +674,7 @@ long do_msgsnd(int msqid, long mtype, void __user *mtext,
ipc_unlock_object(&msq->q_perm);
rcu_read_unlock();
- schedule();
+ freezable_schedule();
rcu_read_lock();
ipc_lock_object(&msq->q_perm);
--
1.7.1
Thanks and Regards,
Maninder Singh
Powered by blists - more mailing lists