aboutsummaryrefslogtreecommitdiffstats
path: root/tools/memshr/memshr.h
Commit message (Collapse)AuthorAgeFilesLines
* Update memshr API and toolsAndres Lagar-Cavilla2012-01-261-2/+9
| | | | | | | | | | | | | | | | | | | | | | | This patch is the folded version of API updates, along with the associated tool changes to ensure that the build is always consistent. API updates: - The source domain in the sharing calls is no longer assumed to be dom0. - Previously, the mem sharing code would return an opaque handle to index shared pages (and nominees) in its global hash table. By removing the hash table, the handle becomes a version, to avoid sharing a stale version of a page. Thus, libxc wrappers and tools need to be updated to recall the share functions with the information needed to fetch the page (which they readily have). Tool updates: The only (in-tree, that we know of) consumer of the mem sharing API is the memshr tool. This is updated to use the new API. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* Add correct const-ness to memshr tool functionsAndres Lagar-Cavilla2012-01-101-1/+1
| | | | | | | | | | This patch addresses some of the compile and link issues with the memshr module. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Make Citrix copyright strinsg consistent.Keir Fraser2009-12-181-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Reads from read only parent disk images are intercepted, and are used to detectKeir Fraser2009-12-171-0/+13
| | | | | | potentially sharable memory pages. Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
* Multiple tapdisk2 processes may use the same parent disk images (later used toKeir Fraser2009-12-171-0/+2
| | | | | | | | detect sharable memory pages). This patch establishes unique id for each disk image opened by tapdisk2, and stores it in shared memory region, thus making it available to the remaining tapdisk2s. Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
* Adds 'memory_sharing' option to domain config scripts. It passes domain id toKeir Fraser2009-12-171-0/+1
| | | | | | | the tapdisk2 process if sharing is enabled (tapdisk2 is not normally aware what domain it is working for). Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
* Generic bi-directional map, and related initialisation functions. At the momentKeir Fraser2009-12-171-0/+29
a single map is used to store mappings between sharing handles and disk blocks. This is used to share pages which store data read of the same blocks on (virtual) disk. Note that the map is stored in a shared memory region, as it needs to be accessed by multiple tapdisk processes. This complicates memory allocation (malloc cannot be used), prevents poniters to be stored directly (as the shared memory region might and is mapped at different base address) and finally pthread locks need to be multi-process aware. Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>