Conventions used below:
- $ICC_DIR refers to the directory where ICC is installed.
- $MNEMOSYNE refers to the root directory of the Mnemosyne source tree.
- GNU C/C++ Compiler v.4.4 (tested v.4.4.2)
- Intel C/C++ STM Compiler (ICC), Prototype Edition 3.0 (tested) or 4.0 (not tested)
- SCons: A software construction tool (tested v.1.2.0)
- libconfig (tested v.1.3.2)
- libelf (elfutils-libelf in most RPM systems) (tested v.0.148)
- Berkeley DB (tested v.4.8.26)
- UnitTest++ (unittest-cpp.sourceforge.net) (libunittest++-dev in most RPM systems)
- Note:
- Mnemosyne was tested on a 64-bit platform.
- Copy itm.h and itmuser.h from ICC into Mnemosyne STM
% cp $ICC_DIR/include/itm.h $MNEMOSYNE/usermode/library/mtm/src
% cp $ICC_DIR/include/itmuser.h $MNEMOSYNE/usermode/library/mtm/src
Then do the following modification in the Mnemosyne copy of itmuser.h:
- Remove lines 102-104:
struct _ITM_transactionS;
//! Opaque transaction descriptor.
typedef struct _ITM_transactionS _ITM_transaction;
- Replace line 99:
# define _ITM_CALL_CONVENTION __attribute__((regparm(2)))
with # if (defined (__x86_64__))
# define _ITM_CALL_CONVENTION
# else
# define _ITM_CALL_CONVENTION __attribute__((regparm(2)))
# endif
Configuration switches of interest:
- --build-debug: build library with debug info (default)
- --no-build-debug: build library with no debug info
- --build-stats: build library with statistics collection support
For all configuration switches please invoke: scons --help
Configuration variables of interest:
- M_PCM_EMULATE_LATENCY (default: False)
- M_PCM_CPUFREQ (default: 2500)
- M_PCM_LATENCY_WRITE (default: 150)
- M_PCM_BANDWIDTH_MB (default: 1200)
For all configuration variables please refer to $MNEMOSYNE/usermode/library/configuration/default
Ensure that mainEnv['ICC_DIR'] in $MNEMOSYNE/usermode/SConstruct points to the directory where ICC is installed:
For example, to build Mnemosyne for PCM write latency of 1000ns, invoke SCons in $MNEMOSYNE/usermode:
% cd $MNEMOSYNE/usermode
% scons M_PCM_EMULATE_LATENCY=True M_PCM_LATENCY_WRITE=1000
All generated objects and binaries are placed under $MNEMOSYNE/usermode/build.
- Note:
- It is important to compile with framepointers on using: -fno-omit-frame-pointer. SCons files take care of this but if you are going to use Mnemosyne with your own application then make sure you build the application with framepointers.
Currently we use GCC to build the TM library as libatomic_ops relies on GCC atomic intrinsics such as __sync_add_and_fetch_4, which are not available in the version of ICC we use.
- Todo:
- Currently we use GCC to build the TM library as libatomic_ops relies on GCC atomic intrinsics such as __sync_add_and_fetch_4, which are not available in the version of ICC we use. We would like to fix this issue.
Building our Linux extensions is necessary if you want to have persistent mappings that survive system reboot without having to issue fsync. If you do not care about system crashes then you can always issue an fsync and run mnemosyne on top of a vanilla kernel. In that case you just need to build user-mode Mnemosyne with:
MCORE_KERNEL_PMAP = False
Switch to $MNEMOSYNE/kernelmode/linux-2.6.33 and follow the same usual procedure when building a Linux vanilla kernel.
Switch to $MNEMOSYNE/kernelmode/scmmap and invoke make
% cd $MNEMOSYNE/kernelmode/scmmap
% make
Switch to $MNEMOSYNE/kernelmode/pcmdisk.
The provided makefile may be used to build the kernel-module. Please make sure the makefile variable $KERNEL_SOURCE points to the right kernel source tree.
Several parameters may be changed to configure PCM-disk as needed:
-
$MNEMOSYNE/kernelmode/pcmdisk/pcm.h
-
PCM_CPUFREQ : To set the CPU frequency
-
$MNEMOSYNE/kernelmode/pcmdisk/brd.c
-
CONFIG_BLK_DEV_PCM_SIZE : To set the size of the PCM-disk
-
$MNEMOSYNE/kernelmode/pcmdisk/pcm.c
-
PCM_BANDWIDTH_MB: Emulated PCM write bandwidth (can be changed dynamically as well)
-
DRAM_BANDWIDTH_MB: DRAM system peak bandwidth (can be measured using the tool in $MNEMOSYNE/usermode/tool/bandwidth-ram)
build:
% cd $MNEMOSYNE/kernelmode/pcmdisk
% make
Generated on Sat Apr 23 11:43:36 2011 for Mnemosyne by
1.4.7