[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141114175534.GH25889@htj.dyndns.org>
Date: Fri, 14 Nov 2014 12:55:34 -0500
From: Tejun Heo <tj@...nel.org>
To: Michal Hocko <mhocko@...e.cz>
Cc: LKML <linux-kernel@...r.kernel.org>, linux-mm@...ck.org,
linux-pm@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
"\\\"Rafael J. Wysocki\\\"" <rjw@...ysocki.net>,
David Rientjes <rientjes@...gle.com>,
Oleg Nesterov <oleg@...hat.com>,
Cong Wang <xiyou.wangcong@...il.com>
Subject: Re: [RFC 1/4] OOM, PM: Do not miss OOM killed frozen tasks
Hello, Michal.
On Wed, Nov 12, 2014 at 07:58:49PM +0100, Michal Hocko wrote:
> Also change the return value semantic as the current one is little bit
> awkward. There is just one caller (try_to_freeze_tasks) which checks
> the return value and it is only interested whether the request was
> successful or the task blocks the freezing progress. It is natural to
> reflect the success by true rather than false.
I don't know about this. It's also customary to return %true when
further action needs to be taken. I don't think either is
particularly wrong but the flip seems gratuitous.
> bool freeze_task(struct task_struct *p)
> {
> @@ -129,12 +130,20 @@ bool freeze_task(struct task_struct *p)
> * normally.
> */
> if (freezer_should_skip(p))
> + return true;
> +
> + /*
> + * Do not check freezing state or attempt to freeze a task
> + * which has been killed by OOM killer. We are just waiting
> + * for the task to wake up and die.
Maybe saying sth like "consider the task freezing as ...." is a
clearer way to put it?
> + */
> + if (!test_tsk_thread_flag(p, TIF_MEMDIE))
> return false;
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists