[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45d66a0c-a5ed-4894-999c-0ed5b732ebb0@redhat.com>
Date: Mon, 23 Jun 2025 16:09:51 +0200
From: David Hildenbrand <david@...hat.com>
To: Oscar Salvador <osalvador@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Muchun Song <muchun.song@...ux.dev>, Peter Xu <peterx@...hat.com>,
Gavin Guo <gavinguo@...lia.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/5] mm,hugetlb: Change mechanism to detect a COW on
private mapping
>
> - /*
> - * hugetlb_wp() requires page locks of pte_page(vmf.orig_pte) and
> - * pagecache_folio, so here we need take the former one
> - * when folio != pagecache_folio or !pagecache_folio.
> - */
> + /* hugetlb_wp() requires page locks of pte_page(vmf.orig_pte) */
> folio = page_folio(pte_page(vmf.orig_pte));
> - if (folio != pagecache_folio)
> - if (!folio_trylock(folio)) {
> - need_wait_lock = 1;
> - goto out_ptl;
> - }
> -
> + folio_lock(folio);
> folio_get(folio);
Just realized that this won't work for this patch here, as we are
holding the PTL.
In patch #2 you do the right thing.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists