archipelago
11 years agoadd an experimental version of mt-vlcmd, and a dummy mapperd
Filippos Giannakos [Thu, 13 Sep 2012 11:48:50 +0000 (14:48 +0300)]
add an experimental version of mt-vlcmd, and a dummy mapperd

also fix xprotocol.h and change mpeer interface

11 years agosplit signal initialization into local and remote part
Filippos Giannakos [Tue, 11 Sep 2012 12:45:06 +0000 (15:45 +0300)]
split signal initialization into local and remote part

11 years agofix xseg_pthread user driver {prepare, cancel} wait
Filippos Giannakos [Tue, 11 Sep 2012 08:54:16 +0000 (11:54 +0300)]
fix xseg_pthread user driver {prepare, cancel} wait

11 years agoadd mt-peer skeleton plus mt-sosd, dummy peer.
Filippos Giannakos [Mon, 10 Sep 2012 14:52:29 +0000 (17:52 +0300)]
add mt-peer skeleton plus mt-sosd, dummy peer.

also expose peer init signal through xseg api,
as needed by pthread peers

11 years agodo some code clean up. fix xseg callback to only take portno as argument
Giannakos Filippos [Mon, 10 Sep 2012 10:50:22 +0000 (13:50 +0300)]
do some code clean up. fix xseg callback to only take portno as argument

11 years agomake drivers respect xsegbd's {prepare, cancel}_wait
User [Fri, 7 Sep 2012 15:27:25 +0000 (18:27 +0300)]
make drivers respect xsegbd's {prepare, cancel}_wait

11 years agofix xsegbd to use req->priv pointer instead of xseg_{get,set} req data
User [Fri, 7 Sep 2012 15:22:39 +0000 (18:22 +0300)]
fix xsegbd to use req->priv pointer instead of xseg_{get,set} req data

11 years agofix xseg request preparation bug
User [Fri, 7 Sep 2012 09:04:25 +0000 (12:04 +0300)]
fix xseg request preparation bug

11 years agoadd debug messages, and fix a xheap bug
User [Thu, 6 Sep 2012 15:13:39 +0000 (18:13 +0300)]
add debug messages, and fix a xheap bug

11 years agofix xsegbd to work with the new scheme. needs further testing
User [Thu, 6 Sep 2012 13:34:04 +0000 (16:34 +0300)]
fix xsegbd to work with the new scheme. needs further testing

also fix xhash shrink bug and xpool exports

11 years agofix xsegbd based on the new allocation scheme
Filippos Giannakos [Thu, 6 Sep 2012 10:22:12 +0000 (13:22 +0300)]
fix xsegbd based on the new allocation scheme

11 years agofix xsegbd to compile
Filippos Giannakos [Tue, 4 Sep 2012 14:54:01 +0000 (17:54 +0300)]
fix xsegbd to compile

11 years agoadd pthread kernel driver
Filippos Giannakos [Tue, 4 Sep 2012 14:36:49 +0000 (17:36 +0300)]
add pthread kernel driver

11 years agoadd pthread user driver
Filippos Giannakos [Tue, 4 Sep 2012 14:13:03 +0000 (17:13 +0300)]
add pthread user driver

11 years agofix filed, xseg tool to use the new xseg api
Filippos Giannakos [Tue, 4 Sep 2012 13:02:52 +0000 (16:02 +0300)]
fix filed, xseg tool to use the new xseg api

11 years agoadd xseg {get,set} req data
Filippos Giannakos [Tue, 4 Sep 2012 09:22:36 +0000 (12:22 +0300)]
add xseg {get,set} req data

11 years agoinitial commit for xpaths code
Filippos Giannakos [Mon, 3 Sep 2012 15:56:12 +0000 (18:56 +0300)]
initial commit for xpaths code

11 years agoadd max allocated reqs per port. also some other minor fixes
Filippos Giannakos [Mon, 3 Sep 2012 14:53:44 +0000 (17:53 +0300)]
add max allocated reqs per port. also some other minor fixes

11 years agomake xheap use a more complex indexing system
Filippos Giannakos [Mon, 3 Sep 2012 14:23:46 +0000 (17:23 +0300)]
make xheap use a more complex indexing system

11 years agoxobj: keap xheap chunks instead of each object in allocated hash table
Filippos Giannakos [Mon, 3 Sep 2012 10:10:00 +0000 (13:10 +0300)]
xobj: keap xheap chunks instead of each object in allocated hash table

also add additional book keeping info

11 years agoadd support for resizable queues
Filippos Giannakos [Fri, 31 Aug 2012 16:56:58 +0000 (19:56 +0300)]
add support for resizable queues

also fix heap index bug

11 years agosmall fixes in xseg-tool , filed
Filippos Giannakos [Fri, 31 Aug 2012 13:29:42 +0000 (16:29 +0300)]
small fixes in xseg-tool , filed

11 years agofix xsegbd according to the new allocation scheme
Filippos Giannakos [Fri, 31 Aug 2012 11:51:11 +0000 (14:51 +0300)]
fix xsegbd according to the new allocation scheme

11 years agofix xhash to compile in kernel. also removed numerous compiler warnings
Filippos Giannakos [Fri, 31 Aug 2012 10:56:13 +0000 (13:56 +0300)]
fix xhash to compile in kernel. also removed numerous compiler warnings

11 years agomake default reqs per queue a definetion instead of a hardcoded value
Filippos Giannakos [Fri, 31 Aug 2012 09:49:12 +0000 (12:49 +0300)]
make default reqs per queue a definetion instead of a hardcoded value

11 years agoremove unneeded {alloc, free}_request functions
Filippos Giannakos [Fri, 31 Aug 2012 08:32:18 +0000 (11:32 +0300)]
remove unneeded {alloc, free}_request functions

11 years agomake bind port reuse previously unfreed port
Filippos Giannakos [Fri, 31 Aug 2012 08:28:18 +0000 (11:28 +0300)]
make bind port reuse previously unfreed port

11 years agoadd makefiles for xtypes
Filippos Giannakos [Thu, 30 Aug 2012 16:04:38 +0000 (19:04 +0300)]
add makefiles for xtypes

11 years agofix xseg-tool rnd functions to check for error on submit
Filippos Giannakos [Thu, 30 Aug 2012 16:01:54 +0000 (19:01 +0300)]
fix xseg-tool rnd functions to check for error on submit

also changeg type of xqindex to uint64_t

11 years agofix remaining bugs from old code
Filippos Giannakos [Thu, 30 Aug 2012 15:39:17 +0000 (18:39 +0300)]
fix remaining bugs from old code

11 years agoadd xtypes to kernel makefile
Filippos Giannakos [Thu, 30 Aug 2012 13:52:48 +0000 (16:52 +0300)]
add xtypes to kernel makefile

11 years agofix xseg-tool. temp fix to other peers, just to compile
Filippos Giannakos [Thu, 30 Aug 2012 13:36:49 +0000 (16:36 +0300)]
fix xseg-tool. temp fix to other peers, just to compile

11 years agomake xhash request for less allocated space
Filippos Giannakos [Thu, 30 Aug 2012 12:51:00 +0000 (15:51 +0300)]
make xhash request for less allocated space

11 years agofix filed
Filippos Giannakos [Thu, 30 Aug 2012 12:30:02 +0000 (15:30 +0300)]
fix filed

11 years agoadded necessary compiler memory barrier to xlock_release
Filippos Giannakos [Thu, 30 Aug 2012 11:37:55 +0000 (14:37 +0300)]
added necessary compiler memory barrier to xlock_release

also some makefile fixes

11 years agofix numerous compile errors
Filippos Giannakos [Thu, 30 Aug 2012 10:17:14 +0000 (13:17 +0300)]
fix numerous compile errors

11 years agomodify Makefile to include new xtypes
Filippos Giannakos [Thu, 30 Aug 2012 09:36:17 +0000 (12:36 +0300)]
modify Makefile to include new xtypes

11 years agoadd portno to port struct
Filippos Giannakos [Thu, 30 Aug 2012 09:25:44 +0000 (12:25 +0300)]
add portno to port struct

11 years agofix the way drivers get xseg port
Filippos Giannakos [Thu, 30 Aug 2012 09:23:27 +0000 (12:23 +0300)]
fix the way drivers get xseg port

11 years agorewrite remaining xseg functions with the new allocation scheme
Filippos Giannakos [Thu, 30 Aug 2012 09:20:05 +0000 (12:20 +0300)]
rewrite remaining xseg functions with the new allocation scheme

11 years agowrite more xseg functions based on the new scheme
Filippos Giannakos [Wed, 29 Aug 2012 16:13:14 +0000 (19:13 +0300)]
write more xseg functions based on the new scheme

11 years agorewrite xseg initialize skeleton
Filippos Giannakos [Wed, 29 Aug 2012 12:09:23 +0000 (15:09 +0300)]
rewrite xseg initialize skeleton

also some other minor modifications for the new scheme

11 years agomove heap, obj outside of xseg and make them xtypes
Filippos Giannakos [Wed, 29 Aug 2012 10:08:30 +0000 (13:08 +0300)]
move heap, obj outside of xseg and make them xtypes

also added absolute pointer manipulation macros to sys/util.h

11 years agoMerge branch 'xseg-refactor' of ssh://ray/repos/archip into xseg-refactor
Filippos Giannakos [Tue, 28 Aug 2012 12:42:47 +0000 (15:42 +0300)]
Merge branch 'xseg-refactor' of ssh://ray/repos/archip into xseg-refactor

11 years agosketch for CAS/atomic helpers
Georgios D. Tsoukalas [Tue, 28 Aug 2012 08:45:32 +0000 (11:45 +0300)]
sketch for CAS/atomic helpers

11 years agoseperate malloced struct xseg from mmapped segment
Filippos Giannakos [Mon, 27 Aug 2012 08:35:31 +0000 (11:35 +0300)]
seperate malloced struct xseg from mmapped segment

11 years agofix obj_h in segment initialization
Filippos Giannakos [Fri, 10 Aug 2012 13:42:55 +0000 (16:42 +0300)]
fix obj_h in segment initialization

also replace mistyped xseg_put_request with xseg_put_object
in xseg_put_port

11 years agowork in progress: xseg allocation, xseg ptr free
Filippos Giannakos [Fri, 10 Aug 2012 13:24:45 +0000 (16:24 +0300)]
work in progress: xseg allocation, xseg ptr free

also added xlock_try_lock functionality

11 years agomake code compile. no validity checks
Filippos Giannakos [Thu, 9 Aug 2012 13:07:53 +0000 (16:07 +0300)]
make code compile. no validity checks

lock owners are unimportant for the time being.
kernel lacks xhash support

11 years agoinitial code commit in data structures
Filippos Giannakos [Thu, 9 Aug 2012 12:07:57 +0000 (15:07 +0300)]
initial code commit in data structures

* moved xq folder to xtypes
* moved xq_lock.h to xlock.h
* added xhash
* added xpool
* added owner to xlock
* added lock free versions of xq functions

12 years agoadd explicit non-interactive mode to envsetup
Georgios D. Tsoukalas [Fri, 8 Jun 2012 06:18:12 +0000 (09:18 +0300)]
add explicit non-interactive mode to envsetup

12 years agoremove obsolete peer blockd
Georgios D. Tsoukalas [Fri, 8 Jun 2012 06:17:26 +0000 (09:17 +0300)]
remove obsolete peer blockd

12 years agoadd some verbosity to peer driver locating
Georgios D. Tsoukalas [Fri, 8 Jun 2012 06:16:03 +0000 (09:16 +0300)]
add some verbosity to peer driver locating

12 years agoenhance helpers, merge with xseg_setup into launch
Georgios D. Tsoukalas [Fri, 8 Jun 2012 06:12:57 +0000 (09:12 +0300)]
enhance helpers, merge with xseg_setup into launch

12 years agoutil_libs/user: Add clean target in Makefile
Stratos Psomadakis [Wed, 6 Jun 2012 12:56:57 +0000 (15:56 +0300)]
util_libs/user: Add clean target in Makefile

12 years agopeers/user: Python 1-1 Mapper
Stratos Psomadakis [Wed, 6 Jun 2012 12:37:51 +0000 (15:37 +0300)]
peers/user: Python 1-1 Mapper

12 years agosys/user: Python xseg bindings
Stratos Psomadakis [Wed, 6 Jun 2012 12:37:02 +0000 (15:37 +0300)]
sys/user: Python xseg bindings

12 years agoxsegbd: Fix a build error after a failed merge
Stratos Psomadakis [Wed, 6 Jun 2012 12:36:00 +0000 (15:36 +0300)]
xsegbd: Fix a build error after a failed merge

12 years agoxseg: Export xseg_finalize()
Stratos Psomadakis [Wed, 6 Jun 2012 12:34:35 +0000 (15:34 +0300)]
xseg: Export xseg_finalize()

12 years agopeers/user: Add vlmcd/mapperd in the build system
Stratos Psomadakis [Wed, 6 Jun 2012 12:33:22 +0000 (15:33 +0300)]
peers/user: Add vlmcd/mapperd in the build system

12 years agopeers/user: 1-1 Mapper peer (mapperd)
Stratos Psomadakis [Wed, 6 Jun 2012 12:32:40 +0000 (15:32 +0300)]
peers/user: 1-1 Mapper peer (mapperd)

12 years agopeers/user: The Volume Composer (vlmcd)
Stratos Psomadakis [Wed, 6 Jun 2012 12:32:05 +0000 (15:32 +0300)]
peers/user: The Volume Composer (vlmcd)

12 years agoRename typedef'd None to Noneidx
Stratos Psomadakis [Fri, 25 May 2012 11:44:05 +0000 (14:44 +0300)]
Rename typedef'd None to Noneidx

Rename None to Noneidx to avoid (future)  conflicts with xseg python
bindings.

12 years agoxsegbd: stricter error checks
Stratos Psomadakis [Fri, 25 May 2012 10:59:46 +0000 (13:59 +0300)]
xsegbd: stricter error checks

12 years agotemporary hack to compile misunderstood code
Georgios D. Tsoukalas [Tue, 5 Jun 2012 18:36:16 +0000 (21:36 +0300)]
temporary hack to compile misunderstood code

12 years agopurge unused variables
Georgios D. Tsoukalas [Tue, 5 Jun 2012 18:35:24 +0000 (21:35 +0300)]
purge unused variables

12 years agoC99 compliant __VA_ARGS__ handling
Georgios D. Tsoukalas [Tue, 5 Jun 2012 18:33:15 +0000 (21:33 +0300)]
C99 compliant __VA_ARGS__ handling

12 years agokstrtoul to strict_strtoul for old kernel support
Georgios D. Tsoukalas [Tue, 5 Jun 2012 18:30:58 +0000 (21:30 +0300)]
kstrtoul to strict_strtoul for old kernel support

12 years agopeers/xsegbd: Possible NULL ptr deref in release
Stratos Psomadakis [Tue, 29 May 2012 14:18:25 +0000 (17:18 +0300)]
peers/xsegbd: Possible NULL ptr deref in release

12 years agopeers: Some changes to xseg-tool submit_reqs/complete cmds
Stratos Psomadakis [Tue, 29 May 2012 14:16:52 +0000 (17:16 +0300)]
peers: Some changes to xseg-tool submit_reqs/complete cmds

12 years agodoc: Basic commands to test xsegbd/vlmcd/mapperd/filed end-to-end
Stratos Psomadakis [Tue, 29 May 2012 14:12:19 +0000 (17:12 +0300)]
doc: Basic commands to test xsegbd/vlmcd/mapperd/filed end-to-end

12 years agoxseg-tool: Add submit_reqs cli option
Stratos Psomadakis [Fri, 25 May 2012 11:02:48 +0000 (14:02 +0300)]
xseg-tool: Add submit_reqs cli option

12 years agoxseg: some 'perfcounters' cleanup/changes, and a possible out-of-range index fix
Stratos Psomadakis [Fri, 25 May 2012 11:02:11 +0000 (14:02 +0300)]
xseg: some 'perfcounters' cleanup/changes, and a possible out-of-range index fix

12 years agodrivers/xseg: Fix signalling for posix peers
Stratos Psomadakis [Wed, 16 May 2012 23:04:01 +0000 (02:04 +0300)]
drivers/xseg: Fix signalling for posix peers

 * tkill was called with the arguments in reverse order: (signo, tid)
   instead of (tid, signo).
 * Increase the timeouts for xseg_signal, now that signalling actually
   works. We could as well get rid of the timeout completely.
 * kernel peers could never signal posix peers, since xseg_posix
   driver/module for segdev peers was never built and loaded.

12 years agotools: Fix some errors after the name to target renames
Stratos Psomadakis [Wed, 16 May 2012 23:03:01 +0000 (02:03 +0300)]
tools: Fix some errors after the name to target renames

(Need a lot more fixes to bring the up-to-date with the new code)

12 years agodoc: Start documenting xseg terms and operation
Stratos Psomadakis [Wed, 16 May 2012 23:01:44 +0000 (02:01 +0300)]
doc: Start documenting xseg terms and operation

12 years agoxseg: Add some perf counters (request rtt/latency)
Stratos Psomadakis [Wed, 16 May 2012 23:01:01 +0000 (02:01 +0300)]
xseg: Add some perf counters (request rtt/latency)

12 years agoxseg: Rename req->name to req->target in xseg_request
Stratos Psomadakis [Wed, 6 Jun 2012 11:50:58 +0000 (14:50 +0300)]
xseg: Rename req->name to req->target in xseg_request

Rename req->name to req->target in struct xseg_request, and change
buffersize/namesize/datasize to bufferlen/targetlen/datalen
accordingly.

12 years agoAlso clean sosd
Vangelis Koukis [Fri, 11 May 2012 07:48:25 +0000 (10:48 +0300)]
Also clean sosd

12 years agozero out rest of data buffer on end of file
Giannakos Filippos [Fri, 16 Dec 2011 19:10:07 +0000 (21:10 +0200)]
zero out rest of data buffer on end of file

12 years agoMerge branch 'sosd' into demo
Stratos Psomadakis [Wed, 4 Apr 2012 08:24:28 +0000 (11:24 +0300)]
Merge branch 'sosd' into demo

Conflicts:
xseg/peers/Makefile

'Ported' the sosd peer and libsos to the new repo layout and build
system. Also fixed some sosd issues with the recent changes in xseg
API.

12 years agoxseg-tool: Add req logging support for bridge mode
Stratos Psomadakis [Tue, 3 Apr 2012 13:49:23 +0000 (16:49 +0300)]
xseg-tool: Add req logging support for bridge mode

12 years agoAdd resize support in xsegbd/filed-blockd/vlmc-tool
Stratos Psomadakis [Tue, 3 Apr 2012 13:04:58 +0000 (16:04 +0300)]
Add resize support in xsegbd/filed-blockd/vlmc-tool

12 years agoxsegbd: Make sysfs add/remove more robust
Stratos Psomadakis [Tue, 3 Apr 2012 11:13:42 +0000 (14:13 +0300)]
xsegbd: Make sysfs add/remove more robust

Use a separate spinlock to serialize access on the dev list, instead
of the sysfs/bus mutex, and make sure the device is not removed from
the dev list too early.

The change was 'ported' from Alex Elder's patches for the rbd block
driver.

12 years agoextstorage vlmc scripts refactoring
Stratos Psomadakis [Mon, 2 Apr 2012 10:32:22 +0000 (13:32 +0300)]
extstorage vlmc scripts refactoring

12 years agoInitial import of the ganeti extstorage vlmc scripts
Stratos Psomadakis [Thu, 29 Mar 2012 14:34:59 +0000 (17:34 +0300)]
Initial import of the ganeti extstorage vlmc scripts

12 years agoVarious fixes to make xseg functional again
Stratos Psomadakis [Thu, 29 Mar 2012 13:15:05 +0000 (16:15 +0300)]
Various fixes to make xseg functional again

 * xseg:
- Make sure the allocated xseg struct in xseg_join is initialized
  correctly
- Initial implementation for xseg_leave()
- Add __lock_domain in xseg_destroy()

 * driver api:
- Add a struct xseg * argument to xseg_operations->map(). It's
  passed to the driver when a peer joins the segment, and it's
  used by xseg_segdev kernel driver (for the initialization of
  xsegments[] array).

 * drivers/kernel/xseg_segdev:
    - Use struct xseg * segdev_map() to initialize the xsegments[]
  array.
- Some minor fixeds

 * sys/segdev:
    - Fix wait_for_event_interruptible condition (this fixes an issue
  with xseg-tool not being able to destroy segdev segments).
- Correct the use of segdev_get/put() in various places.

 * build system:
    - Add distclean target, which cleans lib/user and lib/kernel dirs.
- Fix the clean target in sys/user dir.
- Temp exclude of the vlmc peer (it doesn't compile)

 * tools:
    - Modify the helper/setup/vlmc scripts, to work with the new
  repo/code layout.

 * xsegbd:
    - Minor fix in xseg_callback() (xseg_receive() wasn't fixed after
  the refactoring)

12 years agoFIx .gitignores for the new build system
Stratos Psomadakis [Fri, 23 Mar 2012 12:15:09 +0000 (14:15 +0200)]
FIx .gitignores for the new build system

12 years agoMerge remote branch 'origin/xseg' into demo
Stratos Psomadakis [Fri, 23 Mar 2012 11:53:58 +0000 (13:53 +0200)]
Merge remote branch 'origin/xseg' into demo

Conflicts:
xseg/tools/vlmc-blockd.py [trivial]

12 years agoFix rc file parsing for the vlmc python tools
Stratos Psomadakis [Fri, 23 Mar 2012 11:36:32 +0000 (13:36 +0200)]
Fix rc file parsing for the vlmc python tools

12 years agoImprove error handling for xseg setup scripts
Stratos Psomadakis [Fri, 23 Mar 2012 11:36:06 +0000 (13:36 +0200)]
Improve error handling for xseg setup scripts

12 years agoremove spurious include paths from compilation
Georgios D. Tsoukalas [Tue, 28 Feb 2012 06:14:52 +0000 (08:14 +0200)]
remove spurious include paths from compilation

12 years agoMerge branch 'vlmcd-as-blockd' into xseg
Vangelis Koukis [Mon, 27 Feb 2012 16:56:20 +0000 (18:56 +0200)]
Merge branch 'vlmcd-as-blockd' into xseg

Conflicts:
xseg/peers/Makefile
Fixes:
fix target autodetection in base.mk
fix issues with vlmcd, still does not build

12 years agoREADME placeholder files for lib/ directories
Georgios D. Tsoukalas [Mon, 27 Feb 2012 16:36:46 +0000 (18:36 +0200)]
README placeholder files for lib/ directories

12 years agoIntroduce execution domains in code and building
Georgios D. Tsoukalas [Sun, 26 Feb 2012 20:30:12 +0000 (22:30 +0200)]
Introduce execution domains in code and building

Only fixed to compile. Untested.

Lots of refactoring, cleanup, and fixing in the process.
This log has three parts:
1. What are execution domains and why we need them
2. What are the API incompatibilities introduced
3. Issues that were discovered in the process,
   and how they were fixed, or how they need fixing.

Note that there are many changes not documented in this log.

1. Execution Domains.

The execution domains are simply the different environments where
the xseg library, drivers and peers are compiled and linked in.
Currently there are two domains, 'user' for userspace processes,
and 'kernel' for kernel modules. The rule of thumb is that if you
need to compile it differently, then you need a new execution domain.

New domains could be introduced, for example,
so that xseg runs inside a hypervisor, another OS/arch, or even
to have two different implementations of xseg run together.
Until now, the kernel domain was all stuffed in sys/,
domain, drivers, and peers together.

The new repository layout defines domains nicely:

sys/${DOMAIN}/    ->    domain specific support code
drivers/${DOMAIN/ ->    drivers available to the domain
peers/${DOMAIN}/  ->    the peers that execute in the domain
lib/${DOMAIN/     ->    built libraries, modules for the domain

The kernel domain has been split into four parts:
a. the xseg.ko library kernel module in sys/kernel.
   (this includes the domain support code in xsegmod.c)
b. the segdev.ko (renamed from xsegdev) character device in sys/kernel
   (this could be part of the driver, but is generic enough
    to be included into the domain to be generally available)
c. the xseg_segdev.ko segdev segment and peer driver in drivers/kernel
d. the xsegbd.ko segdev peer in peers/kernel

Similar is the layout for the user domain.
The domain support code is in sys/user/xseg_user.c

The domain support code finds out what it must implement in
various "domain.h" files in the tree, currently:
xq/domain.h
xseg/domain.h
sys/domain.h

2. API changes
==============

i.   xseg_initialize() no longer takes an argument.
     Instead, the type of the peer is decided at xseg_join().
     This way a program may implement more than one type of peers
     (in the same, or different segments)
     xseg_initialize() is only for library initialization.

ii.  xseg_join takes two more arguments:
     a. the name of the peer type to be initialized
     b. a callback function for fully asynchronous peers,
        such as xsegbd, who can never sleep in wait_for_signal()
        This callback is just registered by the library;
        if the driver does not call it, it will never be.

iii. xseg_wait_signal() no longer takes a portno argument.
     This was a mistake.
     The sleep is intended to be as generic as possible.
     Ideally, the library (through the domain support code)
     should offer a wakeup method in all possible ways
     (e.g. from other peers as with xseg_signal(),
      from the peer context e.g. with select() in user,
      or waitqueues in kernel, signals, timers, ...)

      Right now, the peer has to schedule its wakeup
      by using xseg_signal on itself from another context,
      or by exploiting the same mechanism that the peer driver does
      (e.g. SIGIO)

Deeper in the library, the driver interface for signaling was changed
so that functions take the full segment descriptor plus the portno,
rather than just a pointer to the port.

3. Issues
=========

* Kill security.
  Any peer signaling a segdev peer can send SIGIO to any process in the system.
  There is no infrastructure for signaling security.
  The segment could be limited to a specific uid, so that
  all peers must be run as this user,
  and all kills are made as (with the permissions of) this user.

* Killing threads.
  Posix driver for kernel and user domains kills specific threads with SIGIO,
  and not processes. Before this commit, the kernel driver killed threads,
  while the user driver killed processes.
  It is trivial to change the behavior to one or the other, if we need to.

  Killing processes has the advantage that a multithreaded user peer
  need not have a master peer that will accept and dispatch work.
  The kernel will send a waking signal to one of the sleeping threads.

  However, killing threads provides more flexibility,
  while it can emulate the other way:
  All threads when sleeping, they register the id of the master thread,
  so at all times, only the master thread receives signals.
  Then, the master thread can kill the process and emulate
  a process-killing signal.

  Currently, the posix driver registers the id of the thread
  that initializes the library as the master thread.
  Fine tunings will probably be needed for this to work correctly.

* Callback design & code cleanup.
  xsegbd cannot sleep. So may other peers in the future,
  or so we might decide to implement some otherwise sleepable ones.
  prepare/cancel_wait() and wait_signal() are not used by such peers.
  Instead, a callback is registered at join,
  which takes a segment descriptor and the signalled port as arguments.
  The library only registers the callback in the segment descriptor.
  It is up to the peer drivers to schedule its call upon signaling.

  In the case of xsegbd, the peer driver (xseg_segdev) utilizes
  the kernel domain support character device (segdev).
  The userspace segdev driver calls the kernel segdev driver through
  /dev/segdev, and the kernel segdev calls the xsegbd-registerd callback
  through the xseg descriptor.

  Currently there is support for only one segdev character device,
  and only one kernel segdev peer, but the design is easily extensible.

  xsegdev was renamed to segdev.
  Notice that in the whole segdev code there is no reference to xseg
  (thus the rename). Segdev is considered an independent utility
  that supports the kernel domain.

* Make will pass V=1 to kbuild, so that verbosity can be controlled
  from the top-level make.

* ${XSEG_HOME}/envsetup is an environment-setting tool that will either
  - initialize variables if sourced
  - initialize variables and start a shell if executed with no arguments
  - printout variables if executed with 'show'

  Its intended use is from the command line, to set up a dev shell,
  and it is used by the makefiles to set up/discover the environment.

* The build system was improved.
  (fewer includes, more central configuration, more automation, etc)

  The top-level base.mk is at the heart of it,
  discovering and setting most of the variables,
  while defining global rules.

  It uses envsetup for basic variables and
  tools/xseg-domain-targets to auto-detect what targets are available
  in the tree.

* LOGMSG was renamed to XSEGLOG and promoted to domain-specific.
  The xsegbd-specific XSEGLOG was discarded.

* xsegbd hacks.
  There were some ugly hacks and bad stuff in how xsegbd handled
  its signalling via callbacks, and specifically how it blocked to
  wait for device size. A pointer was overlayed in a private field
  along with an integer, and circulated through the userspace,
  before being intrusively extracted from port->waitcue and
  auto-detected as pointer.

  Now there are are proper structures (struct pending)
  for distinguishing among asynchronous or completion-blocked requests,
  and the callbacks all run through well defined interfaces.

* xsegbd hazards.
  The initialization of xsegbd, both in sysfs and in disk,
  has memory leaks, not freeing memory on failure.

  The loop receiving requests within the callback,
  may receive replies for more than one device,
  and therefore needs to call request_fn's for more than one device.
  This was fixed (not tested).

12 years agoMerge branch 'xseg' into vlmcd-as-blockd
Vangelis Koukis [Sun, 26 Feb 2012 09:22:01 +0000 (11:22 +0200)]
Merge branch 'xseg' into vlmcd-as-blockd

12 years agoInitial, completely broken skeleton of a vlmcd
Vangelis Koukis [Sun, 26 Feb 2012 09:20:41 +0000 (11:20 +0200)]
Initial, completely broken skeleton of a vlmcd

Initial, completely broken skeleton of a vlmcd,
single-threaded, modelled after blockd.

There doesn't seem to be a need for multithreaded
operation if a peer is only interacting with other xseg peers.

12 years agososd: add dummy X_INFO reply. all images to 20GB.
Giannakos Filippos [Fri, 24 Feb 2012 15:37:39 +0000 (17:37 +0200)]
sosd: add dummy X_INFO reply. all images to 20GB.

12 years agomove qa/ to tools/
Georgios D. Tsoukalas [Fri, 24 Feb 2012 15:40:11 +0000 (17:40 +0200)]
move qa/ to tools/

12 years agoenvsetup script to exec or source for env setup
Georgios D. Tsoukalas [Fri, 24 Feb 2012 15:34:24 +0000 (17:34 +0200)]
envsetup script to exec or source for env setup

Sets up XSEG_HOME PATH LD_LIBRARY_PATH etc.

If it is executed, it starts a new $SHELL.
If it is sourced, it just exports the variables.