From: "Chanho Min" <chanho.min@lge.com>
To: 'Oleg Nesterov' <oleg@redhat.com>
Cc: "'Rafael J. Wysocki'" <rjw@rjwysocki.net>,
'Pavel Machek' <pavel@ucw.cz>, 'Len Brown' <len.brown@intel.com>,
'Andrew Morton' <akpm@linux-foundation.org>,
"'Eric W. Biederman'" <ebiederm@xmission.com>,
'Christian Brauner' <christian@brauner.io>,
'Anna-Maria Gleixner' <anna-maria@linutronix.de>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
'Seungho Park' <seungho1.park@lge.com>,
'Jongsung Kim' <neidhard.kim@lge.com>,
'Inkyu Hwang' <inkyu.hwang@lge.com>,
"'donghwan.jung'" <donghwan.jung@lge.com>
Subject: RE: [PATCH] freezer: fix freeze timeout on exec
Date: Fri, 9 Nov 2018 16:50:33 +0900 [thread overview]
Message-ID: <05cd01d47800$e52669a0$af733ce0$@lge.com> (raw)
In-Reply-To:
> >
> > Can't we simply change de_thread() to use freezable_schedule() ?
> >
> > Oleg.
>
> We need to change freezable_schedule_timeout() instead.
> freezable_schedule also can't be frozen if sub-threads can't stop
> schedule().
> Furthermore, I'm not sure if it is safe to freeze it at de_thread().
>
> diff --git a/fs/exec.c b/fs/exec.c
> index 9c5ee2a..291cbd6 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -942,7 +942,7 @@ static int de_thread(struct task_struct *tsk)
> while (sig->notify_count) {
> __set_current_state(TASK_KILLABLE);
> spin_unlock_irq(lock);
> - schedule();
> + while (!freezable_schedule_timeout(HZ));
> if (unlikely(__fatal_signal_pending(tsk)))
> goto killed;
> spin_lock_irq(lock);
>
> Chanho
Sorry, I might misunderstand freezer.
Changes to freezable_schedule() works fine. It looks safe.
I'll apply patch again.
Chanho
WARNING: multiple messages have this Message-ID (diff)
From: "Chanho Min" <chanho.min@lge.com>
To: "'Oleg Nesterov'" <oleg@redhat.com>
Cc: "'Rafael J. Wysocki'" <rjw@rjwysocki.net>,
"'Pavel Machek'" <pavel@ucw.cz>,
"'Len Brown'" <len.brown@intel.com>,
"'Andrew Morton'" <akpm@linux-foundation.org>,
"'Eric W. Biederman'" <ebiederm@xmission.com>,
"'Christian Brauner'" <christian@brauner.io>,
"'Anna-Maria Gleixner'" <anna-maria@linutronix.de>,
<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"'Seungho Park'" <seungho1.park@lge.com>,
"'Jongsung Kim'" <neidhard.kim@lge.com>,
"'Inkyu Hwang'" <inkyu.hwang@lge.com>,
"'donghwan.jung'" <donghwan.jung@lge.com>
Subject: RE: [PATCH] freezer: fix freeze timeout on exec
Date: Fri, 9 Nov 2018 16:50:33 +0900 [thread overview]
Message-ID: <05cd01d47800$e52669a0$af733ce0$@lge.com> (raw)
In-Reply-To:
> >
> > Can't we simply change de_thread() to use freezable_schedule() ?
> >
> > Oleg.
>
> We need to change freezable_schedule_timeout() instead.
> freezable_schedule also can't be frozen if sub-threads can't stop
> schedule().
> Furthermore, I'm not sure if it is safe to freeze it at de_thread().
>
> diff --git a/fs/exec.c b/fs/exec.c
> index 9c5ee2a..291cbd6 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -942,7 +942,7 @@ static int de_thread(struct task_struct *tsk)
> while (sig->notify_count) {
> __set_current_state(TASK_KILLABLE);
> spin_unlock_irq(lock);
> - schedule();
> + while (!freezable_schedule_timeout(HZ));
> if (unlikely(__fatal_signal_pending(tsk)))
> goto killed;
> spin_lock_irq(lock);
>
> Chanho
Sorry, I might misunderstand freezer.
Changes to freezable_schedule() works fine. It looks safe.
I'll apply patch again.
Chanho
next prev parent reply other threads:[~2018-11-09 7:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 10:09 [PATCH] freezer: fix freeze timeout on exec Chanho Min
2018-11-08 10:50 ` Oleg Nesterov
2018-11-09 0:29 ` Chanho Min
2018-11-09 0:29 ` Chanho Min
2018-11-09 7:50 ` Chanho Min [this message]
2018-11-09 7:50 ` Chanho Min
2018-11-11 9:50 ` kbuild test robot
2018-11-11 9:50 ` kbuild test robot
2018-11-11 9:51 ` kbuild test robot
2018-11-11 9:51 ` kbuild test robot
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='05cd01d47800$e52669a0$af733ce0$@lge.com' \
--to=chanho.min@lge.com \
--cc=akpm@linux-foundation.org \
--cc=anna-maria@linutronix.de \
--cc=christian@brauner.io \
--cc=donghwan.jung@lge.com \
--cc=ebiederm@xmission.com \
--cc=inkyu.hwang@lge.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=neidhard.kim@lge.com \
--cc=oleg@redhat.com \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=seungho1.park@lge.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.