Jia-Jun Yeh

@xnum

Joined on Jul 14, 2017

  • 好像... As if/though Tina seems as if she had finished the homework, but we know she didn't bring it home. 在因果關係中 點出某個事實 並做出推斷/後果 Since As Now that Seeing that
     Like  Bookmark
  • 無分類 高效能取向kernel boot args Lockfree 相關文章 RCU 低延遲 相關文章
     Like  Bookmark
  • 趁著openwrt推出了新版本23.05,最近也開始學習如何使用cloudflare,把服務做了一次整理。先前的服務大致上有: Blog: GitHub Pages (jekyll)Staging (jekyll build, static files) resume: GitHub Pages (static files) WireGuard: 使用openwrt上的luci設定 並使用Let's encrypt取得TLS憑證。而先前的網域xnum.tw快到期了,順便換成xnum.in。
     Like  Bookmark
  • https://github.com/pacificplusplus/conference/blob/master/slides-2017/Low Latency C%2B%2B for Fun and Profit/slides.pdf 重點 remove branch template-based configuration memory alloc (pooling) exceptionalmost zero-cost if not throw avoid multi threading
     Like  Bookmark
  • RCU的重點是:一個物件如果是read-only的,那就可以安全地被多個執行緒同時讀取,且reader沒有overhead。當該物件需要被修改時,就需要複製一份並對其進行修改,並用新的物件位址替換舊的。然而缺點是writer需要回收舊的物件,就需要等待所有reader結束讀取。另外多個writer的情況下也需要協調寫入權。 釋放舊物件的工作會交由writer來執行。首先writer保存舊物件,並寫入新物件,接著等待所有reader進入一次靜默期(grace period)。就代表已經沒有人會再讀取到舊的物件,這時候writer就可以釋放了。 也因此觀測所有reader都進入grace period就是實作的重點。在kernel實作時的關鍵是context switch。進入critical section時關掉中斷,離開時啟用中斷。這樣的話當每個CPU都進行過一次context switch,就代表他們已經經過一次grace period。 userspace qsbr 在userspace執行時,由於執行到一半有可能被中斷,因此我們需要引入其他做法。qsbr是一種侵入式做法,需要對原有的程式碼進行改動,但overhead是最低的。 首先每個thread註冊一次並維護一個local version number,當reader讀取時讀取global version number更新到自己身上
     Like  Bookmark
  • GRUB_CMDLINE_LINUX="isolcpus=2-5 nohz_full=2-5 rcu_nocbs=2-5 audit=0 mce=ignore_ce tsc=reliable idle=poll processor.max_cstate=0 intel_pstate=disable intel_idle.max_cstate=0 pcie_aspm.policy=performance cpuidle.off=1 cpufreq.off=1 mitigations=off nosoftlockup rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet” GRUB_CMDLINE_LINUX="isolcpus=2-7 nohz_full=2-7 rcu_nocbs=2-7 audit=0 mce=ignore_ce tsc=reliable idle=poll processor.max_cstate=0 intel_pstate=disable intel_idle.max_cstate=0 pcie_aspm.policy=performance cpuidle.off=1 cpufreq.off=1 mitigations=off nosoftlockup" GRUB_CMDLINE_LINUX="audit=0 mce=ignore_ce tsc=reliable idle=poll processor.max_cstate=0 intel_pstate=disable intel_idle.max_cstate=0 pcie_aspm.policy=performance cpuidle.off=1 cpufreq.off=1 mitigations=off nosoftlockup"
     Like  Bookmark
  • 理論 什麼是執行緒安全問題 (Thread Safety) 多個執行緒可以安全的存取共享資源 避免deadlock resource leak race condition 換句話說就是在解決競爭問題 處理執行緒安全問題的幾個方法
     Like  Bookmark
  • About Speaker 葉家郡 / xnum@GitHub 天鏡科技 - Vice President of Engineering COBINHOOD - Backend developer jun.yeh@skymirror.com.tw 什麼是monorepo image alt
     Like  Bookmark
  • the clean arch 外圈程式的修改不應該影響內圈 藉由DI讓依賴的方向總是由外往內走 (外圈 import 內圈 package) 可以根據狀況加減層數和職責 例如:從Yahoo抓資料變成從Google抓資料,結果資料格式變了,修改格式以後所有用到的地方都需要跟著修正 => 不管從哪裡抓資料,都應該轉成一個統一的格式回傳,並要求不同的資料源抓取實作要擁有相同的interface。 package pubfinance // x, data struct is different for every api
     Like  Bookmark