[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161219143840.GK5164@dhcp22.suse.cz>
Date: Mon, 19 Dec 2016 15:38:40 +0100
From: Michal Hocko <mhocko@...nel.org>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Rik van Riel <riel@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] oom-reaper: use madvise_dontneed() instead of
unmap_page_range()
On Fri 16-12-16 17:15:56, Kirill A. Shutemov wrote:
> Logic on whether we can reap pages from the VMA should match what we
> have in madvise_dontneed(). In particular, we should skip, VM_PFNMAP
> VMAs, but we don't now.
>
> Let's just call madvise_dontneed() from __oom_reap_task_mm(), so we
> won't need to sync the logic in the future.
I would rather extract those check into can_madv_dontneed_vma() and use
it in the oom reaper. I am really woried about notifier API which can
sleep or rely on locks or do whatever else.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists