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

Commit 0f661148 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds
Browse files

mm, mmzone: clarify the usage of zone padding

Zone padding separates write-intensive fields used by page allocation,
compaction and vmstats but the comments are a little misleading and need
clarification.

Link: http://lkml.kernel.org/r/1467970510-21195-5-git-send-email-mgorman@techsingularity.net


Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 599d0c95
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -477,20 +477,21 @@ struct zone {
	unsigned long		wait_table_hash_nr_entries;
	unsigned long		wait_table_hash_nr_entries;
	unsigned long		wait_table_bits;
	unsigned long		wait_table_bits;


	/* Write-intensive fields used from the page allocator */
	ZONE_PADDING(_pad1_)
	ZONE_PADDING(_pad1_)

	/* free areas of different sizes */
	/* free areas of different sizes */
	struct free_area	free_area[MAX_ORDER];
	struct free_area	free_area[MAX_ORDER];


	/* zone flags, see below */
	/* zone flags, see below */
	unsigned long		flags;
	unsigned long		flags;


	/* Write-intensive fields used from the page allocator */
	/* Primarily protects free_area */
	spinlock_t		lock;
	spinlock_t		lock;


	/* Write-intensive fields used by compaction and vmstats. */
	ZONE_PADDING(_pad2_)
	ZONE_PADDING(_pad2_)


	/* Write-intensive fields used by page reclaim */

	/*
	/*
	 * When free pages are below this point, additional steps are taken
	 * When free pages are below this point, additional steps are taken
	 * when reading the number of free pages to avoid per-cpu counter
	 * when reading the number of free pages to avoid per-cpu counter