Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1326442
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/5] mm, oom_reaper: report success/failure |
| Date | 2016-02-04 07:50 +0100 |
| Message-ID | <qYlTP-4Zj-7@gated-at.bofh.it> (permalink) |
| References | <qY5vH-2qT-5@gated-at.bofh.it> <qY5vJ-2qT-27@gated-at.bofh.it> <qYeSo-jz-65@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed 03-02-16 15:10:57, David Rientjes wrote:
> On Wed, 3 Feb 2016, Michal Hocko wrote:
>
> > diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> > index 8e345126d73e..b87acdca2a41 100644
> > --- a/mm/oom_kill.c
> > +++ b/mm/oom_kill.c
> > @@ -420,6 +420,7 @@ static struct task_struct *oom_reaper_th;
> > static struct task_struct *task_to_reap;
> > static DECLARE_WAIT_QUEUE_HEAD(oom_reaper_wait);
> >
> > +#define K(x) ((x) << (PAGE_SHIFT-10))
> > static bool __oom_reap_task(struct task_struct *tsk)
> > {
> > struct mmu_gather tlb;
> > @@ -476,6 +477,11 @@ static bool __oom_reap_task(struct task_struct *tsk)
> > }
> > }
> > tlb_finish_mmu(&tlb, 0, -1);
> > + pr_info("oom_reaper: reaped process :%d (%s) anon-rss:%lukB, file-rss:%lukB, shmem-rss:%lulB\n",
> > + task_pid_nr(tsk), tsk->comm,
> > + K(get_mm_counter(mm, MM_ANONPAGES)),
> > + K(get_mm_counter(mm, MM_FILEPAGES)),
> > + K(get_mm_counter(mm, MM_SHMEMPAGES)));
> > up_read(&mm->mmap_sem);
> >
> > /*
>
> This is a bit misleading, it would appear that the rss values are what was
> reaped when in fact they represent just the values of the mm being reaped.
> We have already printed these values as an artifact in the kernel log.
Yes and the idea was to provide the after state to compare before and
after. That's why I have kept the similar format. Just dropped the
virtual memory size because that doesn't make any sense in this context
now.
> I think it would be helpful to show anon-rss after reaping, however, so we
> can compare to the previous anon-rss that was reported. And, I agree that
> leaving behind a message in the kernel log that reaping has been
> successful is worthwhile. So this line should just show what anon-rss is
> after reaping and make it clear that this is not the memory reaped.
Does
"oom_reaper: reaped process %d (%s) current memory anon-rss:%lukB, file-rss:%lukB, shmem-rss:%lukB "
sound any better?
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] oom reaper v5 Michal Hocko <mhocko@kernel.org> - 2016-02-03 14:20 +0100
[PATCH 2/5] oom reaper: handle mlocked pages Michal Hocko <mhocko@kernel.org> - 2016-02-03 14:20 +0100
Re: [PATCH 2/5] oom reaper: handle mlocked pages David Rientjes <rientjes@google.com> - 2016-02-04 01:00 +0100
[PATCH 4/5] mm, oom_reaper: report success/failure Michal Hocko <mhocko@kernel.org> - 2016-02-03 14:20 +0100
Re: [PATCH 4/5] mm, oom_reaper: report success/failure David Rientjes <rientjes@google.com> - 2016-02-04 00:20 +0100
Re: [PATCH 4/5] mm, oom_reaper: report success/failure Michal Hocko <mhocko@kernel.org> - 2016-02-04 07:50 +0100
Re: [PATCH 4/5] mm, oom_reaper: report success/failure David Rientjes <rientjes@google.com> - 2016-02-04 23:40 +0100
Re: [PATCH 4/5] mm, oom_reaper: report success/failure Michal Hocko <mhocko@kernel.org> - 2016-02-05 10:30 +0100
Re: [PATCH 4/5] mm, oom_reaper: report success/failure Michal Hocko <mhocko@kernel.org> - 2016-02-06 07:40 +0100
[PATCH 1/5] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2016-02-03 14:20 +0100
Re: [PATCH 1/5] mm, oom: introduce oom reaper David Rientjes <rientjes@google.com> - 2016-02-04 00:50 +0100
Re: [PATCH 1/5] mm, oom: introduce oom reaper Michal Hocko <mhocko@kernel.org> - 2016-02-04 07:50 +0100
Re: [PATCH 1/5] mm, oom: introduce oom reaper Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-06 14:30 +0100
[PATCH 5/5] mm, oom_reaper: implement OOM victims queuing Michal Hocko <mhocko@kernel.org> - 2016-02-03 14:20 +0100
Re: [PATCH 5/5] mm, oom_reaper: implement OOM victims queuing Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-04 11:50 +0100
Re: [PATCH 5/5] mm, oom_reaper: implement OOM victims queuing Michal Hocko <mhocko@kernel.org> - 2016-02-04 16:00 +0100
Re: [PATCH 5/5] mm, oom_reaper: implement OOM victims queuing Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-06 07:00 +0100
Re: [PATCH 5/5] mm, oom_reaper: implement OOM victims queuing Michal Hocko <mhocko@kernel.org> - 2016-02-06 09:40 +0100
Re: [PATCH 5/5] mm, oom_reaper: implement OOM victims queuing Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-06 16:40 +0100
[PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Michal Hocko <mhocko@kernel.org> - 2016-02-03 14:20 +0100
Re: [PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-04 15:40 +0100
Re: [PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Michal Hocko <mhocko@kernel.org> - 2016-02-04 15:50 +0100
Re: [PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-04 16:10 +0100
Re: [PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Michal Hocko <mhocko@kernel.org> - 2016-02-04 17:40 +0100
Re: [PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-05 12:20 +0100
Re: [PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Michal Hocko <mhocko@kernel.org> - 2016-02-06 09:40 +0100
Re: [PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-06 12:30 +0100
Re: [PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Michal Hocko <mhocko@kernel.org> - 2016-02-06 07:50 +0100
Re: [PATCH 3/5] oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2016-02-06 15:40 +0100
csiph-web