All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: David Hildenbrand <david@redhat.com>, akpm@linux-foundation.org
Cc: lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com,
	npache@redhat.com, ryan.roberts@arm.com, dev.jain@arm.com,
	ziy@nvidia.com, vbabka@suse.cz, rppt@kernel.org,
	surenb@google.com, mhocko@suse.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm: khugepaged: decouple SHMEM and file folios' collapse
Date: Tue, 13 May 2025 14:06:41 +0800	[thread overview]
Message-ID: <f671e835-5cc2-4f1f-987d-b71b446c2275@linux.alibaba.com> (raw)
In-Reply-To: <5d5e50f1-ee5d-4fca-8d7a-31482a8482bb@redhat.com>



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@redhat.com>

Thanks.


      reply	other threads:[~2025-05-13  6:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12  3:20 [RFC PATCH] mm: khugepaged: decouple SHMEM and file folios' collapse Baolin Wang
2025-05-12  8:08 ` David Hildenbrand
2025-05-13  6:06   ` Baolin Wang [this message]

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=f671e835-5cc2-4f1f-987d-b71b446c2275@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=dev.jain@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@suse.com \
    --cc=npache@redhat.com \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=ziy@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.