Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933115AbdCGSqh (ORCPT ); Tue, 7 Mar 2017 13:46:37 -0500 Received: from mx2.suse.de ([195.135.220.15]:44415 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755719AbdCGSnq (ORCPT ); Tue, 7 Mar 2017 13:43:46 -0500 From: Vlastimil Babka To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Johannes Weiner , Mel Gorman , Joonsoo Kim , David Rientjes , kernel-team@fb.com, Vlastimil Babka Subject: [PATCH v3 1/8] mm, compaction: reorder fields in struct compact_control Date: Tue, 7 Mar 2017 14:15:38 +0100 Message-Id: <20170307131545.28577-2-vbabka@suse.cz> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170307131545.28577-1-vbabka@suse.cz> References: <20170307131545.28577-1-vbabka@suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2195 Lines: 47 While currently there are (mostly by accident) no holes in struct compact_control (on x86_64), but we are going to add more bool flags, so place them all together to the end of the structure. While at it, just order all fields from largest to smallest. Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: Johannes Weiner --- mm/internal.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index 823a7a89099b..05c48a95a20a 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -183,6 +183,7 @@ 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 long nr_freepages; /* Number of isolated free pages */ unsigned long nr_migratepages; /* Number of pages to migrate */ unsigned long total_migrate_scanned; @@ -190,16 +191,15 @@ struct compact_control { 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 */ + const gfp_t gfp_mask; /* gfp mask of a direct compactor */ + int order; /* order a direct compactor needs */ + const unsigned int alloc_flags; /* alloc flags of a direct compactor */ + const int classzone_idx; /* zone index of a direct compactor */ enum migrate_mode mode; /* Async or sync migration mode */ bool ignore_skip_hint; /* Scan blocks even if marked skip */ bool ignore_block_suitable; /* Scan blocks considered unsuitable */ bool direct_compaction; /* False from kcompactd or /proc/... */ bool whole_zone; /* Whole zone should/has been scanned */ - int order; /* order a direct compactor needs */ - const gfp_t gfp_mask; /* gfp mask of a direct compactor */ - const unsigned int alloc_flags; /* alloc flags of a direct compactor */ - const int classzone_idx; /* zone index of a direct compactor */ - struct zone *zone; bool contended; /* Signal lock or sched contention */ }; -- 2.12.0