Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-22 Thread Michal Hocko
[Sorry for the late reply, I was mostly offline throughout last week] On Tue 16-09-14 15:55:48, Cong Wang wrote: > On Mon, Sep 15, 2014 at 2:36 AM, Michal Hocko wrote: > > This patch builds on top of Cong Wang's. What do you think? > > I think it is should a preliminary of my patch, not a follow

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-16 Thread Cong Wang
On Mon, Sep 15, 2014 at 4:22 AM, Michal Hocko wrote: > On Thu 04-09-14 15:30:41, Cong Wang wrote: >> There is a race condition between OOM killer and freezer when >> they try to operate on the same process, something like below: >> >> Process A Process B Process C >> tr

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-16 Thread Cong Wang
On Mon, Sep 15, 2014 at 2:36 AM, Michal Hocko wrote: > This patch builds on top of Cong Wang's. What do you think? I think it is should a preliminary of my patch, not a followup. I can carry this patch for you if you want. > --- > From cdf97a20b107ee584352f07274a88d7c3f014ab2 Mon Sep 17 00:00:00

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-15 Thread Tejun Heo
Hello, Michal. On Mon, Sep 15, 2014 at 04:28:21PM +0200, Michal Hocko wrote: > > Are we gonna introduce an alternate versions for all of them? > > Are they intended for kernel threads in the first place? The primary There's no restriction in using them and I'm pretty sure some of them are used b

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-15 Thread Michal Hocko
On Sat 13-09-14 08:48:46, Tejun Heo wrote: > Hello, Michal. > > On Wed, Sep 10, 2014 at 03:24:17PM +0200, Michal Hocko wrote: > > What do you think about this way to help distinguish kernel threads and > > user processes and keep the future maintenance of freezer saner? > > I'm not sure either wa

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-15 Thread Michal Hocko
On Thu 04-09-14 15:30:41, Cong Wang wrote: > There is a race condition between OOM killer and freezer when > they try to operate on the same process, something like below: > > Process A Process B Process C > trigger page fault > then trigger oom > B=oom_scan_process_thr

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-15 Thread Michal Hocko
On Mon 15-09-14 05:34:36, Rafael J. Wysocki wrote: > On Monday, September 15, 2014 09:56:57 AM Tejun Heo wrote: > > On Sun, Sep 14, 2014 at 06:43:31PM +0200, Rafael J. Wysocki wrote: > > > On Saturday, September 13, 2014 08:59:35 AM Tejun Heo wrote: > > > > Doesn't this mean that if PM freezing and

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-14 Thread Rafael J. Wysocki
On Monday, September 15, 2014 09:56:57 AM Tejun Heo wrote: > On Sun, Sep 14, 2014 at 06:43:31PM +0200, Rafael J. Wysocki wrote: > > On Saturday, September 13, 2014 08:59:35 AM Tejun Heo wrote: > > > Doesn't this mean that if PM freezing and OOM killing race each other, > > > the system may hang? D

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-14 Thread Tejun Heo
On Sun, Sep 14, 2014 at 06:43:31PM +0200, Rafael J. Wysocki wrote: > On Saturday, September 13, 2014 08:59:35 AM Tejun Heo wrote: > > Doesn't this mean that if PM freezing and OOM killing race each other, > > the system may hang? Driver PM operation may try to allocate memory > > -> triggers OOM -

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-14 Thread Rafael J. Wysocki
On Saturday, September 13, 2014 08:59:35 AM Tejun Heo wrote: > On Thu, Sep 11, 2014 at 06:30:04PM +0200, Michal Hocko wrote: > > > I am wondering if the folllowing check makes any sense with regarding > > > to rule out PM freeze: > > > > > > if ((!pm_nosig_freezing && !pm_freezing) && > >

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-14 Thread Rafael J. Wysocki
On Thursday, September 11, 2014 04:45:09 PM Michal Hocko wrote: > On Thu 11-09-14 16:52:50, Rafael J. Wysocki wrote: > > On Thursday, September 11, 2014 04:28:22 PM Michal Hocko wrote: > > > On Thu 11-09-14 16:32:50, Rafael J. Wysocki wrote: > > > > On Thursday, September 11, 2014 04:10:51 PM Micha

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-12 Thread Tejun Heo
On Thu, Sep 11, 2014 at 06:30:04PM +0200, Michal Hocko wrote: > > I am wondering if the folllowing check makes any sense with regarding > > to rule out PM freeze: > > > > if ((!pm_nosig_freezing && !pm_freezing) && > > cgroup_freezing(current) && test_thread_flag(TIF_MEMDIE)) >

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-12 Thread Tejun Heo
Hello, Michal. On Wed, Sep 10, 2014 at 03:24:17PM +0200, Michal Hocko wrote: > What do you think about this way to help distinguish kernel threads and > user processes and keep the future maintenance of freezer saner? I'm not sure either way. Please note that we have quite a few wrappers around

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Michal Hocko
On Wed 10-09-14 13:30:25, Cong Wang wrote: > On Mon, Sep 8, 2014 at 4:29 PM, Cong Wang wrote: > > On Mon, Sep 8, 2014 at 4:42 PM, Rafael J. Wysocki > > wrote: > >> On Monday, September 08, 2014 04:16:15 PM Cong Wang wrote: > >>> On Mon, Sep 8, 2014 at 4:23 PM, Rafael J. Wysocki > >>> wrote: >

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Michal Hocko
On Thu 11-09-14 16:52:50, Rafael J. Wysocki wrote: > On Thursday, September 11, 2014 04:28:22 PM Michal Hocko wrote: > > On Thu 11-09-14 16:32:50, Rafael J. Wysocki wrote: > > > On Thursday, September 11, 2014 04:10:51 PM Michal Hocko wrote: > > > > On Thu 11-09-14 16:26:56, Rafael J. Wysocki wrote

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Rafael J. Wysocki
On Thursday, September 11, 2014 04:28:22 PM Michal Hocko wrote: > On Thu 11-09-14 16:32:50, Rafael J. Wysocki wrote: > > On Thursday, September 11, 2014 04:10:51 PM Michal Hocko wrote: > > > On Thu 11-09-14 16:26:56, Rafael J. Wysocki wrote: > > > > On Thursday, September 11, 2014 04:04:48 PM Micha

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Michal Hocko
On Thu 11-09-14 16:32:50, Rafael J. Wysocki wrote: > On Thursday, September 11, 2014 04:10:51 PM Michal Hocko wrote: > > On Thu 11-09-14 16:26:56, Rafael J. Wysocki wrote: > > > On Thursday, September 11, 2014 04:04:48 PM Michal Hocko wrote: > > > > On Thu 11-09-14 16:17:56, Rafael J. Wysocki wrote

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Rafael J. Wysocki
On Thursday, September 11, 2014 04:10:51 PM Michal Hocko wrote: > On Thu 11-09-14 16:26:56, Rafael J. Wysocki wrote: > > On Thursday, September 11, 2014 04:04:48 PM Michal Hocko wrote: > > > On Thu 11-09-14 16:17:56, Rafael J. Wysocki wrote: > > > [...] > > > > And I'm still wondering if the OOM ki

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Michal Hocko
On Thu 11-09-14 16:17:56, Rafael J. Wysocki wrote: [...] > And I'm still wondering if the OOM killer may be made avoid killing frozen > tasks. This is really tricky. OOM killer aims at the biggest memory hog. We shouldn't ignore it just because it hides into the fridge... So even if we "fix" oom k

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Michal Hocko
On Thu 11-09-14 16:26:56, Rafael J. Wysocki wrote: > On Thursday, September 11, 2014 04:04:48 PM Michal Hocko wrote: > > On Thu 11-09-14 16:17:56, Rafael J. Wysocki wrote: > > [...] > > > And I'm still wondering if the OOM killer may be made avoid killing frozen > > > tasks. > > > > This is really

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Rafael J. Wysocki
On Thursday, September 11, 2014 04:04:48 PM Michal Hocko wrote: > On Thu 11-09-14 16:17:56, Rafael J. Wysocki wrote: > [...] > > And I'm still wondering if the OOM killer may be made avoid killing frozen > > tasks. > > This is really tricky. OOM killer aims at the biggest memory hog. We > shouldn'

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Rafael J. Wysocki
On Thursday, September 11, 2014 03:08:40 PM Michal Hocko wrote: > On Wed 10-09-14 15:24:17, Michal Hocko wrote: > > On Tue 09-09-14 22:53:32, Rafael J. Wysocki wrote: > > > On Wednesday, September 10, 2014 01:46:58 AM Tejun Heo wrote: > > > > Hello, > > > > > > > > On Tue, Sep 09, 2014 at 06:06:25

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-11 Thread Michal Hocko
On Wed 10-09-14 15:24:17, Michal Hocko wrote: > On Tue 09-09-14 22:53:32, Rafael J. Wysocki wrote: > > On Wednesday, September 10, 2014 01:46:58 AM Tejun Heo wrote: > > > Hello, > > > > > > On Tue, Sep 09, 2014 at 06:06:25PM +0200, Michal Hocko wrote: > > > > > Even for userland tasks, try_to_free

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-10 Thread Cong Wang
On Wed, Sep 10, 2014 at 4:38 PM, Rafael J. Wysocki wrote: > On Wednesday, September 10, 2014 01:30:25 PM Cong Wang wrote: >> I am wondering if the folllowing check makes any sense with regarding >> to rule out PM freeze: >> >> if ((!pm_nosig_freezing && !pm_freezing) && >> cgro

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-10 Thread Rafael J. Wysocki
On Wednesday, September 10, 2014 01:30:25 PM Cong Wang wrote: > On Mon, Sep 8, 2014 at 4:29 PM, Cong Wang wrote: > > On Mon, Sep 8, 2014 at 4:42 PM, Rafael J. Wysocki > > wrote: > >> On Monday, September 08, 2014 04:16:15 PM Cong Wang wrote: > >>> On Mon, Sep 8, 2014 at 4:23 PM, Rafael J. Wysock

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-10 Thread Cong Wang
On Mon, Sep 8, 2014 at 4:29 PM, Cong Wang wrote: > On Mon, Sep 8, 2014 at 4:42 PM, Rafael J. Wysocki wrote: >> On Monday, September 08, 2014 04:16:15 PM Cong Wang wrote: >>> On Mon, Sep 8, 2014 at 4:23 PM, Rafael J. Wysocki >>> wrote: >>> > >>> > The reason why it matters for the suspend-time f

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-10 Thread Michal Hocko
On Tue 09-09-14 22:53:32, Rafael J. Wysocki wrote: > On Wednesday, September 10, 2014 01:46:58 AM Tejun Heo wrote: > > Hello, > > > > On Tue, Sep 09, 2014 at 06:06:25PM +0200, Michal Hocko wrote: > > > > Even for userland tasks, try_to_freeze() can currently be anywhere in > > > > the kernel. The

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-09 Thread Cong Wang
On Tue, Sep 9, 2014 at 1:48 PM, Rafael J. Wysocki wrote: > On Wednesday, September 10, 2014 12:23:36 AM Tejun Heo wrote: >> On Tue, Sep 09, 2014 at 05:16:55PM +0200, Michal Hocko wrote: >> > But OOM killer doesn't kill kernel threads as they do not own any >> > memory. So the check should be safe,

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-09 Thread Rafael J. Wysocki
On Wednesday, September 10, 2014 01:46:58 AM Tejun Heo wrote: > Hello, > > On Tue, Sep 09, 2014 at 06:06:25PM +0200, Michal Hocko wrote: > > > Even for userland tasks, try_to_freeze() can currently be anywhere in > > > the kernel. The frequently used ones are few but there are some odd > > > > I

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-09 Thread Rafael J. Wysocki
On Wednesday, September 10, 2014 12:23:36 AM Tejun Heo wrote: > On Tue, Sep 09, 2014 at 05:16:55PM +0200, Michal Hocko wrote: > > But OOM killer doesn't kill kernel threads as they do not own any > > memory. So the check should be safe, no? > > Even for userland tasks, try_to_freeze() can currentl

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-09 Thread Michal Hocko
On Wed 10-09-14 01:46:58, Tejun Heo wrote: > Hello, > > On Tue, Sep 09, 2014 at 06:06:25PM +0200, Michal Hocko wrote: > > > Even for userland tasks, try_to_freeze() can currently be anywhere in > > > the kernel. The frequently used ones are few but there are some odd > > > > I always thought tha

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-09 Thread Tejun Heo
Hello, On Tue, Sep 09, 2014 at 06:06:25PM +0200, Michal Hocko wrote: > > Even for userland tasks, try_to_freeze() can currently be anywhere in > > the kernel. The frequently used ones are few but there are some odd > > I always thought that user space tasks can be in the fridge only on the > way

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-09 Thread Michal Hocko
On Wed 10-09-14 00:23:36, Tejun Heo wrote: > On Tue, Sep 09, 2014 at 05:16:55PM +0200, Michal Hocko wrote: > > But OOM killer doesn't kill kernel threads as they do not own any > > memory. So the check should be safe, no? > > Even for userland tasks, try_to_freeze() can currently be anywhere in >

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-09 Thread Tejun Heo
On Tue, Sep 09, 2014 at 05:16:55PM +0200, Michal Hocko wrote: > But OOM killer doesn't kill kernel threads as they do not own any > memory. So the check should be safe, no? Even for userland tasks, try_to_freeze() can currently be anywhere in the kernel. The frequently used ones are few but there

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-09 Thread Michal Hocko
On Tue 09-09-14 07:50:12, Tejun Heo wrote: > Hello, > > On Tue, Sep 09, 2014 at 12:48:28AM +0200, Rafael J. Wysocki wrote: > > Well, not exactly from anywhere. Just from where try_to_freeze() is called > > I suppose? > > Yeap, anywhere try_to_freeze() may be called. > > > Which means that if th

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Rafael J. Wysocki
On Monday, September 08, 2014 04:29:24 PM Cong Wang wrote: > On Mon, Sep 8, 2014 at 4:42 PM, Rafael J. Wysocki wrote: > > On Monday, September 08, 2014 04:16:15 PM Cong Wang wrote: > >> On Mon, Sep 8, 2014 at 4:23 PM, Rafael J. Wysocki > >> wrote: > >> > > >> > The reason why it matters for the

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Cong Wang
On Mon, Sep 8, 2014 at 4:42 PM, Rafael J. Wysocki wrote: > On Monday, September 08, 2014 04:16:15 PM Cong Wang wrote: >> On Mon, Sep 8, 2014 at 4:23 PM, Rafael J. Wysocki wrote: >> > >> > The reason why it matters for the suspend-time freezing is that we freeze >> > tasks >> > to take them out o

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Rafael J. Wysocki
On Monday, September 08, 2014 04:16:15 PM Cong Wang wrote: > On Mon, Sep 8, 2014 at 4:23 PM, Rafael J. Wysocki wrote: > > > > The reason why it matters for the suspend-time freezing is that we freeze > > tasks > > to take them out of the picture entirely until they are thawed. Therefore > > we

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Cong Wang
On Mon, Sep 8, 2014 at 4:23 PM, Rafael J. Wysocki wrote: > > The reason why it matters for the suspend-time freezing is that we freeze > tasks > to take them out of the picture entirely until they are thawed. Therefore we > can't allow them to go back to the picture just for a while until they a

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Rafael J. Wysocki
On Monday, September 08, 2014 04:00:41 PM Cong Wang wrote: > On Mon, Sep 8, 2014 at 4:15 PM, Rafael J. Wysocki wrote: > > On Tuesday, September 09, 2014 07:50:12 AM Tejun Heo wrote: > >> Hello, > >> > >> On Tue, Sep 09, 2014 at 12:48:28AM +0200, Rafael J. Wysocki wrote: > >> > Well, not exactly fr

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Cong Wang
On Mon, Sep 8, 2014 at 4:15 PM, Rafael J. Wysocki wrote: > On Tuesday, September 09, 2014 07:50:12 AM Tejun Heo wrote: >> Hello, >> >> On Tue, Sep 09, 2014 at 12:48:28AM +0200, Rafael J. Wysocki wrote: >> > Well, not exactly from anywhere. Just from where try_to_freeze() is called >> > I suppose?

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Rafael J. Wysocki
On Tuesday, September 09, 2014 07:50:12 AM Tejun Heo wrote: > Hello, > > On Tue, Sep 09, 2014 at 12:48:28AM +0200, Rafael J. Wysocki wrote: > > Well, not exactly from anywhere. Just from where try_to_freeze() is called > > I suppose? > > Yeap, anywhere try_to_freeze() may be called. > > > Which

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Tejun Heo
Hello, On Tue, Sep 09, 2014 at 12:48:28AM +0200, Rafael J. Wysocki wrote: > Well, not exactly from anywhere. Just from where try_to_freeze() is called > I suppose? Yeap, anywhere try_to_freeze() may be called. > Which means that if this is a user space task, it won't to a lot before dying, > wi

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Rafael J. Wysocki
On Tuesday, September 09, 2014 07:22:53 AM Tejun Heo wrote: > On Mon, Sep 08, 2014 at 11:53:34PM +0200, Rafael J. Wysocki wrote: > > But please tell me this: If TIF_MEMDIE is set and we thaw the process, > > can it do *anything* before dying or will it die immediately? > > The task could be in fre

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Tejun Heo
On Mon, Sep 08, 2014 at 11:53:34PM +0200, Rafael J. Wysocki wrote: > But please tell me this: If TIF_MEMDIE is set and we thaw the process, > can it do *anything* before dying or will it die immediately? The task could be in freezer from anywhere and there's no limit in what the task may do before

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Rafael J. Wysocki
On Monday, September 08, 2014 01:58:30 PM Cong Wang wrote: > On Mon, Sep 8, 2014 at 1:54 PM, Rafael J. Wysocki wrote: > > On Monday, September 08, 2014 10:40:17 AM Cong Wang wrote: > >> > >> We asked you to comment on either if this patch is safe for PM freeze > >> if we don't have the cgroup_free

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Cong Wang
On Mon, Sep 8, 2014 at 1:54 PM, Rafael J. Wysocki wrote: > On Monday, September 08, 2014 10:40:17 AM Cong Wang wrote: >> >> We asked you to comment on either if this patch is safe for PM freeze >> if we don't have the cgroup_freezing() check, or if it is not safe why (so >> that >> I can put it i

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Rafael J. Wysocki
On Monday, September 08, 2014 10:40:17 AM Cong Wang wrote: > On Fri, Sep 5, 2014 at 4:32 PM, Rafael J. Wysocki wrote: > > On Saturday, September 06, 2014 07:45:54 AM Tejun Heo wrote: > >> Hello, > >> > >> On Fri, Sep 05, 2014 at 11:12:24AM -0700, Cong Wang wrote: > >> > > Rafael, can you please he

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-08 Thread Cong Wang
On Fri, Sep 5, 2014 at 4:32 PM, Rafael J. Wysocki wrote: > On Saturday, September 06, 2014 07:45:54 AM Tejun Heo wrote: >> Hello, >> >> On Fri, Sep 05, 2014 at 11:12:24AM -0700, Cong Wang wrote: >> > > Rafael, can you please help? >> > >> > Rafael is known not responsive at least for this topic. :

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-05 Thread Rafael J. Wysocki
On Saturday, September 06, 2014 07:45:54 AM Tejun Heo wrote: > Hello, > > On Fri, Sep 05, 2014 at 11:12:24AM -0700, Cong Wang wrote: > > > Rafael, can you please help? > > > > Rafael is known not responsive at least for this topic. :) > > :( Well, am I? I haven't commented patches in this thre

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-05 Thread Tejun Heo
Hello, On Fri, Sep 05, 2014 at 11:12:24AM -0700, Cong Wang wrote: > > Rafael, can you please help? > > Rafael is known not responsive at least for this topic. :) :( > > Shouldn't the primary goal of the comment be explaining why we need > > TIF_MEMDIE check there at all anyway? The deadlock po

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-05 Thread Cong Wang
On Fri, Sep 5, 2014 at 11:00 AM, Tejun Heo wrote: > On Fri, Sep 05, 2014 at 09:31:50AM -0700, Cong Wang wrote: >> On Fri, Sep 5, 2014 at 7:08 AM, Tejun Heo wrote: >> >> + /* It might not be safe to check TIF_MEMDIE for pm freeze. */ >> > >> > This is just another representation of the followi

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-05 Thread Tejun Heo
On Fri, Sep 05, 2014 at 09:31:50AM -0700, Cong Wang wrote: > On Fri, Sep 5, 2014 at 7:08 AM, Tejun Heo wrote: > >> + /* It might not be safe to check TIF_MEMDIE for pm freeze. */ > > > > This is just another representation of the following code which isn't > > particularly useful. Wouldn't it

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-05 Thread Michal Hocko
On Fri 05-09-14 09:43:52, Cong Wang wrote: > On Fri, Sep 5, 2014 at 7:08 AM, Tejun Heo wrote: > > > > Prolly should sta...@vger.kernel.org? > > Oh, yes. I assume the maintainer (Michal?) will send it to stable I guess you meant Rafael. > once it is accepted, or I can do that after it is merged.

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-05 Thread Cong Wang
On Fri, Sep 5, 2014 at 7:08 AM, Tejun Heo wrote: > > Prolly should sta...@vger.kernel.org? Oh, yes. I assume the maintainer (Michal?) will send it to stable once it is accepted, or I can do that after it is merged. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-05 Thread Cong Wang
On Fri, Sep 5, 2014 at 7:08 AM, Tejun Heo wrote: >> + /* It might not be safe to check TIF_MEMDIE for pm freeze. */ > > This is just another representation of the following code which isn't > particularly useful. Wouldn't it be better if the comment actually > explains why this might not be s

Re: [Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-05 Thread Tejun Heo
Hello, On Thu, Sep 04, 2014 at 03:30:41PM -0700, Cong Wang wrote: ... > Cc: David Rientjes > Cc: Michal Hocko > Cc: "Rafael J. Wysocki" > Cc: Tejun Heo > Cc: Andrew Morton > Acked-by: Michal Hocko > Signed-off-by: Cong Wang Prolly should sta...@vger.kernel.org? > +static bool should_thaw_

[Patch v4 1/2] freezer: check OOM kill while being frozen

2014-09-04 Thread Cong Wang
There is a race condition between OOM killer and freezer when they try to operate on the same process, something like below: Process A Process B Process C trigger page fault then trigger oom B=oom_scan_process_thread() cgroup free