From patchwork Wed Aug 19 04:26:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Duyck X-Patchwork-Id: 11722493 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD14C138C 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 96F1E20882 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 96F1E20882 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) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9A2706B0036; Wed, 19 Aug 2020 00:27:02 -0400 (EDT) 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 8BADB8D0001; Wed, 19 Aug 2020 00:27:02 -0400 (EDT) X-Original-To: linux-mm@kvack.org 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-Spam-Summary: 1,0,0,2cc79fb7be34752f,d41d8cd98f00b204,alexander.duyck@gmail.com,,RULES_HIT:41:69:152:355:379:966:967:973:988:989:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2196:2198:2199:2200:2393:2525:2559:2563:2682:2685:2693:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3743:3865:3866:3867:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4385:4605:5007:6119:6120:6261:6653:6742:7903:9025:9413:9707:10004:10400:11026:11232:11658:11914:12043:12291:12296:12297:12438:12517:12519:12663:12679:12683:12760:13069:13161:13211:13229:13311:13357:13845:14095:14096:14181:14687:14721:21060:21080:21444:21451:21524:21627:21666:21740:21987:30003:30034:30054,0,RBL:209.85.222.193:@gmail.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100;04yr7w533d3e78dta9u6aj6gmudawop7zjnayfg51nndohoas48ke7bfk74hxr1.prh4am7g5nrfo3ko8auw7dxh1uor8w1t79g1qpqkkqbffxjqgkpm8f535cjhy3s.r-lbl8.mailshell .net-223 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 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(-) --