Received: from vps.thesusis.net (vps.thesusis.net [34.202.238.73]) (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 9F24618F2C3 for ; Thu, 7 Nov 2024 20:31:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=34.202.238.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731011481; cv=none; b=O4cc+cbUyqW09h6Cuy+jbov/h/STxeZDFNlWnkuo6uOmY8o9IaUJdU4RCo/lnD53FoCRnDNskOlwdrbeP2iw/3bswpgAR/+JsTPLY8g/kuD4WTFtoJKk39vhvyJ/Ty5jtbLppWSE2L6afb6738+//PFZZAUgyM1qbNfYWGx0wZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731011481; c=relaxed/simple; bh=1U2EXTdiAm7QJ3hWrTWG/+CWrX+kA2ajH3EpBzSplX4=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=F6ae7QXYbqv7HJ0n7ktLF3DGjg8c5dM+JVps4gXv1Gg4VNEFzX9Yx8VBkvRsulPS5P88pe/WF4V8rFT896A44XQE47fSHeoHIJAMKS5UQtCRLZ/gwEiMZftemHMLVYVhjb6TlYfTY9r6JiM9RQczMKw/nwSs7HtK0G6c96Ot1ss= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thesusis.net; spf=pass smtp.mailfrom=thesusis.net; arc=none smtp.client-ip=34.202.238.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thesusis.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=thesusis.net Received: by vps.thesusis.net (Postfix, from userid 1000) id F41A557087; Thu, 7 Nov 2024 15:22:06 -0500 (EST) From: Phillip Susi To: linux-fsdevel@vger.kernel.org Subject: Page cache deduplication Date: Thu, 07 Nov 2024 15:22:06 -0500 Message-ID: <87r07m4wwh.fsf@vps.thesusis.net> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain I was just reading an lwn article on the introduction of page cache deduplication for EROFS and how that normally isn't possible. Why is it not normally possible? Each file has its own vma doesn't it? So why can't the underlying physical page be shared and the pte marked read only so if you write to one file, it is COWed just like ksm does for anonmymous memory?