Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp211646imm; Tue, 24 Jul 2018 17:26:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpecLde2iflLQ5e6yCwlqoCVQaLGU9fmqP8xvZdTlrd76tDAySEf05cwDRx91eUBIkBCzRDm X-Received: by 2002:a62:e18:: with SMTP id w24-v6mr19843117pfi.145.1532478383760; Tue, 24 Jul 2018 17:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532478383; cv=none; d=google.com; s=arc-20160816; b=q4n/Gpb5DsJnWwXhkIZrHQTMxAs7cSz8rDN+W+m18pEPD5Xhww8wb5u0yee6cROn5N ordggDwTMwmEP9V7dCDoTm52PqNR/51zE/syjjJxdSYOZ0ud4TEGtwR0J8Ukw7hExgqL keI0aB5pJ4OL/5vjY1xNTgbKTCtN3rtWKA83d7jNPsw7eLoBlTpftw1a1KlRCfUMCztW noDxxfiMe9QqLQTXR3JPcyCpl9cICTCstDBIotM7j2poLzk+cz+EDLZm6pTas4zeuLA9 RMfcAkqkY4e4gZufDgeyvXajcfGchf3yswZE+BHwEwHCxP2w2T4JgITZcI4USC2VSBpu lESQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=QgZvssnrKTIHli3Rh/G+1VC6ypzQuPStSJ35oZ8g1HE=; b=FXQBF7bMkxH4Ce3UwGNJmXOUbGU9EtYwyLOibTxsQVOUMDles06p7KF3Qm3IXQgpx5 f9yssxCGneE5yerNwsGNkI38WcDXN9BZB61rLSAa3KKOfKSGpactDMHteCMK6WKV9rkh Lps7lHtOP75qaLJpk63SiURwWaH21V0yt3hT35a3i50r1jsGN2XtoOVKHlwhHXa08Hnl 96UGkuI2nkbeuriCIVCAR6rsm1576aDA2fuuzsbs5H1KNNyZmOyXRerU+YSlTb+Wpc6K Lwu5G3CQGbk4OJXf3H6PdY+uF6aoTcZMRvBlzHPoXsn5yZlSn+j/AM8Vn4nqAmzjFv7R dIUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vRmKMgw+; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9-v6si2817612plt.302.2018.07.24.17.25.56; Tue, 24 Jul 2018 17:26:23 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=vRmKMgw+; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388557AbeGYBdd (ORCPT + 99 others); Tue, 24 Jul 2018 21:33:33 -0400 Received: from mail-pg1-f176.google.com ([209.85.215.176]:38689 "EHLO mail-pg1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388488AbeGYBdd (ORCPT ); Tue, 24 Jul 2018 21:33:33 -0400 Received: by mail-pg1-f176.google.com with SMTP id k3-v6so4011686pgq.5 for ; Tue, 24 Jul 2018 17:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=QgZvssnrKTIHli3Rh/G+1VC6ypzQuPStSJ35oZ8g1HE=; b=vRmKMgw+/5Tbbk108qba5qHB3t1vXkjjuA2zJQknc+NYn3Z8Qy84XuPE/+PQAW0M79 hEUwrx70hH2H1BVcg6VVKSIxG1iBb83+z9/c5Hn1T5PVxjJJE7iY6e+SOEwI+DZq2N6q SynV7NPSL3MFWR5ONODjRxGlq4SU70i+EOLH/wb/itcG9jEeMypySaf6WphSbq3ZlOOq kJ7zSrhjjgavTld0LMsQVn+rXZaB1Yyc09R5CsCGJAEfDQU3nNhST8NY8fzf8JbPpgzx hL7EsswakCwRaG4dUK8/F46wpiuuOhvwDJ0rzrWmvePMG4XyBzKiEO6ZX377QGz9XhvT Vr3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=QgZvssnrKTIHli3Rh/G+1VC6ypzQuPStSJ35oZ8g1HE=; b=B97yL8ULXAi5QmP2MIarrZQaYrVLPZ8qdC6gJylFuUKjniFAETWUndYkObYju2ZXiI sguCDTEEXEKGTjfMXszbDsmE4MhGS2R0hzQ6aw+8dNsa5YMK8udTX1FRsuxUY+QNW0gK CijgG2y4ezA+COM7yi/jAE3jWFYw1xmlhaHIJTWyyQk2iPt9ChBZ7Ce78YHA3Ra/3W3E dhR855GLbVl7JkXgzDWOgOpcdS4laDWlHAA8KvA06GmNiGG0wSDI9Q4jtIb/S7jf5zAp fY2JP1h/PvxxYF0BDRRJYuoJG6joS12lEoeX8OdaSDFIVQ+kH12xb84ThYpwL8iMcxfp ZiAQ== X-Gm-Message-State: AOUpUlHT7G2uECgjo1BEkspOGt2F+d6afp0T3codk1vv1L2/7OWq+lBr luIaDJ+SMRNNr09PceEYCoF/rJ/oDYk= X-Received: by 2002:a65:58c8:: with SMTP id e8-v6mr17993121pgu.96.1532478273140; Tue, 24 Jul 2018 17:24:33 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id 86-v6sm23429019pfh.0.2018.07.24.17.24.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jul 2018 17:24:31 -0700 (PDT) Date: Tue, 24 Jul 2018 17:24:31 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Tetsuo Handa cc: Andrew Morton , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch v4] mm, oom: fix unnecessary killing of additional processes In-Reply-To: Message-ID: References: <05dbc69a-1c26-adec-15c6-f7192f8d2ae0@i-love.sakura.ne.jp> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Jul 2018, Tetsuo Handa wrote: > > If exit_mmap() gets preempted indefinitely before it can free any memory, > > we are better off oom killing another process. The purpose of the timeout > > is to give an oom victim an amount of time to free its memory and exit > > before selecting another victim. > > > > There is no point with emitting the noise. > If you're concerned about too many printk's to the kernel log, oom_reap_task_mm() could store whether MMF_UNSTABLE was set or not before attempting to reap and then only printk if this was the first oom reaping. We lose the ability to determine if subsequent reaps freed additional memory, but I don't suppose that's too concerning.