From: Zi Yan <ziy@nvidia.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "\"Huang,
Ying\"" <ying.huang@intel.com>,
Ryan Roberts <ryan.roberts@arm.com>,
"\"Matthew Wilcox (Oracle)\"" <willy@infradead.org>,
David Hildenbrand <david@redhat.com>,
"\"Yin, Fengwei\"" <fengwei.yin@intel.com>,
Yu Zhao <yuzhao@google.com>, Vlastimil Babka <vbabka@suse.cz>,
"\"Kirill A . Shutemov\"" <kirill.shutemov@linux.intel.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Kemeng Shi <shikemeng@huaweicloud.com>,
Mel Gorman <mgorman@techsingularity.net>,
Rohan Puri <rohan.puri15@gmail.com>,
Mcgrof Chamberlain <mcgrof@kernel.org>,
Adam Manzanares <a.manzanares@samsung.com>,
"\"Vishal Moola (Oracle)\"" <vishal.moola@gmail.com>
Subject: Re: [PATCH v6 0/4] Enable >0 order folio memory compaction
Date: Mon, 19 Feb 2024 21:31:30 -0500 [thread overview]
Message-ID: <9E3E6CD6-45DD-4E7F-B6DC-0897F38D5E81@nvidia.com> (raw)
In-Reply-To: <20240219180617.89a0daaba45ce124ef01be50@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]
On 19 Feb 2024, at 21:06, Andrew Morton wrote:
> On Fri, 16 Feb 2024 12:04:28 -0500 Zi Yan <zi.yan@sent.com> wrote:
>
>> Baolin's patch
>
> Baolin writes many patches and patches have names, please use them!
Sorry for not being specific. I mean this fixup:
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-everything-2024-02-16-01-35&id=97f749c7c82f677f89bbf4f10de7816ce9b071fe
to this patch:
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-everything-2024-02-16-01-35&id=ea87b0558293a5ad597bea606fe261f7b2650cda
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.
>> diff --git a/mm/compaction.c b/mm/compaction.c
>> index 01ec85cfd623f..e60135e2019d6 100644
>> --- a/mm/compaction.c
>> +++ b/mm/compaction.c
>> @@ -1798,7 +1798,7 @@ static struct folio *compaction_alloc(struct folio *src, unsigned long data)
>> dst = list_entry(cc->freepages.next, struct folio, lru);
>> list_del(&dst->lru);
>> cc->nr_freepages--;
>> - cc->nr_migratepages -= 1 << order;
>> + cc->nr_migratepages--;
>>
>> return dst;
>> }
>> @@ -1814,7 +1814,7 @@ static void compaction_free(struct folio *dst, unsigned long data)
>>
>> list_add(&dst->lru, &cc->freepages);
>> cc->nr_freepages++;
>> - cc->nr_migratepages += 1 << order;
>> + cc->nr_migratepages++;
>> }
--
Best Regards,
Yan, Zi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]
next prev parent reply other threads:[~2024-02-20 2:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 17:04 Zi Yan
2024-02-16 17:04 ` [PATCH v6 1/4] mm/page_alloc: remove unused fpi_flags in free_pages_prepare() Zi Yan
2024-02-16 17:19 ` Vlastimil Babka
2024-02-20 8:48 ` David Hildenbrand
2024-02-16 17:04 ` [PATCH v6 2/4] mm/compaction: enable compacting >0 order folios Zi Yan
2024-02-20 9:03 ` David Hildenbrand
2024-02-20 9:11 ` David Hildenbrand
2024-02-20 15:27 ` Zi Yan
2024-02-20 15:27 ` Zi Yan
2024-02-16 17:04 ` [PATCH v6 3/4] mm/compaction: add support for >0 order folio memory compaction Zi Yan
2024-02-16 17:04 ` [PATCH v6 4/4] mm/compaction: optimize >0 order folio compaction with free page split Zi Yan
2024-02-20 2:06 ` [PATCH v6 0/4] Enable >0 order folio memory compaction Andrew Morton
2024-02-20 2:31 ` Zi Yan [this message]
2024-02-20 3:00 ` Baolin Wang
2024-02-20 3:30 ` Andrew Morton
2024-02-20 6:28 ` Baolin Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9E3E6CD6-45DD-4E7F-B6DC-0897F38D5E81@nvidia.com \
--to=ziy@nvidia.com \
--cc=a.manzanares@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=fengwei.yin@intel.com \
--cc=hannes@cmpxchg.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=mgorman@techsingularity.net \
--cc=rohan.puri15@gmail.com \
--cc=ryan.roberts@arm.com \
--cc=shikemeng@huaweicloud.com \
--cc=vbabka@suse.cz \
--cc=vishal.moola@gmail.com \
--cc=willy@infradead.org \
--cc=ying.huang@intel.com \
--cc=yuzhao@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox