[lttng-dev] [PATCH lttng-modules 1/3] Fix: Add gfp_flags arg to mm_vmscan_kswapd_wake for 4.17
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Tue May 1 16:44:19 EDT 2018
All 3 patches merged into master, 2.10, 2.9, thanks!
Mathieu
----- On Apr 17, 2018, at 11:07 AM, Michael Jeanson mjeanson at efficios.com wrote:
> See upstream commit:
>
> commit 5ecd9d403ad081ed2de7b118c1e96124d4e0ba6c
> Author: David Rientjes <rientjes at google.com>
> Date: Thu Apr 5 16:25:16 2018 -0700
>
> mm, page_alloc: wakeup kcompactd even if kswapd cannot free more memory
>
> Kswapd will not wakeup if per-zone watermarks are not failing or if too
> many previous attempts at background reclaim have failed.
>
> This can be true if there is a lot of free memory available. For high-
> order allocations, kswapd is responsible for waking up kcompactd for
> background compaction. If the zone is not below its watermarks or
> reclaim has recently failed (lots of free memory, nothing left to
> reclaim), kcompactd does not get woken up.
>
> When __GFP_DIRECT_RECLAIM is not allowed, allow kcompactd to still be
> woken up even if kswapd will not reclaim. This allows high-order
> allocations, such as thp, to still trigger background compaction even
> when the zone has an abundance of free memory.
>
> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> ---
> instrumentation/events/lttng-module/mm_vmscan.h | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/instrumentation/events/lttng-module/mm_vmscan.h
> b/instrumentation/events/lttng-module/mm_vmscan.h
> index a69b42f..9661c9d 100644
> --- a/instrumentation/events/lttng-module/mm_vmscan.h
> +++ b/instrumentation/events/lttng-module/mm_vmscan.h
> @@ -84,6 +84,21 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake,
>
> #endif
>
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
> +LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd,
> +
> + TP_PROTO(int nid, int zid, int order, gfp_t gfp_flags),
> +
> + TP_ARGS(nid, zid, order, gfp_flags),
> +
> + TP_FIELDS(
> + ctf_integer(int, nid, nid)
> + ctf_integer(int, zid, zid)
> + ctf_integer(int, order, order)
> + ctf_integer(gfp_t, gfp_flags, gfp_flags)
> + )
> +)
> +#else
> LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd,
>
> TP_PROTO(int nid, int zid, int order),
> @@ -96,6 +111,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd,
> ctf_integer(int, order, order)
> )
> )
> +#endif
>
> #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
>
> --
> 2.7.4
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list