From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 272753D6E for ; Thu, 21 Dec 2023 02:55:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Q3s704m2" Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1703127339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h690bWax6yOVJQKGadfFFXWsV5kXgvfQum64XdRnI8k=; b=Q3s704m2bPeTWEOwmanmPMW48lD2m7QW6OaviD1J+XcWfNk9RPgtfELZLEZ95BwamrPb4b uE1y8jI+fa30kE9frMnMQDL9A0htEhvjTKuxaI/31vuNzqz3IfkwiYXjpVhUMCQN8uSWFu a/VLEuZF60ZYvmRXnn359JR6u/3i1wE= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Subject: Re: [PATCH v2 02/40] mm/rmap: introduce and use hugetlb_remove_rmap() X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20231220224504.646757-3-david@redhat.com> Date: Thu, 21 Dec 2023 10:54:30 +0800 Cc: LKML , Linux-MM , Andrew Morton , "Matthew Wilcox (Oracle)" , Hugh Dickins , Ryan Roberts , Yin Fengwei , Mike Kravetz , Peter Xu Content-Transfer-Encoding: 7bit Message-Id: <06731287-9E14-4623-9280-B9C43E12E021@linux.dev> References: <20231220224504.646757-1-david@redhat.com> <20231220224504.646757-3-david@redhat.com> To: David Hildenbrand X-Migadu-Flow: FLOW_OUT > On Dec 21, 2023, at 06:44, David Hildenbrand wrote: > > hugetlb rmap handling differs quite a lot from "ordinary" rmap code. > For example, hugetlb currently only supports entire mappings, and treats > any mapping as mapped using a single "logical PTE". Let's move it out > of the way so we can overhaul our "ordinary" rmap. > implementation/interface. > > Let's introduce and use hugetlb_remove_rmap() and remove the hugetlb > code from page_remove_rmap(). This effectively removes one check on the > small-folio path as well. > > Add sanity checks that we end up with the right folios in the right > functions. > > Note: all possible candidates that need care are page_remove_rmap() that > pass compound=true. > > Reviewed-by: Yin Fengwei > Reviewed-by: Ryan Roberts > Reviewed-by: Matthew Wilcox (Oracle) > Signed-off-by: David Hildenbrand Reviewed-by: Muchun Song Thanks.