mm, compaction: rearrange compact_control
authorMel Gorman <[email protected]>
Tue, 5 Mar 2019 23:44:28 +0000 (15:44 -0800)
committerLinus Torvalds <[email protected]>
Wed, 6 Mar 2019 05:07:16 +0000 (21:07 -0800)
compact_control spans two cache lines with write-intensive lines on
both.  Rearrange so the most write-intensive fields are in the same
cache line.  This has a negligible impact on the overall performance of
compaction and is more a tidying exercise than anything.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Mel Gorman <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Dan Carpenter <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: YueHaibing <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/internal.h

index 5564841fce36a8d50d5efba4d29ed2e25be05b3b..867af5425432aa18046be374a8f9459e6431f132 100644 (file)
@@ -184,14 +184,14 @@ extern int user_min_free_kbytes;
 struct compact_control {
        struct list_head freepages;     /* List of free pages to migrate to */
        struct list_head migratepages;  /* List of pages being migrated */
-       struct zone *zone;
        unsigned int nr_freepages;      /* Number of isolated free pages */
        unsigned int nr_migratepages;   /* Number of pages to migrate */
-       unsigned long total_migrate_scanned;
-       unsigned long total_free_scanned;
        unsigned long free_pfn;         /* isolate_freepages search base */
        unsigned long migrate_pfn;      /* isolate_migratepages search base */
        unsigned long last_migrated_pfn;/* Not yet flushed page being freed */
+       struct zone *zone;
+       unsigned long total_migrate_scanned;
+       unsigned long total_free_scanned;
        const gfp_t gfp_mask;           /* gfp mask of a direct compactor */
        int order;                      /* order a direct compactor needs */
        int migratetype;                /* migratetype of direct compactor */