linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] oom-reaper: use madvise_dontneed() instead of unmap_page_range()
Date: Mon, 19 Dec 2016 15:38:40 +0100	[thread overview]
Message-ID: <20161219143840.GK5164@dhcp22.suse.cz> (raw)
In-Reply-To: <20161216141556.75130-4-kirill.shutemov@linux.intel.com>

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

  parent reply	other threads:[~2016-12-19 14:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 14:15 [PATCH 1/4] mm: drop zap_details::ignore_dirty Kirill A. Shutemov
2016-12-16 14:15 ` [PATCH 2/4] mm: drop zap_details::check_swap_entries Kirill A. Shutemov
2016-12-19 14:29   ` Michal Hocko
2016-12-16 14:15 ` [PATCH 3/4] mm: drop unused argument of zap_page_range() Kirill A. Shutemov
2016-12-16 17:02   ` kbuild test robot
2016-12-19 14:35   ` Michal Hocko
2016-12-16 14:15 ` [PATCH 4/4] oom-reaper: use madvise_dontneed() instead of unmap_page_range() Kirill A. Shutemov
2016-12-16 16:10   ` kbuild test robot
2016-12-16 16:45   ` kbuild test robot
2016-12-19 11:39   ` Tetsuo Handa
2016-12-19 14:00     ` Michal Hocko
2016-12-19 14:38   ` Michal Hocko [this message]
2016-12-19 14:22 ` [PATCH 1/4] mm: drop zap_details::ignore_dirty Michal Hocko

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=20161219143840.GK5164@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).