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


Groups > linux.kernel > #1586795

Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there
Date 2017-02-23 11:30 +0100
Message-ID <tdYOS-8mZ-3@gated-at.bofh.it> (permalink)
References <tdB5U-7N5-19@gated-at.bofh.it> <tdLHX-7aV-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed 22-02-17 15:16:57, Johannes Weiner wrote:
[...]
> Can we simply count the number of balance_pgdat() runs that didn't
> reclaim anything and have kswapd sleep after MAX_RECLAIM_RETRIES?
> 
> And a follow-up: once it gives up, when should kswapd return to work?
> We used to reset NR_PAGES_SCANNED whenever a page gets freed. But
> that's a branch in a common allocator path, just to recover kswapd - a
> latency tool, not a necessity for functional correctness - from a
> situation that's exceedingly pretty rare. How about we leave it
> disabled until a direct reclaimer manages to free something?

Yes, this makes sense to me and it looks much better than the proposed
solution here. There some theoretical corner cases, like heavy metadata
and GFP_NOFS workload which wouldn't be able to reclaim from FS
shrinkers and kspwad would be really helpful at that time. But that
would need a general solution on its own.

I also welcome removing NR_PAGES_SCANNED, because this was just too
ephemeral to be actually useful when debugging the reclaim behavior.
I think we can accomplish much more by existing tracepoints. I would
just split that up in a separate follow up patch.

Thanks!
-- 
Michal Hocko
SUSE Labs

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


Thread

[RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there  Jia He <hejianet@gmail.com> - 2017-02-22 10:10 +0100
  Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there Michal Hocko <mhocko@kernel.org> - 2017-02-22 12:50 +0100
    Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there hejianet <hejianet@gmail.com> - 2017-02-22 15:40 +0100
      Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there Michal Hocko <mhocko@kernel.org> - 2017-02-22 16:50 +0100
        Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there hejianet <hejianet@gmail.com> - 2017-02-23 03:30 +0100
  Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there Johannes Weiner <hannes@cmpxchg.org> - 2017-02-22 21:30 +0100
    Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there Johannes Weiner <hannes@cmpxchg.org> - 2017-02-22 22:00 +0100
      Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there Michal Hocko <mhocko@kernel.org> - 2017-02-23 08:30 +0100
    Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there Michal Hocko <mhocko@kernel.org> - 2017-02-23 08:30 +0100
    Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there Michal Hocko <mhocko@kernel.org> - 2017-02-23 11:30 +0100
    Re: [RFC PATCH] mm/vmscan: fix high cpu usage of kswapd if there Michal Hocko <mhocko@kernel.org> - 2017-02-23 12:20 +0100

csiph-web