From: Maninder Singh <maninder1.s@samsung.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Vaneet Narang <v.narang@samsung.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
"yn.gaur@samsung.com" <yn.gaur@samsung.com>
Subject: Re: [EDT][PATCH 1/1] msgsnd use freezable blocking call
Date: Thu, 07 May 2015 07:19:07 +0000 (GMT) [thread overview]
Message-ID: <1210676194.185311430983147190.JavaMail.weblogic@epmlwas06c> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=windows-1252, Size: 2844 bytes --]
EP-F6AA0618C49C4AEDA73BFF1B39950BAB
>On Wed, 06 May 2015 11:29:57 +0000 (GMT) Maninder Singh wrote:
>> 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
>>
>This changelog is quite poor. It doesn't explain why the change is
>being made, it doesn't explain the user-visible effects which are being
>fixed, etc.
>So I threw it away and copied text from "ipc/msg.c: use freezable
>blocking call":
>One thing which isn't clear to me: *why* do we want to "Avoid waking up
>every thread sleeping in XXX during suspend and resume"? Suspend and
>resume are rare operations. Why do we care if a few threads wake up
>then go to sleep again?
When any task is stuck in Interruptible or Uninterruptible state then waking up of that task fails.
If wakeup fails, then suspend operation fails and all process send to frezeer state at this moment also gets wakeup.
Correct implementation is that if suspend fails, then kernel would retry suspend operation again after some specific timeinterval for some fixed retry count.
But as changes suggested by Mr Colin Cross on LKML https://lkml.org/lkml/2013/5/1/424, for the system calls for which issue has been faced process flag being appended with PF_FREEZER_SKIP.
we are testing some scenerio in which we have to do multi suspend-resume scenario, and we faced the problem thats why suggested the change for msgsnd and msgrcv
Signed-off-by: Vaneet narang <v.narang@samsung.com>
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Cc: Yogesh Gaur <yn.gaur@samsung.com>
Cc: Manjeet Pawar <manjeet.p@samsung.com>
Cc: 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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN ipc/msg.c~ipc-msgc-msgsnd-use-freezable-blocking-call ipc/msg.c
--- a/ipc/msg.c~ipc-msgc-msgsnd-use-freezable-blocking-call
+++ a/ipc/msg.c
@@ -673,7 +673,7 @@ long do_msgsnd(int msqid, long mtype, vo
ipc_unlock_object(&msq->q_perm);
rcu_read_unlock();
- schedule();
+ freezable_schedule();
rcu_read_lock();
ipc_lock_object(&msq->q_perm);
_
ÿôèº{.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-07 7:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 7:19 Maninder Singh [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-05-06 11:29 Maninder Singh
2015-05-06 22:22 ` Andrew Morton
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=1210676194.185311430983147190.JavaMail.weblogic@epmlwas06c \
--to=maninder1.s@samsung.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=v.narang@samsung.com \
--cc=yn.gaur@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®