From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796022921; b=mwIGX90uab76cTHMYRoRPzrGljuV+DFTABinUCN+hlRjldfoNQnbDm9POc0gFcpwEd4B sk7zWY7Aqsr5SkPa+z2SuVWEqCeUGsHTkO7Ps0HLSNeMRQFNteT5iH7U6vOgA3xxiTCY4 H+PzpVaBbcnLa8Rg047L7IyTkl6P/5zXIEvxDklb7MT6jFhihGqnOTSYr6W7lPGMJpznr pu5iEEHSn2uj5fs1jfAPkbalhXxiyEgnbAW4uTeIrpCM09Je/kvp/ipRAPfbmZZamk25i Hel7URw2zloJ6atIIBNb/JFS2BvR2YQSci3DYJdl2uQUY55U/WhDcq+YsXeSPBNZAzg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796022921; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=ka2xC2wpmUTdyXpzuzYzDG8ZQyg0fIvSXgsB5z/xqFA=; b=gNp0iXbKrTh9Czw43DBTxaoOjHskvQ135jaOhzkOBdf5xu5wFeyORiM2GqW5ApMEoDaa 2uy9E84LTpVBtnqdxGWGHmIzBXqBdR5Wm2I5329/I7IZKsmzvH0TBf6EbLRsWQZqQR2Ce 41JPwCkNhpEphB313P+/tkkd2I5H5HNxBa7Us0uVwEggRrr6IRwMGnIdcOR3VApQdYH5J RWgt4VHVr7d5vZX/kq44WvNuooeuti1U2NYUv511amw9M28bz1cNFwwukRVdR6/oJicgc q8VCHJjFEXi557fxJgYdMVhs6/9v5bzhg/BECkIeePiRoIL6frzAMGKtLUO2/rNcfBQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=Sxc+lmP5; arc=none smtp.remote-ip=115.124.30.124 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F139E606A31C; Mon, 30 Nov 2026 07:15:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F139E606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=Sxc+lmP5 DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796022911; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=ka2xC2wpmUTdyXpzuzYzDG8ZQyg0fIvSXgsB5z/xqFA=; b=Sxc+lmP5pK9IsHEaMs1qEULErCfLpNV/gyvHIFZTk65Pakxt3InEyY4jbJeDZjx9Xl1UM2+6K83Mc9xlDhDA4V2Q7pIKoaga20gfD7s6kOOIZ00ntzlh2bJnosoZoO1KAbBPZnyhbo0Uv9y1bSr87Oofto7jXB+TWynjUJWpzz4= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037026112;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=26;SR=0;TI=SMTPD_---0XFgPhLT_1796022907; Received: from 30.74.144.138(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0XFgPhLT_1796022907 cluster:ay36) by smtp.aliyun-inc.com; Mon, 30 Nov 2026 15:15:09 +0800 Message-ID: Date: Mon, 30 Nov 2026 15:15:06 +0800 X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/3] mm/memory: allocate the deposit page table with NOFS in do_set_pmd() To: "Jose A. Perez de Azpillaga" , David Hildenbrand , Zi Yan , Andrew Morton , Zach O'Keefe , Hugh Dickins , Lorenzo Stoakes , Kiryl Shutsemau , Dev Jain Cc: "Liam R. Howlett" , Nico Pache , Ryan Roberts , Barry Song , Lance Yang , Usama Arif , Vlastimil Babka , Mike Rapoport , Michal Hocko , linux-mm@kvack.org, Matthew Wilcox , Jan Kara , Johannes Weiner , Rik van Riel , Song Liu , linux-fsdevel@vger.kernel.org, stable@vger.kernel.org References: <20261127091344.113688-1-azpijr@gmail.com> <20261127091344.113688-2-azpijr@gmail.com> From: Baolin Wang In-Reply-To: <20261127091344.113688-2-azpijr@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/27/26 5:12 PM, Jose A. Perez de Azpillaga wrote: > On ppc64 with the hash MMU, do_set_pmd() allocates the page table to > deposit when the caller did not preallocate one. Both callers that let > it allocate hold the folio lock: set_huge_pmd() in khugepaged never > preallocates, and finish_fault() has no preallocated table when the > page table was removed after __do_fault() checked the PMD. > > Allocating with __GFP_FS while holding a folio lock can deadlock in > reclaim, for example the memcg reclaim deadlock on cgroup v1 described > in commit 63f3655f9501 ("mm, memcg: fix reclaim deadlock with > writeback"). > > pte_alloc_one() takes no gfp flags, so allocate the table in a NOFS > scope. > > Fixes: 34488399fa08 ("mm/madvise: add file and shmem support to MADV_COLLAPSE") > Fixes: 1d65b771bc08 ("mm/khugepaged: retract_page_tables() without mmap or vma lock") > Cc: stable@vger.kernel.org > Signed-off-by: Jose A. Perez de Azpillaga > --- Make sense to me. Reviewed-by: Baolin Wang