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


Groups > linux.kernel > #1617682

Re: Is it safe for kthreadd to drain_all_pages?

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: Is it safe for kthreadd to drain_all_pages?
Date 2017-04-06 11:00 +0200
Message-ID <ttbqP-6ei-67@gated-at.bofh.it> (permalink)
References <tt0lI-7Md-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed 05-04-17 13:59:49, Hugh Dickins wrote:
> Hi Mel,
> 
> I suspect that it's not safe for kthreadd to drain_all_pages();
> but I haven't studied flush_work() etc, so don't really know what
> I'm talking about: hoping that you will jump to a realization.
> 
> 4.11-rc has been giving me hangs after hours of swapping load.  At
> first they looked like memory leaks ("fork: Cannot allocate memory");
> but for no good reason I happened to do "cat /proc/sys/vm/stat_refresh"
> before looking at /proc/meminfo one time, and the stat_refresh stuck
> in D state, waiting for completion of flush_work like many kworkers.
> kthreadd waiting for completion of flush_work in drain_all_pages().
> 
> But I only noticed that pattern later: originally tried to bisect
> rc1 before rc2 came out, but underestimated how long to wait before
> deciding a stage good - I thought 12 hours, but would now say 2 days.
> Too late for bisection, I suspect your drain_all_pages() changes.

Yes, this is a fallout from Mel's changes. I was about to say that
my follow up fixes which made this flushing to the single WQ with rescuer
fixed that but it seems that
http://www.ozlabs.org/~akpm/mmotm/broken-out/mm-move-pcp-and-lru-pcp-drainging-into-single-wq.patch
didn't make it to the Linus tree. Could you re-test with this one?
While your change is obviously correct I think the above should address
it as well and it is more generic. If it works then I will ask Andrew to
send the above to Linus (along with its follow up
mm-move-pcp-and-lru-pcp-drainging-into-single-wq-fix.patch)
-- 
Michal Hocko
SUSE Labs

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


Thread

Is it safe for kthreadd to drain_all_pages? Hugh Dickins <hughd@google.com> - 2017-04-05 23:10 +0200
  Re: Is it safe for kthreadd to drain_all_pages? Michal Hocko <mhocko@kernel.org> - 2017-04-06 11:00 +0200
  Re: Is it safe for kthreadd to drain_all_pages? Mel Gorman <mgorman@techsingularity.net> - 2017-04-06 15:10 +0200
    Re: Is it safe for kthreadd to drain_all_pages? Hugh Dickins <hughd@google.com> - 2017-04-06 21:00 +0200
      Re: Is it safe for kthreadd to drain_all_pages? Hugh Dickins <hughd@google.com> - 2017-04-07 18:30 +0200
        Re: Is it safe for kthreadd to drain_all_pages? Michal Hocko <mhocko@kernel.org> - 2017-04-07 18:50 +0200
          Re: Is it safe for kthreadd to drain_all_pages? Hugh Dickins <hughd@google.com> - 2017-04-07 19:00 +0200
            Re: Is it safe for kthreadd to drain_all_pages? Michal Hocko <mhocko@kernel.org> - 2017-04-07 19:30 +0200
              Re: Is it safe for kthreadd to drain_all_pages? Hugh Dickins <hughd@google.com> - 2017-04-07 20:50 +0200
                Re: Is it safe for kthreadd to drain_all_pages? Hugh Dickins <hughd@google.com> - 2017-04-08 19:10 +0200
                Re: Is it safe for kthreadd to drain_all_pages? Mel Gorman <mgorman@techsingularity.net> - 2017-04-08 20:10 +0200

csiph-web