From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADE6CC4338F for ; Mon, 2 Aug 2021 14:50:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 056EB60F70 for ; Mon, 2 Aug 2021 14:50:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 056EB60F70 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 964016B0033; Mon, 2 Aug 2021 10:50:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 914126B0036; Mon, 2 Aug 2021 10:50:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 829BC6B005D; Mon, 2 Aug 2021 10:50:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0215.hostedemail.com [216.40.44.215]) by kanga.kvack.org (Postfix) with ESMTP id 65CD46B0033 for ; Mon, 2 Aug 2021 10:50:46 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 16B311C9B3 for ; Mon, 2 Aug 2021 14:50:46 +0000 (UTC) X-FDA: 78430427292.03.083F33F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf08.hostedemail.com (Postfix) with ESMTP id 9F4ED3002500 for ; Mon, 2 Aug 2021 14:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627915845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JKF801/nYauGcMfbC5O3GsLvI6SfQQJO7GZapt9n7eY=; b=QIpI0I7pELdYy7g3/w+bu/jMSfRcQZms6NdHU2uRxhVmPJ0fkVMUWXqig98su2baVDzsRV ri3W56Ge96+bjo02B/7EB7Zh6TdLRa66pROMyQUAZbnt8d2rFQ58nDwHBnL2pmdHMyPsgO JweGgBojVSEyt7pLIiEhh85SLEpLqiI= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-285-u5O27r7iMBSFtm0pNF6_Rg-1; Mon, 02 Aug 2021 10:50:43 -0400 X-MC-Unique: u5O27r7iMBSFtm0pNF6_Rg-1 Received: by mail-wr1-f70.google.com with SMTP id d7-20020adffd870000b02901544ea2018fso3456214wrr.10 for ; Mon, 02 Aug 2021 07:50:43 -0700 (PDT) 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:message-id:references :mime-version:content-disposition:in-reply-to; bh=JKF801/nYauGcMfbC5O3GsLvI6SfQQJO7GZapt9n7eY=; b=StonZNhk9TSYKkxgA/9Wn6SU+GKBcfnv78KK01/2v0zIPd+ENte6GecTnEPleWgRNV qoeKwPuEH32WYJak7UqgdSixYGLDvmsKOznLUgtFA4iWq4E6BUNTgoT0aLtWUz8LWcmM LPhmD4b7bmjggp2xmGRosFKBLLFBanY+Y4uCcmG4W0uISjAo/lN2GDdsb+JHqjo3rBOL m3SLh9vVGsy0IiEP7tREET2MnPvm/IDOPZ289o0iuWeV5GkbX18xZiajCg6G2aB3Mxt5 9NR992u6yVa+bgxauc1Boon1altq3lNBXX9Uhfa7YqXg/Rlq0Jd9FE11T9otZsbId5AR Zgyg== X-Gm-Message-State: AOAM533RFNFA4+MNUF7+b9G1MMAZqW+rQzZGqAAHZS0pEPFQDUK83dsz AaRWflejHdhOSjWcQpdNnD6ml/9sHpsIMdnD7IhvW45QseaD/XUtyw5dU0ueqqmBU5dTjlyDsMJ z2UmdbyP5Ug== X-Received: by 2002:a1c:4e12:: with SMTP id g18mr11555801wmh.165.1627915842870; Mon, 02 Aug 2021 07:50:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRe8WKPg8hxQ6J9MYGdy56w2042hvGMFgaYmv5rKPDB1BXU0ynn2eaovw/RaGbFMLSeZIZQg== X-Received: by 2002:a1c:4e12:: with SMTP id g18mr11555780wmh.165.1627915842678; Mon, 02 Aug 2021 07:50:42 -0700 (PDT) Received: from localhost (79-67-181-135.dynamic.dsl.as9105.com. [79.67.181.135]) by smtp.gmail.com with ESMTPSA id q64sm6982845wma.8.2021.08.02.07.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 07:50:42 -0700 (PDT) Date: Mon, 2 Aug 2021 15:50:41 +0100 From: Aaron Tomlin To: David Rientjes Cc: linux-mm@kvack.org, akpm@linux-foundation.org, mhocko@suse.com, penguin-kernel@i-love.sakura.ne.jp, llong@redhat.com, neelx@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm/oom_kill: show oom eligibility when displaying the current memory state of all tasks Message-ID: <20210802145041.w7lqdt77qguwbwag@ava.usersys.com> X-PGP-Key: http://pgp.mit.edu/pks/lookup?search=atomlin%40redhat.com X-PGP-Fingerprint: 7906 84EB FA8A 9638 8D1E 6E9B E2DE 9658 19CC 77D6 References: <20210730162002.279678-1-atomlin@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9F4ED3002500 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QIpI0I7p; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf08.hostedemail.com: domain of atomlin@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=atomlin@redhat.com X-Stat-Signature: mixtykr64mwoye81tpp1my3xb1fs4ron X-HE-Tag: 1627915845-13921 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun 2021-08-01 20:49 -0700, David Rientjes wrote: > oom_score_adj is shown already in the tasklist dump, I'm not sure what > value this adds. Fair enough. > > > + else if (test_bit(MMF_OOM_SKIP, &p->mm->flags) > > + return "R"; > > + else if (in_vfork(p)) > > + return "V"; > > This is going to be racy, we can't show that a task that is emitted as > part of the tasklist dump was did not have in_vfork() == true at the time > oom_badness() was called. Yes, this is true. > Wouldn't it be better to simply print the output of oom_badness() to the > tasklist dump instead so we get complete information? I think this would be acceptable. > We could simply special case a LONG_MIN return value as -1000 or "min". Agreed. Kind regards, -- Aaron Tomlin