On Thu, Mar 7, 2024 at 1:17 PM Barry Song <21cnbao@xxxxxxxxx> wrote: > > I don't understand why we need this level of complexity. All we need to know > are the offsets during pageout. After that, the large folio is > destroyed, and all > offsets are stored in page table entries (PTEs) or xa. Swap-in doesn't depend > on a complex file system; it can make its own decision on how to swap-in > based on the values it reads from PTEs. > > Swap-in doesn't need to know whether the swapped-out folio was large or not. Right if the folio was broken down to individual pages on swap out then individual pages PTEs know where the data is. So I agree it's not necessary. But the folio was destroyed. We want to recreate the folio on swap in? IDK \What if you flip the argument? The complexity of the file path exists already... If swap didn't exist could we justify adding the duplicated (albeit simpler) functionality of swap?