From patchwork Fri Jan 18 17:51:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 10771357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33A1A6C5 for ; Fri, 18 Jan 2019 17:52:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 236D82FB87 for ; Fri, 18 Jan 2019 17:52:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16D7A2FC0E; Fri, 18 Jan 2019 17:52:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACB202FB87 for ; Fri, 18 Jan 2019 17:52:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D05DA8E0011; Fri, 18 Jan 2019 12:52:09 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id CB3258E0002; Fri, 18 Jan 2019 12:52:09 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B7D5D8E0011; Fri, 18 Jan 2019 12:52:09 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id 618468E0002 for ; Fri, 18 Jan 2019 12:52:09 -0500 (EST) Received: by mail-ed1-f69.google.com with SMTP id e17so5196841edr.7 for ; Fri, 18 Jan 2019 09:52:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=oJAP/potus7kSDKt4pUHIFnn7W7cakTIxSUPolk2DRg=; b=M8aZO/f+zoaVlbbrOVCESDeyBDOTV5TVNYPpsnFrFWrZjo9gF6cTS8rVBP5/KCe4HL KBvXSYvtKq4Rd+iQgrd43Bwb7VafjHt+hZymVwsBMJ2Lisivw/0jRJSqhCjjd48LbQEh M7loyAvubCATJw1WlajBvdgPXCsuqZwa2LyBoZNy1ON8jB1WUO+jtSOWn9n43Wtyt1aS 4dqcDB2Fd5I1/Y/tD/7GxffTk/RUu3a6pPwC95yXn5pTGtXKh4DBfuvsqn6BqTdfzjic qsRqtrWMQmffCu+MY47AfF309hPooIj2Df8drG6shqJv8OZCrNP0fDGFRP+nEgqrTbGX hI4Q== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 81.17.249.35 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Gm-Message-State: AJcUukfQ2+WqUFaV+tFaNCIR5npEWMjtEm1Ftd8eczeCGjK+0LV5iNZz vCouB1QXsnQMdRi4v88hPRMom0jqRUFLzVWZv18xNZ1TgXcfX06KsNxtTV1RZS+8Tjms1/RWaNy 3Tuj5YQF95hlZba/zfTkEobyFPHtVMCouyIUaYiRVQAcDW7tVHUFblvOO9kJVGX9wXQ== X-Received: by 2002:a50:86c2:: with SMTP id 2mr16825868edu.34.1547833928872; Fri, 18 Jan 2019 09:52:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Dm12wdvC5cm9/TE339RczVJwsM8QmlbnGl4KTPiNNPXnhKC+WspqhheURB7zWMiOMLd7X X-Received: by 2002:a50:86c2:: with SMTP id 2mr16825814edu.34.1547833927795; Fri, 18 Jan 2019 09:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547833927; cv=none; d=google.com; s=arc-20160816; b=cP2IYaKlcpVdJ1xS9bJP65t5YtW4qISlarcDt94yWMUVYx8HVy1+2mgIacGgfCMnTO 5peh5BFHT5KS3Ptyww5bxi4iMid+x1krlq1NLfzTlgh1GuqTJBclAoqNyQLo/wRrcASk tNGdeSJ7tqfDoWaj72KCLDun2KJ+r1EjRpF2gzBIF4se6fordpn9fBrPy9xZ6+8NSvAj haM3Cx9zvo5kWz9TgthiTwgyzmfm8Bo8P6qI+EaA9viUGxG4gtlM6NBYr+fIIn+3JcYc /RuvnfJGqhhVi/6dHLX6y4qFGY7NUf+VFZSPGBiIYAqxZEETsLMjX8HBcD9br89cAfei L9RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=oJAP/potus7kSDKt4pUHIFnn7W7cakTIxSUPolk2DRg=; b=mHR5d6npYnyKvXHYKJg7+5qBlEfnS50j5a6EJS5n9bjC7HembyAP+VnAx0/Y6dF3sz NApD2ckoiPp1aveEx4nb4u3jfgQs7D0WdFA4EN1+/k1o6AwnIZ4az6t1nybboLjj66qP aYY0fSa6y+FuSZszDGSsXfBZ6c2kqoXTqtSUUT33A0qBfamx6SXih3EDvqSQI+wPK/wW hRGxT+NqhXPIM06Mjf7+wi9qDEQFekRevz2rBLm7ve7R+rEl2Z3liReRlkYY1SRFQBok jdvuFGhSL5j9VcIhILOTF5IXMgAYBlGJwbX4gEuvLDvcIbu6+uRjWUjr9qb9b/sgJamq cFKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 81.17.249.35 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from outbound-smtp04.blacknight.com (outbound-smtp04.blacknight.com. [81.17.249.35]) by mx.google.com with ESMTPS id x17-v6si7755173eji.266.2019.01.18.09.52.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 09:52:07 -0800 (PST) Received-SPF: pass (google.com: domain of mgorman@techsingularity.net designates 81.17.249.35 as permitted sender) client-ip=81.17.249.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 81.17.249.35 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp04.blacknight.com (Postfix) with ESMTPS id 7CB4A98C35 for ; Fri, 18 Jan 2019 17:52:07 +0000 (UTC) Received: (qmail 31214 invoked from network); 18 Jan 2019 17:52:07 -0000 Received: from unknown (HELO stampy.163woodhaven.lan) (mgorman@techsingularity.net@[37.228.229.96]) by 81.17.254.9 with ESMTPA; 18 Jan 2019 17:52:07 -0000 From: Mel Gorman To: Andrew Morton Cc: David Rientjes , Andrea Arcangeli , Vlastimil Babka , Linux List Kernel Mailing , Linux-MM , Mel Gorman Subject: [PATCH 02/22] mm, compaction: Rearrange compact_control Date: Fri, 18 Jan 2019 17:51:16 +0000 Message-Id: <20190118175136.31341-3-mgorman@techsingularity.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190118175136.31341-1-mgorman@techsingularity.net> References: <20190118175136.31341-1-mgorman@techsingularity.net> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka --- mm/internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index 5564841fce36..867af5425432 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -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 */