From patchwork Thu Aug 13 04:02:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Duyck X-Patchwork-Id: 11711649 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 E9B46109B for ; Thu, 13 Aug 2020 04:02:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A942420771 for ; Thu, 13 Aug 2020 04:02:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pbMlVToU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A942420771 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 BD05A8D0002; Thu, 13 Aug 2020 00:02:20 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B5B038D0001; Thu, 13 Aug 2020 00:02:20 -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 A24958D0002; Thu, 13 Aug 2020 00:02:20 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0246.hostedemail.com [216.40.44.246]) by kanga.kvack.org (Postfix) with ESMTP id 884898D0001 for ; Thu, 13 Aug 2020 00:02:20 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 44BA94DC1 for ; Thu, 13 Aug 2020 04:02:20 +0000 (UTC) X-FDA: 77144198040.07.stage21_310a9b026ff1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 1CD881803F9AD for ; Thu, 13 Aug 2020 04:02:20 +0000 (UTC) X-Spam-Summary: 1,0,0,b9983e0f7dd68619,d41d8cd98f00b204,alexander.duyck@gmail.com,,RULES_HIT:41:69:152:355:379:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2559:2563:2682:2685:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3865:3866:3867:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4605:5007:6120:6261:6653:6742:8660:8957:9025:9413:10004:10128:10400:11026:11232:11658:11914:12043:12296:12297:12438:12517:12519:12663:12679:12683:12760:13069:13148:13161:13229:13230:13255:13311:13357:14095:14096:14181:14687:14721:21060:21063:21080:21444:21451:21627:21666:21939:30003:30054:30056:30091,0,RBL:209.85.222.195:@gmail.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100;04yf56oepuetcpuxn4sk7e1mwtjmaocqtxj3m9gr6ase34pwr939b9ou31wessc.jcr15refcoattwwqbmb9w71umxysst17a8efatcihi16z1aanobhzu878dw186m.g-lbl8.mailshell.net-223.238.255.100,CacheIP:none ,Bayesia X-HE-Tag: stage21_310a9b026ff1 X-Filterd-Recvd-Size: 4935 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Thu, 13 Aug 2020 04:02:19 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id d14so4118050qke.13 for ; Wed, 12 Aug 2020 21:02:19 -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:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=P1KdIUWFxYzw82EVvLFYFt+MNwT3Xk5xYJFfFDC3pI4=; b=pbMlVToUVOgIRz7b6T0Cmo4L05tlQHpSEVkoGFYVI4InDZqz4mjEonJrT9TjtNOg8b H1zOIK5DzV6MtTsxmV9fSHEIQLgp/HpHSogVOWCoFPhXQ6fJFFwWEdNL+N2CnZ5Lq9Eh KLznw3j1mF7Yruy5bR7H1RwKK4cjJgFtfOyvX0pzuvUqmYwxNC3KQCf7LAfK6G+6ZOar rpdpM45wwqdiH4P8c7aHDPC4mw11hvtSvQcNXzQFAvg25sg0+z3INGyrQmgjMM1H3qEa VyH0kukxWyHrDUZoZ6LRTGeYFuS4MGUaeC8vuTJIpa+DGhF0afM/3v0dej2rrOgFilDF iYRA== 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:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=P1KdIUWFxYzw82EVvLFYFt+MNwT3Xk5xYJFfFDC3pI4=; b=oLMKpsRYlPdvo7ks7HvaaORVL1F5m4M03GzkIxhcUILbsi8eNdxElP0jUWzI8y670G 2dsdyKniDXDeyqGOOoNJzazmi1QTQNEqlRlQUZKnPhrBlfGktez6/4I+y5w+8a+WVjCM XoWTkuIrf5qoORfGzMhYO2BKhF/ysx4W0JhckgRLr7QDOU8oWwWD14Bu6qLGg6kqV6Qx l9noJRno4k0g+r4ZjXUJgj0hQ16aQfw94jRHUO141JxqyNmdoNy8Y+Z37CksYitRmWuz EmtTteVQ2uX2XreAZh3eahPweFQl3B7LA/WhRBXPf4r81c8RQX3WA8PbE4azD3SsmB9e cBsQ== X-Gm-Message-State: AOAM533ITFfnCelL9O96CtRIX7Il8U+vJSCcorx3rV9egDoCSgOOKPEN blADYCdfAKv4yQXA6RXVWos= X-Google-Smtp-Source: ABdhPJzUScI/ggo7Kl82ZaCRO+U2DpmtWJjkKWWj5B4Aq/dBT4HFNpT8fzz6O/LZ5kWWbVs/g/S0og== X-Received: by 2002:ae9:f449:: with SMTP id z9mr3140477qkl.352.1597291338871; Wed, 12 Aug 2020 21:02:18 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id m66sm4215602qkf.86.2020.08.12.21.02.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Aug 2020 21:02:17 -0700 (PDT) Subject: [RFC PATCH 0/3] Re: [PATCH v17 14/21] mm/compaction: do page isolation first in compaction 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: Wed, 12 Aug 2020 21:02:15 -0700 Message-ID: <20200813035100.13054.25671.stgit@localhost.localdomain> In-Reply-To: <3828d045-17e4-16aa-f0e6-d5dda7ad6b1b@linux.alibaba.com> References: <3828d045-17e4-16aa-f0e6-d5dda7ad6b1b@linux.alibaba.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Rspamd-Queue-Id: 1CD881803F9AD X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: Here are the patches I had discussed earlier to address the issues in isolate_migratepages_block. They are based on the tree at: https://github.com/alexshi/linux.git lrunext The first patch is mostly cleanup to address the RCU locking in the function. The second addresses the test_and_set_skip issue, and the third relocates PageCompound. I did some digging into the history of the skip bits and since they are only supposed to be a hint I thought we could probably just drop the testing portion of the call since the LRU flag is preventing more than one thread from accessing the function anyway so it would make sense to just switch it to a set operation similar to what happens when low_pfn == end_pfn at the end of the call. I have only had a chance to build test these since rebasing on the tree. In addition I am not 100% certain the PageCompound changes are correct as they operate on the assumption that get_page_unless_zero is enough to keep a compound page from being split up. I plan on doing some testing tomorrow, but thought I would push these out now so that we could discuss them. --- Alexander Duyck (3): mm: Drop locked from isolate_migratepages_block mm: Drop use of test_and_set_skip in favor of just setting skip mm: Identify compound pages sooner in isolate_migratepages_block mm/compaction.c | 126 +++++++++++++++++++------------------------------------ 1 file changed, 44 insertions(+), 82 deletions(-) --