Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Vishal Moola <vishal.moola@gmail.com>, <linux-mm@kvack.org>
Cc: <linux-kernel@vger.kernel.org>, <akpm@linux-foundation.org>,
	<shy828301@gmail.com>
Subject: Re: [PATCH v2 5/5] mm/khugepaged: Convert collapse_pte_mapped_thp() to use folios
Date: Thu, 19 Oct 2023 10:17:03 +0800	[thread overview]
Message-ID: <22acc5a1-39a7-4a44-b468-429f1ca23b5c@huawei.com> (raw)
In-Reply-To: <ZTBjv4jyQ5/zu5cw@fedora>



On 2023/10/19 7:01, Vishal Moola wrote:
> On Wed, Oct 18, 2023 at 01:32:13PM -0700, Vishal Moola (Oracle) wrote:
>> This removes 2 calls to compound_head() and helps convert khugepaged to
>> use folios throughout.
>>
>> Previously, if the address passed to collapse_pte_mapped_thp()
>> corresponded to a tail page, the scan would fail immediately. Using
>> filemap_lock_folio() we can get the corresponding folio back and try to
>> operate on the folio instead.
>>
>> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
> 
> Hi Andrew, I've attached a fix patch addressing the syzbot issue.
> It can be squashed into this patch, syzbot tested it on v2 already as
> well.

Hi Vishal, only IS_ERR(folio) is enough since filemap_lock_folio won't 
return NULL.


      reply	other threads:[~2023-10-19  2:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 20:32 [PATCH v2 0/5] Some khugepaged folio conversions Vishal Moola (Oracle)
2023-10-18 20:32 ` [PATCH v2 1/5] mm/khugepaged: Convert __collapse_huge_page_isolate() to use folios Vishal Moola (Oracle)
2023-10-18 20:32 ` [PATCH v2 2/5] mm/khugepaged: Convert hpage_collapse_scan_pmd() " Vishal Moola (Oracle)
2023-10-18 20:32 ` [PATCH v2 3/5] mm/khugepaged: Convert is_refcount_suitable() " Vishal Moola (Oracle)
2023-10-18 20:32 ` [PATCH v2 4/5] mm/khugepaged: Convert alloc_charge_hpage() " Vishal Moola (Oracle)
2023-10-18 20:32 ` [PATCH v2 5/5] mm/khugepaged: Convert collapse_pte_mapped_thp() " Vishal Moola (Oracle)
2023-10-18 23:01   ` Vishal Moola
2023-10-19  2:17     ` Kefeng 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=22acc5a1-39a7-4a44-b468-429f1ca23b5c@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shy828301@gmail.com \
    --cc=vishal.moola@gmail.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