2017年5月24日 星期三

bcache

Q:

  1. 大block_size writethrough?
  2. fio IOPS with writeback going -> 40k ~ 50k, initialized cache 50k, used cache 40k
  3. after trigger_gc, cache_available don't get larger. --> pin: 0, mark: 1(dirty)

code flow:

  • writeback:
    • request_write -> bch_writeback_add -> bch_writeback_queue -> refill_dirty -> read_dirty -> read_dirty_submit -> write_dirty -> write_dirty_finish
  • write_dirty_finish:
    • bch_btree_insert
      • bch_btree_insert_recurse
        • __bkey_put(b->c, insert); // set pin to 0

2017年5月21日 星期日

pr_debug

enable pr_debug in bcache
  1. mount -t debugfs /mnt/debugfs/ if debugfs is not mounted in /sys/kernel/debug/
  2. echo 'file btree.c line 2349 +p' > /mnt/debugfs/dynamic_debug/control #show pr_debug in btree.c line 2349
  3. echo 'module bcache +p' > /mnt/debugfs/dynamic_debug/control #show all pr_debug in bcache
  4. "grep bch_btree_refill_keybuf /var/log/debug" or "dmesg|grep bch_btree_refill_keybuf"

2017年5月20日 星期六

screen to tmux

.tmux.conf:
unbind C-b
set -g prefix C-g
bind C-g last-window

set-option -g allow-rename off

-- hotkey of tmux --
ctrl-g l: last-windows
tmux attach: attach to existing session

kgdb

--0313-- ken 不好意思 请教一下 之前你有交过我 在没有coredump的情况下 可以用gdb直接载入ko.debug, 然后dis -l register_bcache, 我记得使用方式是不是这样, 不过我现在dis -l出现错误^^" [root@...