From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9210EC433E1 for ; Wed, 19 Aug 2020 04:27:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3C45420772 for ; Wed, 19 Aug 2020 04:27:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LNxAKNkP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C45420772 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9F30C8D0001; Wed, 19 Aug 2020 00:27:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A2706B0036; Wed, 19 Aug 2020 00:27:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8BADB8D0001; Wed, 19 Aug 2020 00:27:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id 7A6F66B0033 for ; Wed, 19 Aug 2020 00:27:02 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 306D9180AD81A for ; Wed, 19 Aug 2020 04:27:02 +0000 (UTC) X-FDA: 77166033084.12.pan07_5805faa27025 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id EFB8E180085F9 for ; Wed, 19 Aug 2020 04:27:01 +0000 (UTC) X-HE-Tag: pan07_5805faa27025 X-Filterd-Recvd-Size: 4956 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Aug 2020 04:27:01 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id g26so20538775qka.3 for ; Tue, 18 Aug 2020 21:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=6h612JI2s0g5y4Ra24/kFs/yiArKTc1sB1o5qgaZ/yA=; b=LNxAKNkPYb4d+9N1/y9oUHLhX61kCIDjUBthQJ7A+5jMmKKB0C+Lv50He4t5SJQZTy L2JVj53G4ItXbzZAJpmXd2RUU4bNLcRG7dT4aMeHwMd/LhrckJ4LxNKRoNAYQNchSUrd ngQlflwv1GSSfQiAmYTIwGlUiHdbt1Y9eyam0cCfh5xO756GrdchR4hinz2jWLBHHwMy UPZCJp2C9hGe5uxoIyI39NAt1X8qOQu7qibpJ+lfUO4DsinFdI3vOgjN0pBE1U8ZYXAS tD7jnvOY6pm6XVJFFrpNdi28Jgihb4pRUESe4xonX7brqf6enMEk4Xy5GJgPavb/eEZT 8G6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=6h612JI2s0g5y4Ra24/kFs/yiArKTc1sB1o5qgaZ/yA=; b=UsegPacR6WX1WZ+i2Kyk8+M8kV+DX24xYpr7fASutsTPZxEzzGIFzJUpGuWnF8KwM6 goGSSoyXQzFbB040k7s9Y3aW/zfDKHcr6IH9BK71PWwSV1NkxugGFQti2EZjEFLyud5a teVp+zkYqPVVWCrcoxm0VMncNd4HBKXA7iHcV0WYzZ1aQWU5sm/tEcNXumWe9lmyJf4T VOj+IAbfzVAvTmBjutqkFgwNCu238lUiy9MEvmh3a13cfK9kHIfvRr7bR4yi7WUcoH/F w2rOXL9Ci/Ue7aqoZvcXObzwGhrwThxRaRSI9bobnFLx8J5LX87OjOOJcgFO3psGuRXD 8B6w== X-Gm-Message-State: AOAM530ue4QxUoQjhMbzv3+hcfLCMifvfhKF9vXpT0uQBsRpOSrrlSVa KolH5KCBbdbwoUYd/o9rvDk= X-Google-Smtp-Source: ABdhPJylEsOCdjZdF2eeYykig8JI40Wf/lz3GHwFqsez2w2N902LfrVnwird2UDZxzuMrxfmvnRANw== X-Received: by 2002:a37:68c1:: with SMTP id d184mr20369324qkc.62.1597811220457; Tue, 18 Aug 2020 21:27:00 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id q68sm22892666qke.123.2020.08.18.21.26.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Aug 2020 21:27:00 -0700 (PDT) Subject: [RFC PATCH v2 0/5] Minor cleanups and performance optimizations for LRU rework From: Alexander Duyck To: alex.shi@linux.alibaba.com Cc: yang.shi@linux.alibaba.com, lkp@intel.com, rong.a.chen@intel.com, khlebnikov@yandex-team.ru, kirill@shutemov.name, hughd@google.com, linux-kernel@vger.kernel.org, alexander.duyck@gmail.com, daniel.m.jordan@oracle.com, linux-mm@kvack.org, shakeelb@google.com, willy@infradead.org, hannes@cmpxchg.org, tj@kernel.org, cgroups@vger.kernel.org, akpm@linux-foundation.org, richard.weiyang@gmail.com, mgorman@techsingularity.net, iamjoonsoo.kim@lge.com Date: Tue, 18 Aug 2020 21:26:57 -0700 Message-ID: <20200819041852.23414.95939.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: EFB8E180085F9 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: So this patch set addresses a few minor issues I have found and is based on the lrunext branch of the tree at: https://github.com/alexshi/linux.git The first three patches address various issues if ound with the patch set such as the fact that we were skipping non-LRU compound pages one 4K page at a time, the fact that test_and_set_skip had been made redundant by the fact that the LRU bit made the setting of the bit exclusive per pageblock, and the fact that we were using put_page while holding the LRU lock. The last two patches are some patches I have been experimenting with. Basically trying to reduce the number of times the LRU lock has to be released and reacquired by batching LRU work together, or deferring the freeing/returning of pages to LRU in the case of move_pages_to_lru. I am still working on generating data but for the fourth patch I have seen an improvement of about 5% on the will-it-scale/page_fault2 test with THP enabled by default, however that is just some preliminary data and I still have a number of tests left to run. --- Alexander Duyck (5): mm: Identify compound pages sooner in isolate_migratepages_block mm: Drop use of test_and_set_skip in favor of just setting skip mm: Add explicit page decrement in exception path for isolate_lru_pages mm: Split release_pages work into 3 passes mm: Split move_pages_to_lru into 3 separate passes mm/compaction.c | 84 +++++++++++++++--------------------------- mm/swap.c | 109 ++++++++++++++++++++++++++++++++++--------------------- mm/vmscan.c | 77 +++++++++++++++++++++++---------------- 3 files changed, 142 insertions(+), 128 deletions(-) --