How does virtual memory work when it need to save data in physical memory into disk? I'm reading a textbook which desribe VM as:

a data structure stored in physical memory known as a page table that maps virtual pages to physical pages. The address translation hardware reads the page table
each time it converts a virtual address to a physical address. The operating system
is responsible for maintaining the contents of the page table and transferring pages
back and forth between disk and DRAM.


A page table is an array of page table entries (PTEs). M. If the valid bit is set, the address field indicates the start of the corresponding physical page in DRAM where the virtual page is cached. If the valid bit is not set, then a null address indicates that the virtual page has not yet been allocated. Otherwise, the address points to the start of the virtual page on disk.
So my question is, let's the PP0(VP1) has been modified and need to be written back to disk to make the change permanent. But the the PTE1 only has address(PP0) pointed to main memory, it has lost disk address VP1, so how can the changes be made to disk in this scenario?
There are a few options:

if a page is in memory then it cannot be on disk as well, As such there is no duplication and the issue doesn't exist.

there is more than just the MMU's pagetable to hold paging information. This mean that the kernel has an auxiliary data structure that says where the page is on disk and the MMU page table only tracks what is in memory. This solution allows memory mapping of files whether they are on disk or over the network.