Re: [LSF/MM/BPF TOPIC] Swap Abstraction / Native Zswap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 28, 2023 at 3:01 PM Chris Li <chrisl@xxxxxxxxxx> wrote:
>
> On Tue, Mar 28, 2023 at 02:44:27PM -0700, Yosry Ahmed wrote:
> > > Your swap descriptor will be using one swp_entry_t, which get from the PTE
> > > to lookup, right? That is the swap entry I am talking about. You just
> > > substitute zswap swap entry with the swap descriptor swap entry.
> > > You still need to allocate from the free swap entry space at least once.
> >
> > Oh, you mean the swap ID space. We just need to find an unused ID, we
> > can simply use an allocating xarray
> > (https://docs.kernel.org/core-api/xarray.html#allocating-xarrays).
> > This is simpler than keeping track of swap slots in a swapfile.
>
> Ah I see. That makes sense. Thanks for explaining it to me.
>
> The real block swap device will still need to scan the swap_map
> to find an empty space to write the page.

Yes, exactly. It's a tradeoff, and I think as long as whatever we
decide can be considered as a step towards the right direction it
should be fine.

>
> Chris
>
>





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux