From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
maninder1.s@samsung.com, tglx@linutronix.de,
Yogesh Narayan Gaur <yn.gaur@samsung.com>,
AJEET YADAV <ajeet.y@samsung.com>,
Peter Zijlstra <peterz@infradead.org>, Tejun Heo <tj@kernel.org>
Subject: Re: restart_syscall: use freezable blocking call
Date: Tue, 31 Mar 2015 01:39:07 +0200 [thread overview]
Message-ID: <1982905.Ac4fTCSUaY@vostro.rjw.lan> (raw)
In-Reply-To: <20150330154351.2582ba70df824c6ccc55fb28@linux-foundation.org>
CC more maintainers.
On Monday, March 30, 2015 03:43:51 PM Andrew Morton wrote:
> On Mon, 30 Mar 2015 11:07:35 +0000 (GMT) Maninder Singh <maninder1.s@samsung.com> wrote:
>
> > Hello All,
> >
> > Avoid waking up every thread sleeping in a restart_syscall 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
> > We have faced similiar issue of sleep fail when calling restart() system call in stress testing.
> >
> > Patch :-
> > Subject: restart_syscall: use freezable blocking call
> > Avoid waking up every thread sleeping in a restart_syscall 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.
>
> This patch is rather mucked up - tabs replaced with spaces, apparently
> mangled text in the changelog.
>
> Thomas is having a bit of time off, so I fixed most of that up and
> queued the patch in -mm for some testing. Hopefully Thomas and/or
> Rafael will be able to comment?
>
>
> From: Maninder Singh <maninder1.s@samsung.com>
> Subject: kernel/time/hrtimer.c: restart_syscall: use freezable blocking call
>
> Avoid waking up every thread sleeping in a restart_syscall 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 [<c03e3150>] (schedule_hrtimeout_range_clock+0xdc/0x110)
> [<c03e3074>] (schedule_hrtimeout_range_clock+0x0/0x110) from [<c03e31a0>] (schedule_hrtimeout_range+0x1c/0x20)
> r9:d16c9be0 r8:8b7d9c2c r7:00000000 r6:00000000 r5:d16c8028
> [<c03e3184>] (schedule_hrtimeout_range+0x0/0x20) from [<c015778c>] (poll_schedule_timeout+0x48/0x6c)
> [<c0157744>] (poll_schedule_timeout+0x0/0x6c) from [<c0158994>] (do_sys_poll+0x2c8/0x378) r5:d16c9f78 r4:00000000
> [<c01586cc>] (do_sys_poll+0x0/0x378) from [<c0158a84>] (do_restart_poll+0x40/0x5c)
> [<c0158a44>] (do_restart_poll+0x0/0x5c) from [<c005710c>] (sys_restart_syscall+0x2c/0x30) r4:fffffe7a
> [<c00570e0>] (sys_restart_syscall+0x0/0x30) from [<c001a180>] (ret_fast_syscall+0x0/0x48)
>
>
> Signed-off-by: Yogesh Gaur <yn.gaur <at> samsung.com>
> Signed-off-by: Amit Arora <amit.arora <at> samsung.com>
> Reviewed-by : Ajeet Yadav <ajeet.y <at> samsung.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> kernel/time/hrtimer.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff -puN kernel/time/hrtimer.c~restart_syscall-use-freezable-blocking-call kernel/time/hrtimer.c
> --- a/kernel/time/hrtimer.c~restart_syscall-use-freezable-blocking-call
> +++ a/kernel/time/hrtimer.c
> @@ -1767,7 +1767,7 @@ schedule_hrtimeout_range_clock(ktime_t *
> * A NULL parameter means "infinite"
> */
> if (!expires) {
> - schedule();
> + freezable_schedule();
> return -EINTR;
> }
>
> @@ -1781,7 +1781,7 @@ schedule_hrtimeout_range_clock(ktime_t *
> t.task = NULL;
>
> if (likely(t.task))
> - schedule();
> + freezable_schedule();
>
> hrtimer_cancel(&t.timer);
> destroy_hrtimer_on_stack(&t.timer);
> _
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2015-03-30 23:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 11:07 restart_syscall: use freezable blocking call Maninder Singh
2015-03-30 22:43 ` Andrew Morton
2015-03-30 23:39 ` Rafael J. Wysocki [this message]
2015-03-31 15:07 ` Peter Zijlstra
2015-04-02 16:03 ` Sasha Levin
2015-04-02 17:25 ` Peter Zijlstra
2015-04-02 17:34 ` Tejun Heo
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=1982905.Ac4fTCSUaY@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=ajeet.y@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maninder1.s@samsung.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.