From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933289AbcLSOip (ORCPT ); Mon, 19 Dec 2016 09:38:45 -0500 Received: from mail-wj0-f194.google.com ([209.85.210.194]:35991 "EHLO mail-wj0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933024AbcLSOin (ORCPT ); Mon, 19 Dec 2016 09:38:43 -0500 Date: Mon, 19 Dec 2016 15:38:40 +0100 From: Michal Hocko To: "Kirill A. Shutemov" Cc: Peter Zijlstra , Rik van Riel , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] oom-reaper: use madvise_dontneed() instead of unmap_page_range() Message-ID: <20161219143840.GK5164@dhcp22.suse.cz> References: <20161216141556.75130-1-kirill.shutemov@linux.intel.com> <20161216141556.75130-4-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161216141556.75130-4-kirill.shutemov@linux.intel.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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