| 47 | | [[BR]] |
| 48 | | == 5.Kerrighed modules - Source Code Structure Analysis == |
| 49 | | === 5.1 Kerrighed 0.70 Totally 7 Modules === |
| 50 | | [[Image(krg0.7arch.png)]] |
| 51 | | * Kerrighed extension of Linux Kernel |
| 52 | | * Process & load balancing - '''Aragorn''' |
| 53 | | * Containers - '''Gandalf''' |
| 54 | | * Synchronization - '''Elrond''' |
| 55 | | * Ghosts - '''Nazgul''' |
| 56 | | * Communication - '''Gimli''', '''Gloin''' |
| 57 | | * Tools - '''lluvatar''' |
| 58 | | |
| 59 | | ==== 5.1.1 Probably the Key modules for this project ==== |
| 60 | | |
| 61 | | * '''Gandalf module''': Global memory management -> ('''For Container''') |
| 62 | | * /kerrighed-2.3.0/libs/include/kerrighed_tools.h |
| 63 | | * /kerrighed-2.3.0/modules/tools/krg_services.h |
| 64 | | * /kerrighed-2.3.0/modules/mm/mmap_handler.h[[BR]] |
| 65 | | |
| 66 | | '''/* Memory Part -> Distributed Shared Memory (DSM) , MPI&OpenMP */''' |
| 67 | | |
| 68 | | * '''Aragon module''': Global process management -> ('''For Migration''') |
| 69 | | * /kerrighed-2.3.0/modules/proc/distant_syscalls.c |
| 70 | | * /kerrighed-2.3.0/modules/scheduler/mosix_probe.c |
| 71 | | * /kerrighed-2.3.0/modules/tools/krg_arch.h |
| 72 | | * /kerrighed-2.3.0/modules/rpc/rpcid.h |
| 73 | | * /kerrighed-2.3.0/modules/epm/fork_delay.c |
| 74 | | * /kerrighed-2.3.0/modules/epm/migration.c |
| 75 | | * /kerrighed-2.3.0/modules/epm/procfs.c[[BR]] |
| 76 | | |
| 77 | | '''/* Process & Load balancing Part -> MPI , OpenMP */''' [[BR]] |
| 78 | | |
| 79 | | '''Process migration involves two key phases:''' [[BR]] |
| 80 | | (1) migration of the process execution context [[BR]] |
| 81 | | (2) maintenance of links between the migrated process and the resources [[BR]] |
| 82 | | |
| 83 | | First task: '''Nazgul module''' ---> second task: '''Gandalf module''' -> container & linker |
| 84 | | |
| 85 | | * '''Elrond module''': Synchronization tools for parallel applications -> ('''For Synchronization''') |
| 86 | | * /kerrighed-2.3.0/modules/epm/ghost_process_api.h[[BR]] |
| 87 | | |
| 88 | | '''/* Synchronization Part -> MPI , OpenMP */''' [[BR]] |
| 89 | | |
| 90 | | {{{ |
| 91 | | Elrond provides distributed locks, barriers, semaphores, and wait condition to processes in a implementation that |
| 92 | | supports process checkpointing as well as migration between nodes. |
| 93 | | }}} |
| 94 | | |
| 95 | | * '''Gimli''': |
| 96 | | * /kerrighed-2.3.0/libs/libkerrighed/libcomm.c |
| 97 | | * /kerrighed-2.3.0/libs/include/comm.h |
| 98 | | * /kerrighed-2.3.0/libs/include/kerrighed_tools.h |
| 99 | | * /kerrighed-2.3.0/modules/arch/um/krg_um.c |
| 100 | | * /kerrighed-2.3.0/tools/krg_services.h |
| 101 | | * /kerrighed-2.3.0/tools/krg_arch.h |
| 102 | | * /kerrighed-2.3.0/modules/fs/kerfs/dir_io_linker.c |
| 103 | | * /kerrighed-2.3.0/modules/fs/kerfs/inode_io_linker.c |
| 104 | | * /kerrighed-2.3.0/modules/fs/kerfs/file_io_linker.c [[BR]] |
| 105 | | |
| 106 | | |
| 107 | | |
| 108 | | {{{ |
| 109 | | All these distributed services are based on Gimli for their communications. Gimli is a service providing high |
| 110 | | performance communication inside the cluster and a complete abstraction of the communication system to kerrighed that |
| 111 | | makes it portable on various interconnection networks. |
| 112 | | }}} |
| 113 | | |
| 114 | | |
| 115 | | |
| 116 | | [[BR]] |
| 117 | | === 5.2 Kerrighed 2.3.0 Totally 14 Modules === |
| 118 | | [[Image(KerrighedArch.png)]] |
| 119 | | || RPC || || |
| 120 | | || Hotplug || || |
| 121 | | || KDDM || || |
| 122 | | || Capability || || |
| 123 | | || ProcFS || || |
| 124 | | || Sync || || |
| 125 | | || IPC || || |
| 126 | | || FS || || |
| 127 | | || MM || || |
| 128 | | || Dynamic Streams || || |
| 129 | | || Ghost || || |
| 130 | | || Proc || || |
| 131 | | || EPM || || |
| 132 | | || Global Scheduler || || |
| 133 | | * Load Kerrighed Moudles Messages |
| 134 | | {{{ |
| 135 | | $ dmesg |
| 136 | | Start loading Kerrighed... |
| 137 | | Init Kerrighed worker(s)...Init Kerrighed low-level framework... |
| 138 | | Init kerrighed syscall mechanism |
| 139 | | Kerrighed tools - init module |
| 140 | | TIPC: Started in network mode |
| 141 | | TIPC: Own node address <1.1.2>, network identity 1 |
| 142 | | Try to enable bearer on lo:<5>TIPC: Enabled bearer <eth:lo>, discovery domain <1.1.0>, priority 10 |
| 143 | | ok |
| 144 | | Try to enable bearer on eth0:<5>TIPC: Enabled bearer <eth:eth0>, discovery domain <1.1.0>, priority 10 |
| 145 | | ok |
| 146 | | Try to enable bearer on eth1:<4>TIPC: Bearer <eth:eth1> priority adjustment required 10->9 |
| 147 | | TIPC: Enabled bearer <eth:eth1>, discovery domain <1.1.0>, priority 9 |
| 148 | | ok |
| 149 | | RPC initialisation done |
| 150 | | Init Kerrighed low-level framework (nodeid 1) : done |
| 151 | | Init Kerrighed distributed services... |
| 152 | | KDDM initialisation : start |
| 153 | | KDDM set init |
| 154 | | KDDM set init : done |
| 155 | | KDDM initialisation done |
| 156 | | KerMM initialisation : start |
| 157 | | KerMM initialisation done |
| 158 | | DVFS initialisation : start |
| 159 | | FAF: initialisation : start |
| 160 | | FAF: initialisation : done |
| 161 | | DVFS initialisation done |
| 162 | | KerIPC initialisation : start |
| 163 | | KerIPC initialisation done |
| 164 | | Proc initialisation: start |
| 165 | | Proc initialisation: done |
| 166 | | EPM initialisation: start |
| 167 | | EPM initialisation: done |
| 168 | | Init Kerrighed distributed services: done |
| 169 | | Kerrighed... loaded! |
| 170 | | TIPC: Established link <1.1.2:eth0-1.1.3:eth0> on network plane B |
| 171 | | Kerrighed is running on 2 nodes |
| 172 | | |
| 173 | | }}} |
| 174 | | [[BR]] |
| 175 | | === 5.3 Private Variables === |
| 176 | | * '''mmap''' (map pages of memory - by adding a MAP_LOCAL flag) |
| 177 | | * /kerrighed-2.3.0/libs/include/kerrighed_tools.h |
| 178 | | * /kerrighed-2.3.0/modules/tools/krg_services.h |
| 179 | | * /kerrighed-2.3.0/modules/mm/mman.h |
| 180 | | |
| 181 | | {{{ |
| 182 | | It is possible to ensure that memory will be allocated in the virtual address space of each thread of the process |
| 183 | | without linking it to a container, thus ensuring that no coherence will be maintained between the different copies of |
| 184 | | that memory segment across the different threads. |
| 185 | | }}} |
| 186 | | |
| 187 | | [[BR]] |
| 188 | | === 5.4 OpenMP on Kerrighed === |
| 189 | | * Standard '''Pthread''' library replaced by '''krgthread''' library proving the Posix interface on Kerrighed Clusters. |
| 190 | | * Containers to support shared variables in the cluster. |
| 191 | | * A thread using kerrighed synchronization primitives can migrate and be checkpointed at any time, and except when |
| 192 | | blocked in the OS. |