On Thu, Mar 23, 2023 at 12:54:42PM -0700, Yosry Ahmed wrote: > > > > At the time of swap out page into A, we will not know if it will > > move to B in a later time. I guess the swap ID xarray look up always > > needs to be there? > > If the indirection is enabled, yes. Ack. > > > > > That means when B swap in a page, it will always look up the swap ID > > xarray first, then resolve to the actual swap_entry B1. > > Yes. There is an extra lookup. Ack. > > > There are some concerns with this design that I outlined in one of my > > > previous emails, such as having separate swap counting implementation > > > in different swap backends, which is a maintenance burden and > > > error-prone. > > > > I agree that allocating the swap ID and maintaining the free swap ID > > would be some extra complexity if we are not reusing the existing swap > > count code path. > > > > My other concern would be the swap ID xarray indirection is always there > > regardless if you need to use the indirection or not. > > I think the idea is that this design is more minimal than the proposed > swap_desc, so we can have it behind a config option and remove the > indirection layer if it is not configured. > However, I am not yet sure if this would be straightforward. I need to > give this more thought. Thanks for the clarification. I will give it some thought as well. Chris