Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp37680imm; Thu, 28 Jun 2018 13:26:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJPiRmceXD5RQHKqWvlSlsbKcC5cnPm+ELYH+cXptYG0+qM5h+fqR+oWq6G9nVjkcsRckPX X-Received: by 2002:a17:902:585:: with SMTP id f5-v6mr11935293plf.142.1530217575550; Thu, 28 Jun 2018 13:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530217575; cv=none; d=google.com; s=arc-20160816; b=Ik9iVhmHPO6CjBN6Y4Q0fe8GUta9XABam1qPvDxD4uGu4HFt+KIu62HgrgKetBXTN3 4sAhdL+F3fZWszSy5XQWO6RA9rL/zlER4o+9+7NFZY8eRH4VijE9JIlumh8ES8FuWg4j KI3tIqk40ucOrvAV47RJ/O2i1z9Asvn7qvImp8FXoP9LEkeEGEE6C0KZ8HtGJxoklQS8 Y3REsF5OMOlNm2JkPooLYOwUovOhP593J7aqxHhuGxys9fEqCKbsF+tpPBSOgdxs1JKi SugQRMI032kGj/6sCKeScvEVy/OurVv5OQLzVG5vXboKxn8794TrmGkUxi66e3JtVo8j +alQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=G3FsPdxhsid+inmNWhOsoe4Qi52aXVrXXnnbcZpqbyg=; b=L3e1tNgPQdlQPzw3rWY7O5aKymHkrgvQolnzOlYWZNAwnSMqcESjI2BNN/yibI+ecl e+3uC8ZDLSdbFnyeZRjLjbqHO4KJfCyTS8RHv26YsA8yFCK7g4ryyIixZcblihkLHA/t SuRBojJSH6LzBFTBVvfgsWhLPc1zWx9dHxs3MooQC2lUCgJ1HWG3C88nOzAPOU09dma3 9+/Pxb5+eWMXo684UPexM0OeSPbpT30LLPnT3PI0NzJN8C6wd95YNyz7YeCRoYO87DOx 9LS74WuMJxnzMIirvoid0P6kL+hzueBFHSZfNxag5wQZwthgjEw50CdtLA1GZonOz3+n 2Rqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si6732949pgr.68.2018.06.28.13.25.53; Thu, 28 Jun 2018 13:26:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030577AbeF1TDm (ORCPT + 99 others); Thu, 28 Jun 2018 15:03:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:39018 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S968009AbeF1TDj (ORCPT ); Thu, 28 Jun 2018 15:03:39 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A414BACFA; Thu, 28 Jun 2018 19:03:35 +0000 (UTC) Date: Thu, 28 Jun 2018 13:39:42 +0200 From: Michal Hocko To: "Paul E. McKenney" Cc: Tetsuo Handa , David Rientjes , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm,oom: Bring OOM notifier callbacks to outside of OOM killer. Message-ID: <20180628113942.GD32348@dhcp22.suse.cz> References: <1529493638-6389-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <20180621073142.GA10465@dhcp22.suse.cz> <2d8c3056-1bc2-9a32-d745-ab328fd587a1@i-love.sakura.ne.jp> <20180626170345.GA3593@linux.vnet.ibm.com> <20180627072207.GB32348@dhcp22.suse.cz> <20180627143125.GW3593@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180627143125.GW3593@linux.vnet.ibm.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 27-06-18 07:31:25, Paul E. McKenney wrote: > On Wed, Jun 27, 2018 at 09:22:07AM +0200, Michal Hocko wrote: > > On Tue 26-06-18 10:03:45, Paul E. McKenney wrote: > > [...] > > > 3. Something else? > > > > How hard it would be to use a different API than oom notifiers? E.g. a > > shrinker which just kicks all the pending callbacks if the reclaim > > priority reaches low values (e.g. 0)? > > Beats me. What is a shrinker? ;-) This is a generich mechanism to reclaim memory that is not on standard LRU lists. Lwn.net surely has some nice coverage (e.g. https://lwn.net/Articles/548092/). > More seriously, could you please point me at an exemplary shrinker > use case so I can see what is involved? Well, I am not really sure what is the objective of the oom notifier to point you to the right direction. IIUC you just want to kick callbacks to be handled sooner under a heavy memory pressure, right? How is that achieved? Kick a worker? -- Michal Hocko SUSE Labs