Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lance Yang <lance.yang@linux.dev>
To: Muchun Song <muchun.song@linux.dev>
Cc: Sashiko <sashiko-bot@kernel.org>,
	Muchun Song <songmuchun@bytedance.com>,
	David Hildenbrand <david@kernel.org>,
	maddy@linux.ibm.com, Mike Rapoport <rppt@kernel.org>,
	akpm@linux-foundation.org, mpe@ellerman.id.au, npiggin@gmail.com,
	chleroy@kernel.org, ritesh.list@gmail.com, sshegde@linux.ibm.com,
	osalvador@suse.de, Qi Zheng <qi.zheng@linux.dev>,
	chenhuacai@kernel.org, kernel@xen0n.name, linux-mm@kvack.org,
	x86@kernel.org, linux-s390@vger.kernel.org, hca@linux.ibm.com,
	gor@linux.ibm.com, agordeev@linux.ibm.com,
	borntraeger@linux.ibm.com
Subject: Re: [PATCH v2 2/5] powerpc/mm: drop powerpc vmemmap_can_optimize()
Date: Fri, 6 Nov 2026 17:48:23 +0800	[thread overview]
Message-ID: <3436028c-6ab8-42a6-9489-8dfe861fc3f4@linux.dev> (raw)
In-Reply-To: <2AB0A0B1-1613-44CC-A007-2453F6206D77@linux.dev>



On 2026/11/6 14:09, Muchun Song wrote:
> 
> 
>> On Nov 5, 2026, at 16:02, Lance Yang <lance.yang@linux.dev> wrote:
>>
>>
>> On Thu, Nov 05, 2026 at 07:16:48AM +0000, sashiko-bot@kernel.org wrote:
>>> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
>>> - [Low] mm: undeclared vmemmap in section_vmemmap_optimization_disable()
>>> - [Low] mm: define vmemmap_optimizable_order() before section_vmemmap_optimizable()
>>> --
>>
>> IIUC, on LoongArch, asm/pgtable.h includes vmemmap-optimization.h before
>> defining vmemmap.
> 
> Yeah. Really nasty.
> 
>>
>> How about taking a PFN and page count instead, and leaving the conversion
>> to the callers?
> 
> However, although this can solve the compilation problem, for the caller,
> it is not very straightforward because they need to calculate nr_pages.
> section_vmemmap_optimization_disable is only supposed to be used in the
> vmemmap population path, and in these paths, the most direct parameters
> are start and end. I think this function could be moved to
> mm/sparse-vmemmap.c, and that way the compilation dependency problem
> would be solved.
> 
> What do you think?

Yeah, fair point, let's do that ;)


  reply	other threads:[~2026-11-06  9:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05  6:12 [PATCH v2 0/5] mm: Simplify device DAX vmemmap optimization plumbing Muchun Song
2026-11-05  6:12 ` [PATCH v2 1/5] powerpc/mm: make vmemmap_populate_compound_pages() static Muchun Song
2026-11-06  4:38   ` Lance Yang
2026-11-05  6:12 ` [PATCH v2 2/5] powerpc/mm: drop powerpc vmemmap_can_optimize() Muchun Song
2026-11-05  7:16   ` sashiko-bot
2026-11-05  8:02     ` Lance Yang
2026-11-06  6:09       ` Muchun Song
2026-11-06  9:48         ` Lance Yang [this message]
2026-11-05 12:13   ` kernel test robot
2026-11-05  6:12 ` [PATCH v2 3/5] loongarch/mm: disable device DAX vmemmap optimization Muchun Song
2026-11-05  6:12 ` [PATCH v2 4/5] mm/sparse-vmemmap: drop vmemmap_can_optimize() Muchun Song
2026-11-05  7:16   ` sashiko-bot
2026-11-05  6:12 ` [PATCH v2 5/5] mm/sparse-vmemmap: drop @pgmap from vmemmap population APIs Muchun Song
2026-11-05  7:16   ` sashiko-bot

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=3436028c-6ab8-42a6-9489-8dfe861fc3f4@linux.dev \
    --to=lance.yang@linux.dev \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=chenhuacai@kernel.org \
    --cc=chleroy@kernel.org \
    --cc=david@kernel.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=kernel@xen0n.name \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=muchun.song@linux.dev \
    --cc=npiggin@gmail.com \
    --cc=osalvador@suse.de \
    --cc=qi.zheng@linux.dev \
    --cc=ritesh.list@gmail.com \
    --cc=rppt@kernel.org \
    --cc=sashiko-bot@kernel.org \
    --cc=songmuchun@bytedance.com \
    --cc=sshegde@linux.ibm.com \
    --cc=x86@kernel.org \
    /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