Progress report

hedgebornabaloneΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 3 χρόνια και 10 μήνες)

86 εμφανίσεις

Progress report

2012/05/01

匡建慈

Reminding


Goals : to build a multi
-
core platform with
Hadoop

environment



Base board & FPGA

& fiber ports

Tegra2

Application layer

Transaction layer

Physical Layer

Linux Device Driver

DMA in Tegra2

Router circuit in FPGA

Fiber link

User program

User API


What to do and what we have


What we have


Tegra2 software program co
-
work with FPGA to do simple work .


A circuit example with fiber communication



What to do


a example by combining examples we have to achieve a framework from
software , hardware , and fibers .


(
O

)


Example interface unified


Achieve API package


Interrupt mechanism


Porting
Hadoop

environment on proposed framework .

(
X

)


Combined example block diagram

DMA

TX_Buf

RX_Buf

TX_IF

RX_IF

GTP

BASE

Fiber link

Linux
Device
Driver

User
Prog
.

Circuit layer

Software

Driver

DMA
IF

Clk_wiz

clk_120m

BASE_CLK


API package


Global variable : device number , buffer pointer



init : open device , memory mapping


Finalize : close device , memory um
-
mapping .


FPGAWrite

: write
buf_w

into circuit layer by DMA


FPGARead

: Read data from circuit by DMA and store into
buf_r




header packet mechanism


In future , it
wiil

be applied on

APIs



Interrupt mechanism


Circuit layer :


pull up MEM_R/
W_Ready

to setup an interrupt to CPU


A interrupt means it’s ready for the next user read/write call


Driver layer


Driver code in original release might be got stuck due to
mutex

usage .


According to previous work on
MultiARM

, rewrite driver by a
kthread

interrupt handler and two
wait_events


25 ns

Result


2
-
node test


A single
SendRecv

program running on 2 nodes


Add a ‘!’

until the length is larger than specified value


Receiver

Sender

Next



Try to setup
Hadoop

environment on proposed framework .


Do on my laptop


Setup JAVA on
MaCube



Setup
Hadoop

environment on
MaCube


Modify the calling interface to my APIs

Progress report

2012/05/15

boy13

Last week


Completed


Setup programming model and achieve framework covered with software ,
hardware , GTPs .


Combining examples


API package


Interrupt mechanism



To do


Setup
Hadoop

on proposed framework


Setting
Hadoop

on this laptop



O


Setting JAVA Runtime Environment on
MaCube


O


Setting
Hadoop

environment on
MaCube


X


Modify calling interface by my APIs


X

Setting
Hadoop

on my laptop


Single node setting


Download
Hadoop

and
jdk

and extract them .


<
Hadoop

Path>/conf/hadoop_env.sh


Export JAVA_HOME=<
JdkPath
>


<
Hadoop

Path>/conf/core
-
site.xml


hadoop.tmp.dir

<a path to put /
tmp
>


fs.defailt.name

hdfs://localhost:9000


Dfs.replication

1


<
Hadoop

Path>/conf/mapred
-
site.xml


Mapred.job.tracker

localhost:9001






More on
http://changyy.pixnet.net/blog/post/25245658


Hadoop

example execution


HDFS format


<
Hadoop

Path>/bin/
hadoop

namenode

-
format


Start and stop


<
Hadoop

Path>/bin/start
-
all.sh


<
Hadoop

Path>/bin/stop
-
all.sh


HDFS operation


<
Hadoop

Path>/bin/
hadoop

dfs


mkdir

input


<
Hadoop

Path>/bin/
hadoop

dfs


ls


<
Hadoop

Path>/bin/
hadoop

dfs


put <
filepath
> input



Hadoop

example
wordcount

execution


<
Hadoop

Path>/bin/
hadoop

jar hadoop
-
0.20.1
-
examples.jar
wordcount

input output


See execution result


<
Hadoop

Path>/bin/
hadoop

dfs


cat output/*



Multi
-
node setting


Hosts


/etc/hosts : A table record machine name and its IP


/etc/hostname : machine name


ssh

connections


sudo

apt
-
get install
openssh
-
server


<
Hadoop

Path>/conf


slaves : machine name of data
-
nodes


masters : machine name of name
-
node


start
-
all.sh


After start
-
all.sh


<
Jdk

Path>/bin/
jps


<
Hadoop

Path>/bin/
hadoop

dfsadmin


report













More on :
http://changyy.pixnet.net/blog/post/25612440

Setting JAVA Runtime Environment


cp /media/sda1/ejre1.6.0_32.tar.gz ./


tar
-
xjf

ejre1.6.0_32.tar.gz


export PATH=/home/root/Desktop/ejre1.6.0_32/bin:$PATH



Next to do


Try to setup
Hadoop

environment on proposed framework .


Do on my laptop


Setup JAVA on
MaCube



Setup
Hadoop

environment on
MaCube


Modify the calling interface to my APIs


Progress report

2010/05/29

boy13

Recently


Goals : to build a multi
-
core system with
hadoop

environment



Work items


Setup programming model and achieve framework covered with software ,
hardware , GTPs .


Combining examples



O


API package




O


Interrupt mechanism



O


Router mechanism






Setup
Hadoop

on proposed framework


Setup up on my laptop



O


Setting JAVA Runtime Environment on
MaCube


O


Setting
Hadoop

environment on
MaCube





Router mechanism


A Light
-
Weight Parallel Router for FPGA
-
based Networks
-
on
-
Chip


Department of ECECS , University of Cincinnati, 2005

Application layer

Transaction layer

Physical Layer

Linux Device Driver

DMA in Tegra2

Router circuit in FPGA

Fiber link

User program

User API

Router mechanism


2
-
D mesh architecture



Routing mechanism


XY routing



Port


Input Channel


FIFO interface


Be requested from Output Channel of a port in another router


Request to X
-
bar switch to access Output Channel


Output Channel



Crossbar Switch


For out architecture


2
-
D mesh => 3
-
D mesh


Port => Local Port , Fiber Port


Local Port : interface for FPGA and DMA in tegra2


Fiber Port : interface for fiber link in proposed framework

Base board & FPGA

& fiber ports

Tegra2

Setting
hadoop

in proposed framework


Setting up
namenode


applet not found



What is applet ?


JRE
v.s
. Java Applet






By several weeks asking ,

I conclude that JAVA Applet isn’t supported in embedded JAVA .




Setting up
datanode

in
MaCube


Laptop plays
namenode

role in this work .



Setting
ssh

connection


Pre
-
requite :
openssl

,
zlib



Download source package


Extract it to local directory


./configure

help


./configure <options for cross compile>


Modify
makefile

manually if necessary


make && make install



Error occur when I key make install for
openssh


Source pack : 5.7 , 5.9


Toolchain

: arm
-
2009q3 , cc.2011.03


Next


Router mechanism


Complete design for Local port , Crossbar switch


Change local port with fiber port


Complete 2x2 2
-
D mesh architecture



Setup
hadoop

environment


Build
openssh

and setup connection


Try
datanode

start service



Progress report

2012/06/19

boy13

Recently


Goals : to build a multi
-
core system
without

hadoop

environment



Work items


Setup programming model and achieve framework covered with software ,
hardware , GTPs .


Combining examples



O


API package




O


Interrupt mechanism



O


Router mechanism




O


Multi
-
core system


Setup
Hadoop

on proposed framework


Setup up on my laptop



O


Setting JAVA Runtime Environment on
MaCube


O


Setting
Hadoop

environment on
MaCube


X


Namenode

software service



Router mechanism


Router


Input Channel , Output Channel


Input Request mechanism , Round
-
Robin Arbitrator


Parallel Router by cross
-
bar switch



Testing pattern


Local port




O


Local port + Router



O


Local port + Router + 1 fiber port


O


Local port + Router + 4 fiber port


O



DMA

Local port

Router

East port

West port

GTP_J4

North port

South port

GTP_J5

id

Multi
-
core system


So far , only 1
-
1 send
-
recv

pairs , and no packet overlapping occur .


Read mechanism in driver should be designed


When read interrupt comes


configure DMA and put data into a buffer


Wakeup
kthread

(interrupt handler)


Kthread


Put data in buffer in a list kept in driver


Read call


Search list in driver


If found , copy data into read buffer API allocated


Otherwise , sleep


Re
-
check circuit design


Whether data not sent but be replaced or not


Buffer empty register

Setting
hadoop

environment


Hadoop

setting


Download
hadoop

source and JRE into
MaCube


Modify <
hadoop

path>/conf/ * .xml


Build
ssh

connection


./start
-
all.sh


./bin/
hadoop

<execution commands>



2 use
-
case


MaCube

play both
namenode

and
datanode

roles


MaCube

plays
datanode

role and laptop/PC act as
namenode


Problem encountered for both
datanode

and
namenode

role


bash : no such file or directory


What is bash ?


ln


s /bin/
sh

/bin/bash


bash : applet not found



By several weeks
googling

and asking , I conclude that JAVA
Applet isn’t supported in embedded JAVA .


Taiwan
Hadoop

Forum


http://hadoop.nchc.org.tw/phpbb/index.php?sid=021ae10a0e0609ab818b
3e7062aaa314


Embedded JAVA , no bash => no applet =>
hadoop

can’t be built .



So ……


Namenode

software service


Motivation :
hadoop

is not friendly with embedded system .



We build a simple software service of cloud system


A simple service to submit job


Package source code , data , and execution arguments


cross
-
compile source code


Send package to
datanode

scheduled


Result returned


Graphics user interface and it’s easy to use.


Embedded JAVA !!


New thread and system call to execute program received


Simple distributed file system


Connect with student of Prof.
Shiao

To do


achieve multi
-
core system hardware framework


Complete read mechanism


Put fiber port from 4 to 6



Design
namenode

software service


A quick job submit flow


Easy to use and graphical

Progress report

2012/07/10

boy13

Recently


Goals : to build a multi
-
core system



Work items


Setup programming model and achieve framework covered with software ,
hardware , GTPs .


Combining examples



O


API package




O


Interrupt mechanism



O


Router mechanism




O


Multi
-
core system


Setup
Hadoop

on proposed framework


Setup up on my laptop



O


Setting JAVA Runtime Environment on
MaCube


O


Setting
Hadoop

environment on
MaCube


X


Namenode

software service


Demo items


Multi
-
core system


Transportation testing


X
-
axis transportation


Y
-
axis transportation


2
-
D mesh transportation




0

1

2

3

0

1

2

3


Multi
-
core system


Serial transportation


Motivation : sometimes a byte data shift


Multi
-
core system


Serial transportation problem


Reference clock skewing



Solutions :


Sink : make the initiator and target correct the timing when initial the
transaction


Re
-
send : if data check is error by some mechanism , then request initiator
to resend



The author of GTP_EXAMPLE says , it’s locked when the first sink , and
can’t be unlocked .


=> only can try re
-
send method .




Method thinking


do something when error has checked at the first time .



Ack
/
Nak

mechanism .


Deadlock possible ?



TX_IF

RX_IF

GTP

CORE

TX_IF

RX_IF

GTP

CORE


Namenode

software service


TCP communication


Try : a simple chat room program


Shell program



Server

Initial socket

Listen client

Create thread to message passing

Create receive thread

Message
recv

Take
mutex

and queue it

Check queue is empty

Take
mutex

,
pop queue ,

Socket send


Client

Initial socket

Get connection

Create thread to
recv

chat

Socket
recv

Print


Demo items


Demo item 1 :


Using Ethernet to do Map
-
Reduce or SPCP




Demo item 2 (possible) :


Using Ethernet to transport program and data


Using fiber to communication with components

1

2

3

4

5

6

7

8

Progress report

2012/08/01

Recently


Goals : to build a multi
-
core system



Work items


Setup programming model and achieve framework covered with software ,
hardware , GTPs .


Combining examples



O


API package




O


Interrupt mechanism



O


Router mechanism




O


Multi
-
core system


Setup
Hadoop

on proposed framework


Setup up on my laptop



O


Setting JAVA Runtime Environment on
MaCube


O


Setting
Hadoop

environment on
MaCube


X


Namenode

software service


Demo items

Recently


Transport testing



Middle
-
ware implementation



Demo items implementation


Transport testing


2
-
D mesh architecture



X_test


0,1

OK


4,5

X
-
> OK


Y_test


0,4

X
-
> OK


1,5

X
-
> OK


Synchronous problem occurred frequently .

0,0(0)

1,0(1)

1,0(4)

1,1(5)

Middle
-
ware implementation


Shell program(JAVA) , TCP Agent(C++) , TCP Core(C++)


connection built OK , but
no data received


JAVA object serialization


It’s OK to ping
Macube

from
Vmware

, but it doesn’t work to ping
Vmware

from
Macube


Double
-
system laptop



Viewing SPCP sources




=> porting SPCP onto
Macube


Cross
-
compile core program and takes related files


Possible problem : speed gap between PC and
Macube



Demo item implementation


Item 1 : porting SPCP



Item 2 : simple puzzle (possible)


Ethernet version


Packet size , header configuration


no puzzle change , 2 cores on PC , 4 cores on
Macubes


Speed gap




1

2

3

4

5

JAVA UI

Upload

System call and wait

Server

Core

Core

Core

Core

TCP/IP connection


Item 2 : simple puzzle (possible)


Fiber version


Serial transport synchronous problem


Re
-
send , Sync at transport initial


re
-
send mechanism



1

2

3

4

5

TX_send

RX get
Ack

timeout

done

Re
-
send

RX_recv

CRC_error

= 1

discard

Send
ack

packet

TX_sendAck

RX_getAck

CRC_error

= 1

discard

Thanks for your attention !