comparison slides/2018/05/29/zip.txt @ 52:73b27e5c1d79 default tip

auto-Update generated slides by script
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 16 Apr 2019 18:58:24 +0900
parents f5dac10540d7
children
comparison
equal deleted inserted replaced
51:5f949b153f65 52:73b27e5c1d79
1 2018-05-22----
2 # Approximateネットワークに対する速性と計算精度の最適化基盤
3
4 - 2000年くらいから計算機は高速化を考えてきたが,クロックや消費電力などの問題があった
5 - そろそろこのトレードオフだけでは辛くなってきた
6
7 - ムーア時代
8 - 性能/電力効率を探求
9 - 厳密さ
10 - 数の丸め誤差
11 - 複数の出力が解となるアプリ ==> Perfect Executionは不要
12 - ニューラルネットワークをアナログ演算回路で実現している
13
14 - 昨今
15 - 不真面目な計算機*真面目なネットワーク
16 - データ通信帯域が増加するにつれてエラー訂正がレイテンシを低下させてしまう
17 - Approximate Network
18 - 帯域10倍
19 - 遅延増えない
20 - エラー放置
21 - アプリによってビット誤りの許容が異なる
22 - ビットの保護する場所が変動する
23 - 保護するビットをマスクしてあげることで,エラーを考慮しない部分と見ていく
24 - 正しくない実行結果が出力されるパターンの近くを探索しない
25
26 - OpenTunerによる探索空間を定義している
27
28
29
30 # 大規模ソフトウェアにおけるコンパイル時間の定量的分析と高速化手法の提案
31
32 - 90%以上がコンパイラで締められている
33 - edit-compile-testのサイクルで開発を行っているので厳しい
34 - Incrementaal BuilDing
35 - GNU Make
36 - Ninja
37 - CMake
38 - ccache
39 - key-value-storeで管理している
40 - WebKit
41 - ほぼ毎日大規模ファイルをコンパイルする必要が出てきている
42 - コンパイラ単体のスループットを上げる必要がある
43 - 同一ヘッダーファイルのコンパイルが2千件行われている
44 - 再利用時には一貫性が保たれている必要がある
45 - Hello Worldのコンパイルが最大8.7倍
46
47 => もともと並列性の高いものをターゲットにした場合
48 --> オーバーヘッドを考える事はあまり無いのではないのか
49
50 # Christie
51
52 - ファイルシステムの問題点
53 - 型がない
54 - トランザクションが提供されてない
55 - SQLですら厳しい
56 - 分散環境でアクセス方式が定まってない
57 - Christie
58 - Linda
59 - Christieの
60
61 - ファイルシステムの型
62 - 不整合時にどうするかの処理を付けないといけない
63 - annotationを使ったput/takeのもの
64
65 - unixファイルシステムは木構造の名前管理構造を持っている
66 - ファイル自体もi-nodeを使った木構造が導入されている
67 - トランザクションの失敗の扱いを上手い具合にする
68
69
70
71
72 - メモリ自信のハードエラーは提案論文が少ない
73
74 # カーネル内部データのプロセス間分離による堅牢性の向上
75
76 ## Kernel Failure
77
78 - エラー伝搬が発生するとKernel Failureを引き起こす可能性がある
79 - プロセスコンテキストに閉じて発生する
80 - プロセスローカルデータ(単一のプロセスコンテキストで使用されるデータ)
81 - カーネル内で共有するデータにエラーが伝搬した場合修復が難しい
82 - プロセスを強制終了させることでプログセスコンテキストを切り離す事ができる
83 - Software failer
84 - 'プロセスローカルエラー'
85
86
87 # 耐ビザンチン障害性を持つ分散合意手法の調査
88
89 - 決済システムなどでブロックチェーン技術が利用されている
90 - PoW
91 - PBFT ( Practical Byzantine Fault Tol)
92 - http://pmg.csail.mit.edu/papers/osdi99.pdf
93 - "スループット"
94 - rsocketをもちいた場合
95
96 [[Perl6]]
97
98 * 具体的に遅い箇所を計測した方がいい
99 * どうやって計測を図るか
100 * コンパイラ構成論の資料を読んでオブジェクトパターンを理解しておく
101
102 - Key Value Store
103
104
105 ----------
106 2018-05-25----
107 Perl6
108
109 - [助成金貰って高速化](http://news.perlfoundation.org/2017/11/perl-6-performance-and-reliabi-4.html)
110 - インライン展開周り
111 - インラインclosureが実装された
112 - dead codeを削除
113
114 ----------
115 2018-05-26----
116
117 marking
118 - distributed snapshot
119
120 ----------
121 2018-05-27----
122 - trap_swi
123 - システムコール
124
125
126 ----------
127 2018-05-28----
128 マシンを変えたからgccでコンパイルしようとすると厳しい
129
130
131 compiling 3rdparty/libuv/src/unix/fsevents.o
132 compiling 3rdparty/libuv/src/unix/timer.o
133 compiling 3rdparty/libuv/src/unix/tty.o
134 compiling 3rdparty/libuv/src/unix/udp.o
135 /Users/anatofuz/.plenv/versions/5.24.4/bin/perl5.24.4 build/mk-moar-pc.pl pkgconfig/moar.pc
136 In file included from /System/Library/Frameworks/Security.framework/Headers/AuthSession.h:32,
137 from /System/Library/Frameworks/Security.framework/Headers/Security.h:43,
138 from /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/CSIdentity.h:43,
139 from /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OSServices.h:27,
140 from /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/IconsCore.h:23,
141 from /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LaunchServices.h:22,
142 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:39,
143 from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:23,
144 from 3rdparty/libuv/src/unix/darwin-proctitle.c:33:
145 /System/Library/Frameworks/Security.framework/Headers/Authorization.h:193:7: error: variably modified 'bytes' at file scope
146 char bytes[kAuthorizationExternalFormLength];
147 ^~~~~
148 In file included from /System/Library/Frameworks/Security.framework/Headers/AuthSession.h:32,
149 from /System/Library/Frameworks/Security.framework/Headers/Security.h:43,
150 from /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/CSIdentity.h:43,
151 from /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OSServices.h:27,
152 from /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/IconsCore.h:23,
153 from /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LaunchServices.h:22,
154 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:39,
155 from 3rdparty/libuv/src/unix/fsevents.c:49:
156 /System/Library/Frameworks/Security.framework/Headers/Authorization.h:193:7: error: variably modified 'bytes' at file scope
157 char bytes[kAuthorizationExternalFormLength];
158 ^~~~~
159 In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:21,
160 from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9,
161 from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11,
162 from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35,
163 from 3rdparty/libuv/src/unix/darwin-proctitle.c:33:
164 /System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:391:15: error: expected identifier or '(' before '^' token
165 typedef void (^CGPathApplyBlock)(const CGPathElement * element);
166 ^
167 /System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:393:53: error: unknown type name 'CGPathApplyBlock'
168 CG_EXTERN void CGPathApplyWithBlock(CGPathRef path, CGPathApplyBlock CF_NOESCAPE block)
169 ^~~~~~~~~~~~~~~~
170 make: *** [3rdparty/libuv/src/unix/fsevents.o] Error 1
171 make: *** Waiting for unfinished jobs....
172 make: *** [3rdparty/libuv/src/unix/darwin-proctitle.o] Error 1
173
174 ----------
175 2018-05-29----
176 ❯ lldb -- /Users/anatofuz/workspace/cr/Basic/build_perl6/bin/moar nqp.moarvm examples/hello_world.nqp [13:52:54]
177 (lldb) target create "/Users/anatofuz/workspace/cr/Basic/build_perl6/bin/moar"
178 Current executable set to '/Users/anatofuz/workspace/cr/Basic/build_perl6/bin/moar' (x86_64).
179 (lldb) settings set -- target.run-args "nqp.moarvm" "examples/hello_world.nqp"
180 (lldb) b add_bb_facts
181 Breakpoint 1: where = libmoar.dylib`add_bb_facts + 32 at facts.c:362, address = 0x0000000000118540
182 (lldb) c
183 error: invalid process
184 (lldb) run
185 Process 8479 launched: '/Users/anatofuz/workspace/cr/Basic/build_perl6/bin/moar' (x86_64)
186 Process 8479 stopped
187 * thread #2, stop reason = breakpoint 1.1
188 frame #0: 0x00000001001bb540 libmoar.dylib`add_bb_facts(tc=0x0000000100802e30, g=0x0000000100f4efe0, bb=0x0000000102115e00, p=0x0000000100f514d0, cur_deopt_idx=-1) at facts.c:362
189 359 MVMint32 i, is_phi;
190 360
191 361 /* Look for instructions that provide or propagate facts. */
192 -> 362 MVMSpeshIns *ins = bb->first_ins;
193 363 while (ins) {
194 364 /* See if there's deopt and logged annotations. Sync cur_deopt_idx
195 365 * and, for logged+deopt-one, add logged facts and guards. */
196 Target 0: (moar) stopped.
197 (lldb) bt
198 * thread #2, stop reason = breakpoint 1.1
199 * frame #0: 0x00000001001bb540 libmoar.dylib`add_bb_facts(tc=0x0000000100802e30, g=0x0000000100f4efe0, bb=0x0000000102115e00, p=0x0000000100f514d0, cur_deopt_idx=-1) at facts.c:362
200 frame #1: 0x00000001001bb503 libmoar.dylib`MVM_spesh_facts_discover(tc=0x0000000100802e30, g=0x0000000100f4efe0, p=0x0000000100f514d0) at facts.c:659
201 frame #2: 0x00000001001b4eb7 libmoar.dylib`MVM_spesh_candidate_add(tc=0x0000000100802e30, p=0x0000000100f514d0) at candidate.c:61
202 frame #3: 0x00000001001cf991 libmoar.dylib`worker(tc=0x0000000100802e30, callsite=0x00000001006c9150, args=0x0000000000000000) at worker.c:16
203 frame #4: 0x000000010014e8e2 libmoar.dylib`invoke_handler(tc=0x0000000100802e30, invokee=0x0000000102014840, callsite=0x00000001006c9150, args=0x0000000000000000) at MVMCFunction.c:9
204 frame #5: 0x00000001000e8494 libmoar.dylib`thread_initial_invoke(tc=0x0000000100802e30, data=0x0000000100802050) at threads.c:59
205 frame #6: 0x00000001000aefee libmoar.dylib`MVM_interp_run(tc=0x0000000100802e30, initial_invoke=(libmoar.dylib`thread_initial_invoke at threads.c:50), invoke_data=0x0000000100802050) at interp.c:93
206 frame #7: 0x00000001000e7a35 libmoar.dylib`start_thread(data=0x0000000100802050) at threads.c:87
207 frame #8: 0x00007fff7b9fe661 libsystem_pthread.dylib`_pthread_body + 340
208 frame #9: 0x00007fff7b9fe50d libsystem_pthread.dylib`_pthread_start + 377
209 frame #10: 0x00007fff7b9fdbf9 libsystem_pthread.dylib`thread_start + 13
210
211 (lldb) n
212 Process 8479 stopped
213 * thread #2, stop reason = step over
214 frame #0: 0x00000001001bb579 libmoar.dylib`add_bb_facts(tc=0x0000000100802e30, g=0x0000000100f4efe0, bb=0x0000000102115e00, p=0x0000000100f514d0, cur_deopt_idx=-1) at facts.c:370
215 367 MVMSpeshAnn *ann_deopt_one = NULL;
216 368 MVMSpeshAnn *ann_logged = NULL;
217 369 MVMint32 is_deopt_ins = 0;
218 -> 370 while (ann) {
219 371 switch (ann->type) {
220 372 case MVM_SPESH_ANN_DEOPT_ONE_INS:
221 373 ann_deopt_one = ann;
222 Target 0: (moar) stopped.
223 (lldb)
224 Process 8479 stopped
225 * thread #2, stop reason = step over
226 frame #0: 0x00000001001bb620 libmoar.dylib`add_bb_facts(tc=0x0000000100802e30, g=0x0000000100f4efe0, bb=0x0000000102115e00, p=0x0000000100f514d0, cur_deopt_idx=-1) at facts.c:385
227 382 }
228 383 ann = ann->next;
229 384 }
230 -> 385 if (ann_deopt_one && ann_logged)
231 386 log_facts(tc, g, bb, ins, p, ann_deopt_one, ann_logged);
232 387
233 388 /* Look through operands for reads and writes. */
234 Target 0: (moar) stopped.
235 (lldb) l
236 389 is_phi = ins->info->opcode == MVM_SSA_PHI;
237 390 for (i = 0; i < ins->info->num_operands; i++) {
238 391 /* Reads need usage tracking; if the read is after a deopt point
239 392 * relative to the write then give it an extra usage bump. */
240 393 if ((is_phi && i > 0)
241 394 || (!is_phi && (ins->info->operands[i] & MVM_operand_rw_mask) == MVM_operand_read_reg)) {
242 395 MVMSpeshFacts *facts = &(g->facts[ins->operands[i].reg.orig][ins->operands[i].reg.i]);
243 (lldb) l
244 396 facts->usages += facts->deopt_idx == cur_deopt_idx ? 1 : 2;
245 397 }
246 398
247 399 /* Writes need the current deopt index and the writing instruction
248 400 * to be specified. A write that's on a deopt instruction bumps
249 401 * the usage too. */
250 402 if ((is_phi && i == 0)
251 (lldb) n
252 Process 8479 stopped
253 * thread #2, stop reason = step over
254 frame #0: 0x00000001001bb65b libmoar.dylib`add_bb_facts(tc=0x0000000100802e30, g=0x0000000100f4efe0, bb=0x0000000102115e00, p=0x0000000100f514d0, cur_deopt_idx=-1) at facts.c:389
255 386 log_facts(tc, g, bb, ins, p, ann_deopt_one, ann_logged);
256 387
257 388 /* Look through operands for reads and writes. */
258 -> 389 is_phi = ins->info->opcode == MVM_SSA_PHI;
259 390 for (i = 0; i < ins->info->num_operands; i++) {
260 391 /* Reads need usage tracking; if the read is after a deopt point
261 392 * relative to the write then give it an extra usage bump. */
262 Target 0: (moar) stopped.
263 (lldb) p MVM_SSA_PHI
264 error: use of undeclared identifier 'MVM_SSA_PHI'
265 (lldb) nexr
266 error: 'nexr' is not a valid command.
267 error: Unrecognized command 'nexr'.
268 (lldb) n
269 Process 8479 stopped
270 * thread #2, stop reason = step over
271 frame #0: 0x00000001001bb677 libmoar.dylib`add_bb_facts(tc=0x0000000100802e30, g=0x0000000100f4efe0, bb=0x0000000102115e00, p=0x0000000100f514d0, cur_deopt_idx=-1) at facts.c:390
272 387
273 388 /* Look through operands for reads and writes. */
274 389 is_phi = ins->info->opcode == MVM_SSA_PHI;
275 -> 390 for (i = 0; i < ins->info->num_operands; i++) {
276 391 /* Reads need usage tracking; if the read is after a deopt point
277 392 * relative to the write then give it an extra usage bump. */
278 393 if ((is_phi && i > 0)
279 Target 0: (moar) stopped.
280 (lldb) p is_phi
281 (MVMint32) $14 = 0
282 (lldb) p ins
283 (MVMSpeshIns *) $15 = 0x0000000102115e60
284 (lldb) p *ins
285 (MVMSpeshIns) $16 = {
286 info = 0x00000001005757c0
287 operands = 0x0000000000000000
288 prev = 0x0000000000000000
289 next = 0x0000000000000000
290 annotations = 0x0000000000000000
291 }
292 (lldb) p *ins->info
293 (MVMOpInfo) $17 = {
294 opcode = 0
295 name = 0x00000001002def92 "no_op"
296 mark = {
297 [0] = ' '
298 [1] = ' '
299 }
300 num_operands = 0
301 pure = '\0'
302 deopt_point = '\0'
303 logged = '\0'
304 no_inline = '\0'
305 jittivity = '\0'
306 uses_hll = '\0'
307 operands = ([0] = '\0', [1] = '\0', [2] = '\0', [3] = '\0', [4] = '\0', [5] = '\0', [6] = '\0', [7] = '\0')
308 }
309
310
311 ----------