From patchwork Fri Dec 14 23:02:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 10731771 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 E4A0313AD for ; Fri, 14 Dec 2018 23:03:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 890422D639 for ; Fri, 14 Dec 2018 23:03:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77A2C2D63D; Fri, 14 Dec 2018 23:03:15 +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 E41B52D639 for ; Fri, 14 Dec 2018 23:03:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9169B8E0217; Fri, 14 Dec 2018 18:03:13 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 887738E01DC; Fri, 14 Dec 2018 18:03:13 -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 777D58E0219; Fri, 14 Dec 2018 18:03:13 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by kanga.kvack.org (Postfix) with ESMTP id 1B0D58E0216 for ; Fri, 14 Dec 2018 18:03:13 -0500 (EST) Received: by mail-ed1-f72.google.com with SMTP id e17so3418500edr.7 for ; Fri, 14 Dec 2018 15:03:13 -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=8ylXBwUHUp/AHX4BZPSE6g0fwobKPJEsFH/Fxi+Stfo=; b=IBMJLZ1RNJFHmrJY2rSFiaxQgYYbbkoBqhtCQY45apt5sxW9zX0opImDiXDBg0l+w7 E09LV9XVuFsJmMXkWpxXLzqcO6x1ZxfCgAjNFaSZUC3FrHKs3wYbm8qvigtufnLDRIfF 15bIIaL8GlMIMH7eh0pviuWUwjkh/WEwLSWpjaNaF35PoAo2fwjXTGqCWMYZgX+3wxd2 ZVr7YqcmmShyQsykNTmA46Hl5vj47qp1g8J8ItqjLtuO35gwVnV4enFS4Q0Ih977cvM/ S8nLEz0v93EsXuROf7MJWKJC9ib4LM8GrGhReqDCxSJst/ddFzuGJ3DPz3Alpte/kMW2 mJxg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.15 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Gm-Message-State: AA+aEWanKJQCHea/r1YPrKtQM0yg7bpMIGO5vhmNkCszqYUx9h0dHpaS M8/1ez+/GMFHLPTwzzauE2Y/Gm6OEawXfjaDEsbfz9hpCZzBJDChNhUt8dobky6X/5v10aUf3TE HNIZrqtIktrpUfxgjnuj7Hajf4Vqgno0fl/IrmQpaQfQsiffMfrVIJNrHgxS6OOtvJw== X-Received: by 2002:aa7:c703:: with SMTP id i3mr176278edq.170.1544828592608; Fri, 14 Dec 2018 15:03:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/VwQNxgSniiaw7jyLs0SHL69yNTkLToq+JEdkwlqPXxu6az5WsyvXu/qALF+g7InLD3vx5C X-Received: by 2002:aa7:c703:: with SMTP id i3mr176251edq.170.1544828591657; Fri, 14 Dec 2018 15:03:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544828591; cv=none; d=google.com; s=arc-20160816; b=btJQ+62gD7z5Hj5iVpp4X0J0Xu4/FYKIg7YvtodtfrPlEScQzx5Gwm4IryVkjigf/k /GxUTt1MaF+CM8HD2kaF6573zWbvcyO7V/rXRsmYXr0D0EJzCp26+SXG9l+9CElwK3C6 ExS8yLHuRKHG1v1WbOSNbdnnR0bAjCeE2T5D7M+aY8kIhEGHwfntvCUpJR3464dPOMJ+ fKcxr+ch8Z04QKCntOluXLUiWh9hFGsmmXx8U1/CiY+J6kHIAsuc5tLjvmnNaKbV4pph T2JAQq90SNnnjAtKkVez9jbfW/5peoIv3w57So2p2mgrY0iRKyApovca0+pr67Uhcj5U bItQ== 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=8ylXBwUHUp/AHX4BZPSE6g0fwobKPJEsFH/Fxi+Stfo=; b=oAs+sTyT505AsQKPJrZaiGsiMG0RtMzC+73uNikRpjVwWWrTF2n8P0H6OSjchvNzFD 1z7/5UQB6bnH4Wn76Pa1MiVv/kzSDaoEQpW61Klh38JlRLQdMYeXM5olGNwVSaSFQvEw dUJGTGRPj05Sq3aVOCS5Cm7KuyP9uI3v/UPIe6XNFHnEOh8JBHqOr/T653tbzi/M+J+j eBs2dIOrzi4TfWpw4jE6dMQeYkzkcGyxV/FQCN8Grkys1mJ7CZ/zSOu77gWFkpRUHt5Z zazeGSVPzT+UNR4lvHM6Dz72IGpyChiAu/2+Hzj8rByV+SIvTXnsQNu7sG+jVdhDefXK Im3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.15 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from outbound-smtp10.blacknight.com (outbound-smtp10.blacknight.com. [46.22.139.15]) by mx.google.com with ESMTPS id hk19-v6si195815ejb.253.2018.12.14.15.03.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 15:03:11 -0800 (PST) Received-SPF: pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.15 as permitted sender) client-ip=46.22.139.15; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.15 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp10.blacknight.com (Postfix) with ESMTPS id 54D231C1D19 for ; Fri, 14 Dec 2018 23:03:11 +0000 (GMT) Received: (qmail 31182 invoked from network); 14 Dec 2018 23:03:11 -0000 Received: from unknown (HELO stampy.163woodhaven.lan) (mgorman@techsingularity.net@[37.228.245.71]) by 81.17.254.9 with ESMTPA; 14 Dec 2018 23:03:11 -0000 From: Mel Gorman To: Linux-MM Cc: David Rientjes , Andrea Arcangeli , Linus Torvalds , Michal Hocko , ying.huang@intel.com, kirill@shutemov.name, Andrew Morton , Linux List Kernel Mailing , Mel Gorman Subject: [PATCH 02/14] mm, compaction: Rearrange compact_control Date: Fri, 14 Dec 2018 23:02:58 +0000 Message-Id: <20181214230310.572-3-mgorman@techsingularity.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20181214230310.572-1-mgorman@techsingularity.net> References: <20181214230310.572-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 */