RE: Frontswap [PATCH 0/4] (was Transcendent Memory): overview

From: Dan Magenheimer
Date: Fri Apr 23 2010 - 12:28:33 EST


> > If a put returns zero, pseudo-RAM has rejected the data, and the page
> can
> > be written to swap as usual.
> >
> > Note that if a page is put and the page already exists in pseudo-RAM
> > (a "duplicate" put), either the put succeeds and the data is
> overwritten,
> > or the put fails AND the page is flushed. This ensures stale data
> may
> > never be obtained from pseudo-RAM.
>
> Looks like "init" == open, "put_page" == write, "get_page" == read,
> "flush_page|flush_area" == trim. The only difference seems to be that
> an overwriting put_page may fail. Doesn't seem to be much of a win,

No, ANY put_page can fail, and this is a critical part of the API
that provides all of the flexibility for the hypervisor and all
the guests. (See previous reply.)

The "duplicate put" semantics are carefully specified as there
are some coherency corner cases that are very difficult to handle
in the "backend" but very easy to handle in the kernel. So the
specification explicitly punts these to the kernel.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/