linux/drivers/staging
Dan Magenheimer daa6afa6d9 staging: zcache: in-kernel tmem code
[PATCH V2 1/3] drivers/staging: zcache: in-kernel tmem code

Transcendent memory ("tmem") is a clean API/ABI that provides
for an efficient address translation and a set of highly
concurrent access methods to copy data between a page-oriented
data source (e.g. cleancache or frontswap) and a page-addressable
memory ("PAM") data store.  Of critical importance, the PAM data
store is of unknown (and possibly varying) size so any individual
access may succeed or fail as defined by the API/ABI.

Tmem exports a basic set of access methods (e.g. put, get,
flush, flush object, new pool, and destroy pool) which are
normally called from a "host" (e.g. zcache).

To be functional, two sets of "ops" must be registered by the
host, one to provide "host services" (memory allocation) and
one to provide page-addressable memory ("PAM") hooks.

Tmem supports one or more "clients", each which can provide
a set of "pools" to partition pages.  Each pool contains
a set of "objects"; each object holds pointers to some number
of PAM page descriptors ("pampd"), indexed by an "index" number.
This triple <pool id, object id, index> is sometimes referred
to as a "handle".  Tmem's primary function is to essentially
provide address translation of handles into pampds and move
data appropriately.

As an example, for cleancache, a pool maps to a filesystem,
an object maps to a file, and the index is the page offset
into the file.  And in this patch, zcache is the host and
each PAM descriptor points to a compressed page of data.

Tmem supports two kinds of pages: "ephemeral" and "persistent".
Ephemeral pages may be asynchronously reclaimed "bottoms up"
so the data structures and concurrency model must allow for
this.  For example, each pampd must retain sufficient information
to invalidate tmem's handle-to-pampd translation.
its containing object so that, on reclaim, all tmem data
structures can be made consistent.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 15:06:52 -08:00
..
asus_oled Staging: Merge 2.6.37-rc5 into staging-next 2010-12-07 10:47:56 -08:00
ath6kl staging: ath6kl: Remove #define A_OK 2011-02-02 14:34:51 -08:00
bcm Staging: bcm: Check correct user provided length and fix error code returned 2011-02-04 13:01:02 -08:00
brcm80211 staging: brcm80211: implement mac80211 callback set_rts_threshold 2011-02-09 11:46:36 -08:00
comedi staging: comedi: fix coding style issue in drivers.c 2011-02-04 13:04:24 -08:00
cptm1217 staging: clearpad_tm1217 depends on INPUT 2010-11-19 17:17:45 -08:00
crystalhd drivers/staging: Remove unnecessary casts of pci_get_drvdata 2010-11-16 12:06:47 -08:00
cs5535_gpio staging: cs5535_gpio: check put_user() return code 2011-01-21 12:35:14 -08:00
cx25821 Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-01-10 16:04:53 -08:00
cxt1e1 staging: Fix some incorrect use of positive error codes. 2011-01-21 12:35:50 -08:00
dabusb Staging: dabusb: fixed coding style issues 2011-01-31 14:12:18 -08:00
dt3155v4l [media] V4L: remove V4L1 compatibility mode 2010-12-29 08:17:07 -02:00
easycap staging/easycap: replace NOREADBACK with moduel parameter 2011-02-09 11:59:07 -08:00
echo
et131x staging: et131x: Begin cleaning up the MI registers 2011-02-04 13:01:01 -08:00
frontier Staging: Merge 2.6.37-rc5 into staging-next 2010-12-07 10:47:56 -08:00
ft1000 staging: ft1000: Remove unnecessary check in write_blk_fifo(). 2011-02-09 14:55:51 -08:00
go7007 staging/go7007: remove the BKL 2011-01-31 13:38:15 -08:00
hv Staging: hv: moved assignments out of if conditions 2011-02-09 12:11:55 -08:00
iio Staging: IIO: DDS: AD9832 / AD9835 driver 2011-02-09 14:58:57 -08:00
intel_sst Staging: Merge 2.6.37-rc5 into staging-next 2010-12-07 10:47:56 -08:00
keucr staging: keucr: Delete use kernel strcmp() & strcpy() from TODO file 2011-01-21 12:16:53 -08:00
line6 staging/line6: Fix sparse warning 'Using plain integer as NULL pointer' 2010-12-08 14:31:01 -08:00
lirc [media] staging/lirc: fix mem leaks and ptr err usage 2011-01-19 12:52:22 -02:00
memrar Staging: sep: handle the memrar stuff in the headers 2010-11-29 11:17:27 -08:00
msm Staging: Merge branch 'staging-next' into 2.6.38-rc3 2011-02-02 13:35:58 -08:00
octeon staging: octeon: change a typo comamnd to command 2011-02-04 13:01:03 -08:00
olpc_dcon staging: olpc_dcon: actually return the value of i2c_add_driver 2011-02-09 12:11:54 -08:00
panel llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
phison Staging: phison: use DEFINE_PCI_DEVICE_TABLE 2010-12-09 16:29:48 -08:00
pohmelfs staging: pohmelfs: Fix some typos, and comments. 2011-02-04 13:01:02 -08:00
quatech_usb2 staging/trivial: fix typos concerning "initiali[zs]e" 2010-09-04 21:23:26 -07:00
quickstart Staging: quickstart: fixed coding style issues 2011-02-09 12:11:55 -08:00
rt2860 staging: rt2860: cmm_mac_pci.c change a typo comamnd to command 2011-02-04 13:01:03 -08:00
rt2870 Staging: rt2870: Makefile: replace the use of <module>-objs with <module>-y 2010-10-08 07:23:46 -07:00
rtl8187se staging: rtl8187se: Change panic to warn when RF switch turned off 2010-11-16 12:25:53 -08:00
rtl8192e staging: rtl8192e: Factor out common code 2011-02-09 11:50:21 -08:00
rtl8192u rtl8192u_usb: Remove built-in firmware images 2011-01-21 12:19:11 -08:00
rtl8712 Staging: rtl8712: fix math errors in snprintf() 2011-02-09 11:51:27 -08:00
rts_pstor Staging: rts_pstor: fix read past end of buffer 2011-02-09 12:11:55 -08:00
samsung-laptop Staging: samsung-laptop: add a bunch more laptop DMI signatures 2011-02-09 13:19:03 -08:00
sbe-2t3e3 Staging: sbe-2t3e3: Makefile: replace the use of <module>-objs with <module>-y 2010-10-08 07:23:45 -07:00
se401 [media] staging: se401 depends on USB 2010-12-30 22:29:41 -02:00
sep staging: sep: Further tidying 2011-02-01 06:27:13 -08:00
serqt_usb2
slicoss staging: slicoss: use free_netdev(netdev) instead of kfree() 2010-09-30 04:14:21 -07:00
sm7xx console: rename acquire/release_console_sem() to console_lock/unlock() 2011-01-26 10:50:06 +10:00
solo6x10 staging: solo6010 depends on I2C 2010-12-09 16:29:49 -08:00
speakup staging: speakup: enlosed macros with complex values in parenthesis 2011-02-04 13:01:02 -08:00
spectra staging: spectra: don't read past array in Conv_Spare_Data_Log2Phy_Format() 2011-01-21 12:13:07 -08:00
ste_rmi4 Staging: Merge branch 'staging-next' into 2.6.38-rc3 2011-02-02 13:35:58 -08:00
ti-st drivers:staging: ti-st: delete old bt_drv driver 2011-01-20 15:58:17 -08:00
tidspbridge staging: tidspbridge: replace mbox callback with notifier_call 2011-01-20 12:19:47 -08:00
tm6000 Staging: Merge branch 'staging-next' into 2.6.38-rc3 2011-02-02 13:35:58 -08:00
usbip staging: usbip: vhci: use urb->dev->portnum to find port 2011-01-20 16:01:50 -08:00
usbvideo staging: usbvideo: vicam: Fix build in -next 2011-02-01 06:27:13 -08:00
vme Delete zero-length drivers/staging/vme/bridges/Module.symvers 2011-01-28 03:23:42 -05:00
vt6655 staging/vt6655: fix sparse warning "obsolete struct initializer" 2011-01-21 12:31:16 -08:00
vt6656 vt6656: Use request_firmware() to load firmware 2011-01-21 12:19:11 -08:00
westbridge Staging: Westbridge: added ioremap_nocache instead of phys_to_virt 2011-02-04 13:04:23 -08:00
winbond Staging: w35und: Kill struct wb_usb 2010-12-01 14:45:47 -08:00
wlags49_h2 drivers/staging: Remove unnecessary casts of pci_get_drvdata 2010-11-16 12:06:47 -08:00
wlags49_h25 Staging: wlags49_h25: Makefile: cleaned up Makefile cflag lines 2010-10-05 11:56:38 -07:00
wlan-ng Staging: wlan-ng: fixed packed checkpatch warnings 2011-02-04 13:04:24 -08:00
xgifb Staging: xgfib: put parenthesis in the right place 2011-01-20 12:01:23 -08:00
zcache staging: zcache: in-kernel tmem code 2011-02-09 15:06:52 -08:00
zram zram/xvmalloc: combine duplicate block delete code 2011-02-04 13:29:12 -08:00
Kconfig Revert "appletalk: move to staging" 2011-01-31 14:03:00 -08:00
Makefile Revert "appletalk: move to staging" 2011-01-31 14:03:00 -08:00
staging.c