From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 995AC4908BF for ; Sun, 26 Jul 2026 02:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785031643; cv=none; b=RaSGE1RBKXBVCp+Ca7sUpsJ3LDPaXeQmjHW9uwBlNALBuQlRjNLxv+ujQX4B0zOZTeBNvNJ6Y26Xros7VC4xCNkNWqQj3jnGhs3AemvHeCWTfpxlLI/glzpji93wHo5NZbOdPLh8tBqoY6AXzNo1LOWcCjYmP7mISRkXMZAZEG0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785031643; c=relaxed/simple; bh=4mTgLNvII9VUWLAvWTzXqoJz6jtnGAsBpbbl8GDDw6w=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=G+usoZ7otWd3k7ScUNV6W+3dLlWZr1nb0eC8v5To303878ieXAf+pJJXgAtCnv0pklKCbLKheKIPa5kmFwABYmr8A4l9IId71Sq5UPsgQ0PaERhLgpjAJaULYi+/a4mLsmtnK4ByHxgGe9Mi7hCrT1X5pDQ12E6wkXyN/2hZ3Ck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=rqpHEHE3; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="rqpHEHE3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 954091F000E9; Sun, 26 Jul 2026 02:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1785031642; bh=jpS1B8a886qs16d5r0p1aEXd05mNAw05WBa0cxlnrRo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=rqpHEHE3dWIiDp9qwv4GP3PS/PvMosPq/5u+hq8fGt9a2Rea8tbzjficfSCq+jv23 SMXifRgp8SBonUPe5DDBWrkNrYQq5g46XjM3pmyFbcAEfzMYUbMCm7Asc2pJymXbOf 38vNQGtr38lbJNCNEvhAZAKE4BtMlFXXsqutO8Z8= Date: Sat, 25 Jul 2026 19:07:21 -0700 From: Andrew Morton To: Dev Jain Cc: "Lorenzo Stoakes (ARM)" , david@kernel.org, muchun.song@linux.dev, osalvador@suse.de, riel@surriel.com, liam@infradead.org, vbabka@kernel.org, harry@kernel.org, jannh@google.com, lance.yang@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ryan.roberts@arm.com, anshuman.khandual@arm.com Subject: Re: [PATCH v3 1/5] mm/rmap: convert page -> folio for hwpoison checks Message-Id: <20260725190721.f2e121f118ef817e42bb3874@linux-foundation.org> In-Reply-To: <8d2f756a-12a2-43bb-8849-3e71c1ce5d8f@arm.com> References: <20260713050050.1017741-1-dev.jain@arm.com> <20260713050050.1017741-2-dev.jain@arm.com> <8d2f756a-12a2-43bb-8849-3e71c1ce5d8f@arm.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 25 Jul 2026 13:06:25 +0530 Dev Jain wrote: > >> @@ -2204,7 +2205,11 @@ static bool try_to_unmap_one(struct folio *folio, struct vm_area_struct *vma, > >> /* Update high watermark before we lower rss */ > >> update_hiwater_rss(mm); > >> > >> - if (PageHWPoison(subpage) && (flags & TTU_HWPOISON)) { > >> + /* > >> + * With TTU_HWPOISON, we only expect small folios or hugetlb > >> + * folios here for now. > >> + */ > >> + if (folio_test_hwpoison(folio) && (flags & TTU_HWPOISON)) { > > > > As per v2 discussion, I feel this could be tightened up, maybe something like: > > > > /* unmap_poisoned_folio() only refs order-0 or hugetlb folios */ > > > > I can do this. But note that this series is in mm-unstable already - what should > I base the v4 on? Ordinarily basing on latest Linus works. But this patchset has ~450 patches ahead of it and a quick trial merge wasn't promising. I could drop the v3 series so you can base on next mm-new, please lmk. Or mm> git log --oneline | grep "mm/rmap: convert page -> folio for hwpoison checks" bb2f8a7eb126 mm/rmap: convert page -> folio for hwpoison checks mm> git checkout bb2f8a7eb126^