Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1557531rdb; Mon, 19 Feb 2024 22:45:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWB08q7H7KH3rE7bW76Lm/Q/2LTDImdFs6oQ6iuac2jrISD0CRnJhHzhJ5YWu18ziHY4owzTOJ5lekv2T9zjOGHGbzDBmDN8jq/bw9rbA== X-Google-Smtp-Source: AGHT+IGbg332Mqsv4HjMdde33qu7f9oBwDnC2JcusY5Lexl5XYX+xLxOzyRD1X8HtEv12O77bCAM X-Received: by 2002:a05:6808:30a9:b0:3c1:6036:8026 with SMTP id bl41-20020a05680830a900b003c160368026mr3869325oib.8.1708411506497; Mon, 19 Feb 2024 22:45:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708411506; cv=pass; d=google.com; s=arc-20160816; b=qDRbzKQ7uAYJJeNzyLqWenbk4u9LBK9PZFhy5Bf2CLxF00BkxuwYX6Jmy/zl6ecRfq IMZhmxcwEpjIqakxhXSSZSiZFNhUWkpbZauNoYjeFpKSW7iMDmFv0RafYfanlD41cpHJ qiP4pWT73vl2i85ozrebHA638RhMmBk8wE0gBOFMgqIoQOeFcG7hw7P3jGz4br4uW6MH ztlqBIe1DFITwj/H+wIKSSbG8FcW/cDEOHn5gn5xvDWBdiGbWEKPFLhB1vGHAkExSSR3 bhIUJcrW6PemyoDKrpFF3fC5aDWQYWnBaEsCKqWyclsYEGThjNg+z4PrQkWDm1xFXOUM AEtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=puMJdMhcnkjp6kkrLK0SxE7fWXoN3haERSGZVmMXdyk=; fh=oqWwByvZI6avZPvqX+dKoZPVvs56BEXIOfPD3bp8Tec=; b=me2M+G4njsPQ9Tyog3HXNop7YRu1VFLOGqESrLD/vCfnI9NEAA6aM9i8kn9v0Zi1WQ 814y3NwxKUPwEIfwHxvABfj7+Xv45pzXM2NOYuT9IhjoAE4N9ybFZz6vjijCWVWbE6T0 upIBUAKk0dI10upfsTIxdYmDaMVsIWVT2dwQCegGwIKjKoTTUTlwQ+m7XNotkF6f4yi7 sIc2KeJRMVKJYK2cfhGchXz4CqkjHPnUbdZjc8AA2M1UXT3+/BoxOFyuoAA7ydLx8ie1 NZfamHBQkcO6bGLraI6fukIzYCw47+T6h2CVC+janqqlpjiYgaTz4PC1fRBW+ro5X24r C5bg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=aPz21Wt2; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-72408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fb19-20020a056a002d9300b006e43b99a6ccsi3919680pfb.272.2024.02.19.22.45.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 22:45:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=aPz21Wt2; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-72408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 50F70285A8B for ; Tue, 20 Feb 2024 06:28:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34B7059158; Tue, 20 Feb 2024 06:28:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="aPz21Wt2" Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60A7D59149 for ; Tue, 20 Feb 2024 06:28:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708410499; cv=none; b=kdnaxPtSkwk3eMo+JWkPaYYA6yeYjzv34+bglwXGmYxLXnB+L6OnxZHgwF1sp72syA8U6LQvMaPzdBbVS7kiwiO+39DcNQ+bChMFbMlk41C0gxnqmaW6Z2s9YBxbw0O0xCeW83GzAmJA0PvDwhvTQnWeAvfpcZnJ7jpJmBAtHLA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708410499; c=relaxed/simple; bh=v1sEN7DrYpBxbelhKpz+nzMPVdPXSWyxn12i1zNGLMw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cZpYZ1NiC6/5RJ6d8yVNw3uFaNo7J+JcfcW4riHddVtv81aCSazyvrLo7wEsBes6+JcQBOatvcWo88UfnSDArPtmaOzM23xrD4TBxetad5IuE8OGbYF5SSFo1iTfgHpxACqiZ6nZY8CMvEKUt+Ega5MYZCdD5YsOzfzAg91XgPI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=aPz21Wt2; arc=none smtp.client-ip=115.124.30.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1708410494; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=puMJdMhcnkjp6kkrLK0SxE7fWXoN3haERSGZVmMXdyk=; b=aPz21Wt28Y+2VU2UQZlxQqv/jtxe0cGkAPvccFjbxXmaUz3nwQffzvw8Bk6d1Jcz6Su6pvHNzKCJROvooA1+hxgEvDeUCh4dv9wjLGoxuW2vJ6fjqX7eiROtXzDeE7A81LnLmYz/O5TnQtcczDbpekMx6vTEwKa1yXxbIYvyokI= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R771e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0W0veSm2_1708410491; Received: from 30.97.56.48(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W0veSm2_1708410491) by smtp.aliyun-inc.com; Tue, 20 Feb 2024 14:28:12 +0800 Message-ID: <6da5c282-a522-4732-ad3c-73f6790c073e@linux.alibaba.com> Date: Tue, 20 Feb 2024 14:28:10 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 0/4] Enable >0 order folio memory compaction To: Andrew Morton Cc: Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Huang, Ying" , Ryan Roberts , "Matthew Wilcox (Oracle)" , David Hildenbrand , "Yin, Fengwei" , Yu Zhao , Vlastimil Babka , "Kirill A . Shutemov" , Johannes Weiner , Kemeng Shi , Mel Gorman , Rohan Puri , Mcgrof Chamberlain , Adam Manzanares , "Vishal Moola (Oracle)" References: <20240216170432.1268753-1-zi.yan@sent.com> <20240219180617.89a0daaba45ce124ef01be50@linux-foundation.org> <9E3E6CD6-45DD-4E7F-B6DC-0897F38D5E81@nvidia.com> <4f0b3586-25e2-4d21-bbb6-41f644d3d77f@linux.alibaba.com> <20240219193048.cbd010579aa3d2c790f6e2b9@linux-foundation.org> From: Baolin Wang In-Reply-To: <20240219193048.cbd010579aa3d2c790f6e2b9@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/2/20 11:30, Andrew Morton wrote: > On Tue, 20 Feb 2024 11:00:39 +0800 Baolin Wang wrote: > >>> The patch was based on top of my early version of this patchset, thus >>> uses "cc->nr_migratepages -= 1 << order;" and >>> "cc->nr_migratepages += 1 << order;", but now it is applied before >>> mine. The change should be "cc->nr_migratepages--;" and >>> "cc->nr_migratepages++;", respectively. >>> >>>> >>>>> on nr_migratepages was based on this one, a better fixup >>>>> for it might be below. Since before my patchset, compaction only deals with >>>>> order-0 pages. >>>> >>>> I don't understand what this means. The patchset you sent applies OK >>>> to mm-unstable so what else is there to do? >>> >>> Your above fixup to Baolin's patch needs to be changed to the patch below >>> and my "mm/compaction: add support for >0 order folio memory compaction" will >>> need to be adjusted accordingly to be applied on top. >>> >>> Let me know if anything is unclear. >> >> Hi Andrew, >> >> To avoid conflicts, you can drop these two patches, and I will send a >> new version with fixing the issue pointed by Vlastimilb on top of >> "mm/compaction: add support for >0 order folio memory compaction". >> >> https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-everything-2024-02-16-01-35&id=97f749c7c82f677f89bbf4f10de7816ce9b071fe >> >> https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-everything-2024-02-16-01-35&id=ea87b0558293a5ad597bea606fe261f7b2650cda > > Well I thought I'd fixed everything up 10 minutes ago. Please take a > look at next mm-unstable. Sure. And I found a minor rebase error in the compaction_alloc() function while Zi Yan's original patch is correct. + cc->nr_freepages -= 1 << order; cc->nr_migratepages--; - - return dst; + return page_rmappable_folio(&dst->page); } should change to be: cc->nr_migratepages -= 1 << order;