[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201509301921.EHH90615.MFSHOOtJFQFLVO@I-love.SAKURA.ne.jp>
Date: Wed, 30 Sep 2015 19:21:09 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: rientjes@...gle.com
Cc: mhocko@...nel.org, oleg@...hat.com, torvalds@...ux-foundation.org,
kwalker@...hat.com, cl@...ux.com, akpm@...ux-foundation.org,
hannes@...xchg.org, vdavydov@...allels.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, skozina@...hat.com
Subject: Re: can't oom-kill zap the victim's memory?
Tetsuo Handa wrote:
> (Well, do we need to change __alloc_pages_slowpath() that OOM victims do not
> enter direct reclaim paths in order to avoid being blocked by unkillable fs
> locks?)
I'm not familiar with how fs writeback manages memory. I feel I'm missing
something. Can somebody please re-check whether my illustrations are really
possible?
If they are really possible, I think we have yet another silent hang up
sequence. Say, there are one userspace task named P1 and one kernel thread
named KT1.
(1) P1 enters into kernel mode via write() syscall.
(2) P1 allocates memory for buffered write.
(3) P1 dirties memory allocated for buffered write.
(4) P1 leaves kernel mode.
(5) KT1 finds dirtied memory.
(6) KT1 holds fs's unkillable lock for fs writeback.
(7) KT1 tries to allocate memory for fs writeback, but fails to allocate
because watermark is low. KT1 cannot call out_of_memory() because of
!__GFP_FS allocation.
(8) P1 enters into kernel mode.
(9) P1 calls kmalloc(GFP_KERNEL) and is blocked at unkillable lock for fs
writeback held by KT1.
How do we allow KT1 to make forward progress? Are we giving access to
memory reserves (e.g. ALLOC_NO_WATERMARKS priority) to KT1?
--
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