On Thu, 2023-03-02 at 13:42 -0800, Chris Li wrote: > On Thu, Mar 02, 2023 at 01:23:14PM -0500, Rik van Riel wrote: > > > > > > One possible implementation might be to have swap page table > > entries > > point to a swap address in this indirection layer, and the > > indirection > > layer can be an xarray containing the actual swap entries > > specifying > > at which position in which swap device the data can be found. > > The questions, do we have this indirection layer apply to all swap > entries? > I believe we should have a system that tracks every swap entry the same, data structure wise. Otherwise we will have two sets of code in the kernel, and it will be too easy to get corner cases wrong. > My small tweak is to limit the indirection layer only to non leaf > swap devices. Then it is actually very close to what I am proposing. > Just your "indirection layer" is my "special swap device". > > Again, "special swap device" is a very bad name, let's name it > something > more useful. > > > That might be a net reduction in the code over what we have today, > > because it gets rid of some ugly corner cases. > > Great. ... but that won't happen if the indirection layer only applies to some swap devices, because we will still need to keep around the crazy code to deal with the swap devices that don't have it. -- All Rights Reversed.
Attachment:
signature.asc
Description: This is a digitally signed message part