From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753387AbbGJHko (ORCPT ); Fri, 10 Jul 2015 03:40:44 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:36120 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752586AbbGJHkh (ORCPT ); Fri, 10 Jul 2015 03:40:37 -0400 Date: Fri, 10 Jul 2015 09:40:32 +0200 From: Michal Hocko To: David Rientjes Cc: Andrew Morton , Jakob Unterwurzacher , linux-mm@kvack.org, LKML Subject: Re: [PATCH 2/4] oom: Do not invoke oom notifiers on sysrq+f Message-ID: <20150710074032.GA7343@dhcp22.suse.cz> References: <1436360661-31928-1-git-send-email-mhocko@suse.com> <1436360661-31928-3-git-send-email-mhocko@suse.com> <20150709085505.GB13872@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 09-07-15 14:07:37, David Rientjes wrote: > On Thu, 9 Jul 2015, Michal Hocko wrote: [...] > > So I am not > > sure it belongs outside of the oom killer proper. > > > > Umm it has nothing to do with oom killing, it quite obviously doesn't > belong in the oom killer. The naming of the API would disagree. To me register_oom_notifier sounds like a mechanism to be notified when we are oom. > It belongs prior to invoking the oom killer if memory could be freed. Shrinkers are there to reclaim and prevent from OOM. This API is a gray zone. It looks generic method for the notification yet it allows to prevent from oom killer. I can imagine somebody might abuse this interface to implement OOM killer policies. Anyway, I think it would be preferable to kill it altogether rather than play with its placing. It will always be a questionable API. [...] -- Michal Hocko SUSE Labs