Entries from 2008-05-22 to 1 day

mmap で読み込み、ファイル I/O で書き込み

念のためテストコードを書いて確認。ちゃんと動く。 #include <assert.h> #include <fcntl.h> #include <stdio.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/uio.h> #include <unistd.h> int main(int argc, char **argv) { int fd, i; int *map; char buf[16]; fd = open("/tmp/mmap_pwrite.tmp", O_RDWR | O_CREAT </unistd.h></sys/uio.h></sys/types.h></sys/mman.h></stdio.h></fcntl.h></assert.h>…

今日の Q4M

read を並走可能にしようといじっていたら、concurrency は上がったけどスループットは落ちたorz

Q4M の concurrency 改善計画

read の MT 化は、ほぼ完了 各スレッドに owned_row を割り付ければ、owner mode の場合に rnd_next 内での mutex 獲得を不要にできるはず 次は read の mmap 化 pread が不要になることにより、不可避のボトルネックであるキュー割り付けコード (assign_own…