From: Maninder Singh <maninder1.s@samsung.com>
To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Cc: "v.narang@samsung.com" <v.narang@samsung.com>
Subject: [EDT][PATCH 1/1] msgsnd use freezable blocking call
Date: Wed, 06 May 2015 11:29:57 +0000 (GMT) [thread overview]
Message-ID: <1403347040.147731430911797047.JavaMail.weblogic@epmlwas03a> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=windows-1252, Size: 1274 bytes --]
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@samsung.com>
Signed-off-by: Maninder Singh <maninder1.s@samsung.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ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next reply other threads:[~2015-05-06 11:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 11:29 Maninder Singh [this message]
2015-05-06 22:22 ` Andrew Morton
2015-05-07 7:19 Maninder Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403347040.147731430911797047.JavaMail.weblogic@epmlwas03a \
--to=maninder1.s@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=v.narang@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®