Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1596432

Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread.

From Andrew Morton <akpm@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread.
Date 2017-03-09 23:40 +0100
Message-ID <tjeSZ-32y-5@gated-at.bofh.it> (permalink)
References <tj4JX-4BF-7@gated-at.bofh.it> <tj4JX-4BF-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 9 Mar 2017 19:46:14 +0900 Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:

> Tetsuo Handa wrote:
> > This patch adds a watchdog which periodically reports number of memory
> > allocating tasks, dying tasks and OOM victim tasks when some task is
> > spending too long time inside __alloc_pages_slowpath(). This patch also
> > serves as a hook for obtaining additional information using SystemTap
> > (e.g. examine other variables using printk(), capture a crash dump by
> > calling panic()) by triggering a callback only when a stall is detected.
> > Ability to take administrator-controlled actions based on some threshold
> > is a big advantage gained by introducing a state tracking.
> > 
> > Commit 63f53dea0c9866e9 ("mm: warn about allocations which stall for
> > too long") was a great step for reducing possibility of silent hang up
> > problem caused by memory allocation stalls [1]. However, there are
> > reports of long stalls (e.g. [2] is over 30 minutes!) and lockups (e.g.
> > [3] is an "unable to invoke the OOM killer due to !__GFP_FS allocation"
> > lockup problem) where this patch is more useful than that commit, for
> > this patch can report possibly related tasks even if allocating tasks
> > are unexpectedly blocked for so long. Regarding premature OOM killer
> > invocation, tracepoints which can accumulate samples in short interval
> > would be useful. But regarding too late to report allocation stalls,
> > this patch which can capture all tasks (for reporting overall situation)
> > in longer interval and act as a trigger (for accumulating short interval
> > samples) would be useful.
)
> Andrew, do you have any questions on this patch?
> I really need this patch for finding bugs which MM people overlook.

(top-posting repaired - please don't do that)

Undecided.  I can see the need but it is indeed quite a large lump of
code.  Perhaps some additional examples of how this new code was used
to understand and improve real-world kernel problems would be persuasive.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-03-09 12:50 +0100
  Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread. Andrew Morton <akpm@linux-foundation.org> - 2017-03-09 23:40 +0100
    Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread. Michal Hocko <mhocko@kernel.org> - 2017-03-10 11:50 +0100
      Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-03-10 12:30 +0100
        Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread. Brian Foster <bfoster@redhat.com> - 2017-03-10 15:00 +0100
        Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread. Michal Hocko <mhocko@kernel.org> - 2017-03-10 16:30 +0100
          Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-03-11 02:50 +0100
            Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread. Michal Hocko <mhocko@kernel.org> - 2017-03-13 10:50 +0100
              Re: [PATCH v7] mm: Add memory allocation watchdog kernel thread. Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-03-13 14:50 +0100

csiph-web