linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org, "David (ChunMing) Zhou" <David1.Zhou@amd.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Doug Ledford" <dledford@redhat.com>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"Mike Marciniszyn" <mike.marciniszyn@intel.com>,
	"Dennis Dalessandro" <dennis.dalessandro@intel.com>,
	"Sudeep Dutt" <sudeep.dutt@intel.com>,
	"Ashutosh Dixit" <ashutosh.dixit@intel.com>,
	"Dimitri Sivanich" <sivanich@sgi.com>,
	"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
	"Juergen Gross" <jgross@suse.com>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Andrea Arcangeli" <aarcange@redhat.com>,
	"Felix Kuehling" <felix.kuehling@amd.com>,
	kvm@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	linux-rdma@vger.kernel.org, xen-devel@lists.xenproject.org,
	"Christian König" <christian.koenig@amd.com>,
	"David Rientjes" <rientjes@google.com>,
	"Leon Romanovsky" <leonro@mellanox.com>
Subject: Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers
Date: Tue, 24 Jul 2018 12:53:07 -0700	[thread overview]
Message-ID: <20180724125307.d6035c447adf46b2d74dfbd7@linux-foundation.org> (raw)
In-Reply-To: <20180724141747.GP28386@dhcp22.suse.cz>

On Tue, 24 Jul 2018 16:17:47 +0200 Michal Hocko <mhocko@kernel.org> wrote:

> On Fri 20-07-18 17:09:02, Andrew Morton wrote:
> [...]
> > - Undocumented return value.
> > 
> > - comment "failed to reap part..." is misleading - sounds like it's
> >   referring to something which happened in the past, is in fact
> >   referring to something which might happen in the future.
> > 
> > - fails to call trace_finish_task_reaping() in one case
> > 
> > - code duplication.
> > 
> > - Increases mmap_sem hold time a little by moving
> >   trace_finish_task_reaping() inside the locked region.  So sue me ;)
> > 
> > - Sharing the finish: path means that the trace event won't
> >   distinguish between the two sources of finishing.
> > 
> > Please take a look?
> 
> oom_reap_task_mm should return false when __oom_reap_task_mm return
> false. This is what my patch did but it seems this changed by
> http://www.ozlabs.org/~akpm/mmotm/broken-out/mm-oom-remove-oom_lock-from-oom_reaper.patch
> so that one should be fixed.
> 
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 104ef4a01a55..88657e018714 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -565,7 +565,7 @@ static bool oom_reap_task_mm(struct task_struct *tsk, struct mm_struct *mm)
>  	/* failed to reap part of the address space. Try again later */
>  	if (!__oom_reap_task_mm(mm)) {
>  		up_read(&mm->mmap_sem);
> -		return true;
> +		return false;
>  	}
>  
>  	pr_info("oom_reaper: reaped process %d (%s), now anon-rss:%lukB, file-rss:%lukB, shmem-rss:%lukB\n",

OK, thanks, I added that.

> 
> On top of that the proposed cleanup looks as follows:
> 

Looks good to me.  Seems a bit strange that we omit the pr_info()
output if the mm was partially reaped - people would still want to know
this?   Not very important though.

  reply	other threads:[~2018-07-24 19:53 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 11:50 [PATCH] mm, oom: distinguish blockable mode for mmu notifiers Michal Hocko
2018-07-16 23:12 ` Andrew Morton
2018-07-17  4:03   ` Leon Romanovsky
2018-07-17  8:12   ` Michal Hocko
2018-07-20 23:01     ` Andrew Morton
2018-07-23  8:43       ` Michal Hocko
2018-07-19  9:12 ` Michal Hocko
2018-07-21  0:09 ` Andrew Morton
2018-07-23  7:03   ` Michal Hocko
2018-07-23  7:11     ` Michal Hocko
2018-07-23  8:11       ` Michal Hocko
2018-07-24 14:17   ` Michal Hocko
2018-07-24 19:53     ` Andrew Morton [this message]
2018-07-25  6:17       ` Michal Hocko
2018-07-24 21:07     ` David Rientjes
2018-07-25  6:13       ` Michal Hocko
2018-08-24 10:54 ` Tetsuo Handa
2018-08-24 11:32   ` Michal Hocko
2018-08-24 11:43     ` Christian König
2018-08-24 11:52       ` Michal Hocko
2018-08-24 11:57         ` Christian König
2018-08-24 12:03           ` Michal Hocko
2018-08-24 12:18             ` Christian König
2018-08-24 12:33               ` Michal Hocko
2018-08-24 12:52                 ` Christian König
2018-08-24 13:01                   ` Michal Hocko
2018-08-24 13:10                     ` Christian König
2018-08-24 13:24                       ` Michal Hocko
2018-08-24 13:28                         ` Christian König
2018-08-24 13:40                           ` Michal Hocko
2018-08-24 13:44                             ` Christian König
2018-08-24 13:52                               ` Michal Hocko
2018-08-26  8:40                                 ` Tetsuo Handa
2018-08-27  7:41                                   ` Christian König
2018-09-06 22:46                                     ` Tetsuo Handa
2018-08-24 15:08                 ` Jerome Glisse
2018-08-24 11:36   ` Michal Hocko
2018-08-24 13:02     ` Tetsuo Handa
2018-08-24 13:32       ` Michal Hocko
2018-08-24 14:52         ` Tetsuo Handa
2018-08-24 15:12           ` Jerome Glisse
2018-08-24 16:40             ` Michal Hocko
2018-08-24 17:33               ` Jerome Glisse
2018-08-24 16:38           ` Michal Hocko
2018-08-24 14:40   ` Jerome Glisse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180724125307.d6035c447adf46b2d74dfbd7@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=David1.Zhou@amd.com \
    --cc=aarcange@redhat.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ashutosh.dixit@intel.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=christian.koenig@amd.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felix.kuehling@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=jglisse@redhat.com \
    --cc=jgross@suse.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=leonro@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mike.marciniszyn@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=rientjes@google.com \
    --cc=rkrcmar@redhat.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sivanich@sgi.com \
    --cc=sudeep.dutt@intel.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).