[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f671e835-5cc2-4f1f-987d-b71b446c2275@linux.alibaba.com>
Date: Tue, 13 May 2025 14:06:41 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: David Hildenbrand <david@...hat.com>, akpm@...ux-foundation.org
Cc: lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, npache@...hat.com,
ryan.roberts@....com, dev.jain@....com, ziy@...dia.com, vbabka@...e.cz,
rppt@...nel.org, surenb@...gle.com, mhocko@...e.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] mm: khugepaged: decouple SHMEM and file folios'
collapse
On 2025/5/12 16:08, David Hildenbrand wrote:
>> static unsigned int khugepaged_scan_mm_slot(unsigned int pages, int
>> *result,
>> struct collapse_control *cc)
>> @@ -2436,7 +2427,7 @@ static unsigned int
>> khugepaged_scan_mm_slot(unsigned int pages, int *result,
>> VM_BUG_ON(khugepaged_scan.address < hstart ||
>> khugepaged_scan.address + HPAGE_PMD_SIZE >
>> hend);
>> - if (IS_ENABLED(CONFIG_SHMEM) && !vma_is_anonymous(vma)) {
>> + if (!vma_is_anonymous(vma)) {
>> struct file *file = get_file(vma->vm_file);
>> pgoff_t pgoff = linear_page_index(vma,
>> khugepaged_scan.address);
>> @@ -2782,7 +2773,7 @@ int madvise_collapse(struct vm_area_struct *vma,
>> struct vm_area_struct **prev,
>> mmap_assert_locked(mm);
>> memset(cc->node_load, 0, sizeof(cc->node_load));
>> nodes_clear(cc->alloc_nmask);
>> - if (IS_ENABLED(CONFIG_SHMEM) && !vma_is_anonymous(vma)) {
>> + if (!vma_is_anonymous(vma)) {
>> struct file *file = get_file(vma->vm_file);
>> pgoff_t pgoff = linear_page_index(vma, addr);
>
> Yeah, I've been complaining about these checks for too long :)
Yes, I know:)
> I assume this is fine
I tested khugepaged selftest, and no issues found.
> Acked-by: David Hildenbrand <david@...hat.com>
Thanks.
Powered by blists - more mailing lists