Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2af5b3a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: treat indirectly reclaimable memory as available in MemAvailable"

parents 8cb2feb0 f0ea4506
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@ enum node_stat_item {
	NR_VMSCAN_IMMEDIATE,	/* Prioritise for reclaim when writeback ends */
	NR_DIRTIED,		/* page dirtyings since bootup */
	NR_WRITTEN,		/* page writings since bootup */
	NR_INDIRECTLY_RECLAIMABLE_BYTES, /* measured in bytes */
	NR_VM_NODE_STAT_ITEMS
};

+7 −0
Original line number Diff line number Diff line
@@ -4320,6 +4320,13 @@ long si_mem_available(void)
	available += global_page_state(NR_SLAB_RECLAIMABLE) -
		     min(global_page_state(NR_SLAB_RECLAIMABLE) / 2, wmark_low);

	/*
	 * Part of the kernel memory, which can be released under memory
	 * pressure.
	 */
	available += global_node_page_state(NR_INDIRECTLY_RECLAIMABLE_BYTES) >>
		PAGE_SHIFT;

	if (available < 0)
		available = 0;
	return available;
+1 −0
Original line number Diff line number Diff line
@@ -973,6 +973,7 @@ const char * const vmstat_text[] = {
	"nr_vmscan_immediate_reclaim",
	"nr_dirtied",
	"nr_written",
	"nr_indirectly_reclaimable",

	/* enum writeback_stat_item counters */
	"nr_dirty_threshold",