changeset 32:07176dd2dddc

add 03rd.txt
author Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
date Mon, 03 Feb 2014 20:35:58 +0900
parents 5c7d17c36564
children 37d843c14923
files 2014/February/memo/03rd.txt 2014/OUTLINE
diffstat 2 files changed, 21 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/2014/February/memo/03rd.txt	Mon Feb 03 17:47:55 2014 +0900
+++ b/2014/February/memo/03rd.txt	Mon Feb 03 20:35:58 2014 +0900
@@ -1,17 +1,20 @@
-2014/02/01 (Sat)
+2014/02/03 (Mon)
     [program]
-        [昨日]
-        2GB 以上を取ろうとすると
-            regex(19797,0x7fff75dad310) malloc: *** mach_vm_map(size=18446744071569698816) failed (error code=3)
-            *** error: can't allocate region
-            *** set a breakpoint in malloc_error_break to debug
-            Can't allocate memory
+        とりあえず、manager->allocate の内部実装を int -> long long に変更した。
+        regex_mas 2GB 以上の file を読み込ますと、mmap と divide read の違いで結果が違ってしまう。 -> 多分、ちゃんと読み込みされていないのでは??
+
+        grep -c "doing" 2g.txt  -> 5209072
+        ./regex -file 2g.txt -sw doing -cpu 4      -> 5209072
+        ./regex -file 2g.txt -sw doing -cpu 4 -dr  -> 5190577
 
-        もしかして、allocate sizeに限界がある??
-        [改善]
-         TaskManager/kernel/ppe/TaskManager.cc
-         TaskManager/kernel/ppe/TaskManager.h
-         TaskManager/kernel/ppe/TaskManagerImpl.h
+        ./regex -file 3g.txt -sw doing -cpu 4      -> 7799680
+        ./regex -file 3g.txt -sw doing -cpu 4 -dr  -> 5190577
+
+        やっぱり 2GB の壁くさい
 
-         size が int 型だったので、それをlong long に変更。
-         (push は確認してから)
+        segmentation fault が起こらないということは、ちゃんと allocate はされているっぽい。
+        ということは、やはり read 関係のどこかで 2GB 制限がかかってるのではないか。
+        (API を int -> long long にかえないといけない部分がまだ存在すると思われる。
+
+        divide read mode 時、wbuf の address の動きが怪しい
+        long だと MAX が約2GB。つまりどこかで long long にしないとこれは直らない。
--- a/2014/OUTLINE	Mon Feb 03 17:47:55 2014 +0900
+++ b/2014/OUTLINE	Mon Feb 03 20:35:58 2014 +0900
@@ -1,3 +1,7 @@
+2014/02/02 (Sun)
+    [memo]
+        wbuf の address が 2GB 程度でおかしい挙動をする。それの調査。
+
 2014/02/02 (Sun)
     [memo]
          manager->allocate まわりの修正