Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1685248pxy; Mon, 2 Aug 2021 07:51:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHOykd3P7ynX/NqY9eq8/IKYYQ0Mpxi/0zGEtfW+wI2fJqIl5zJsFmUYVbXaqrQ1UaD8Z2 X-Received: by 2002:a05:6e02:790:: with SMTP id q16mr868326ils.290.1627915916467; Mon, 02 Aug 2021 07:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627915916; cv=none; d=google.com; s=arc-20160816; b=iIHMCay1yKqj4mRYJlMmlwxsWLu9ayJjdr4YYGwy0GHmpNdYzwyo1AAJCXFPh/OxY3 WD4polxkViBCkJK6ony+e1uc5n4VMliHMxkbpiwYeGoXJv0DmfEbmK+6bmk2jjUfnq38 VH0enGWioLzi813dJxoTM+/WaUnHnfaDLIWuGIbrEMtIWlp4V43WU8tLutT/3f/zC6qp pvsUiIUGWmB8x3miqi2S+01boownUgfPt0848Gu2uzb2SjgHyvD0P6reBTZtywv8TpIx MBggTKgekX5o3b65tSY289tBq9VBZvPUYjbfMqJuAlO8TnzvNDfjZ6zrGdqJegVSPua7 V48w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JKF801/nYauGcMfbC5O3GsLvI6SfQQJO7GZapt9n7eY=; b=soIC71yr63cidWoq9a9AN9C9CvuThqfb+wuMdbFqG85/icNl6WaO7kbkuOzSbW5+8a XVE8Hiw54aqoOcUAvyqNBJvAEnttq7RwM7JlMy+nbLkjnJw/pqJClshkbwkRfzkjJ/dy Y/xCv4iuP14k1daV+0ttePVWdEpFl5UluwOFgm2hPLjIthcI3NbTTfflSRVD03It3XnD ZBYnfUFqHMvYD5mLkdS0qpHTTlNz6vpI0MULSfJY5KrcXpMF6ihy1PP/7nQeg/uan2j4 0O6BFfAlx8U2B7OKvr5jEUjLAppePfL4Y5GPbwnslGSEYfx4M7Ngf1sYvz2Q2B+JTNnj PZbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QIpI0I7p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si12993202ios.26.2021.08.02.07.51.31; Mon, 02 Aug 2021 07:51:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QIpI0I7p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234165AbhHBOuz (ORCPT + 99 others); Mon, 2 Aug 2021 10:50:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52050 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233925AbhHBOuz (ORCPT ); Mon, 2 Aug 2021 10:50:55 -0400 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-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-335-Tsh70T_pPyOJvdX1u5r7jQ-1; Mon, 02 Aug 2021 10:50:43 -0400 X-MC-Unique: Tsh70T_pPyOJvdX1u5r7jQ-1 Received: by mail-wm1-f69.google.com with SMTP id u14-20020a7bcb0e0000b0290248831d46e4so55307wmj.6 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=AI4ooY550qnaq+Mibs12538NCpJ2ocwweciFJ+qDUNtgPogLgTph63gYNa2ZbBveHy 4QxUIFZqkCejxqYSPDbgU2bx2+Nv/+l7f984IyVxi9+MQF6y8He2eoGxwS9x23QjRXOD ait7VttMTpBDa8Dpaz2hwrzV0QVmmDXxGH0I0V+DxPREqomZdxg7ebZAK70+Y0J9nS9O w9S7G8iLXJCzR7J/RwowQlfeOmkk2hN+dRoWCofj0J92BY1Su7+C4GURuC4QTOAYLIYl Iuk4QuiGO8zDdn/36vgAtYqRcpXItZ37PJxlP1rohiUwPFd114b2379F+4qeyA2CjD6K Q4Rg== X-Gm-Message-State: AOAM532Qn4Ct6mODSlPuA8wkCNFG8zSh25/+ZxY59ZL5i++qhJA2UuxJ qt1o+U/r8ZzvOKSEj3ZtaG7qYpLEdbtFdoIKHJ+easFaiSu86yZgkpfzPQubiW2EUOR2L7zRGC6 O/cONaGoeMnncRjcNnm5chVQ= X-Received: by 2002:a1c:4e12:: with SMTP id g18mr11555793wmh.165.1627915842820; Mon, 02 Aug 2021 07:50:42 -0700 (PDT) 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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