워크큐

포스트: 40
Tags

Posts

40 posts

[Kernel][Workqueue] flush_work(), 배리어 워크(barrier_work, wq_barrier)

Guillermo Austin Kim|2018년 8월 13일

barrier work에 대해서 알아보겠습니다. flush_work 함수는 두 가지 상황에서 쓰입니다. 두 가지 경우에 barrier work가 어떻게 쓰이는지 알아볼게요. 1. 현재 다른 워커 쓰레드에서 동일한 워크가 실행 중에 동일한 work을 flush한 경우 -386 [001] ...1 143.380287: workqueue_execute_start: work struct e880e910: function sdhci_pm_qos_cpu_unvote_work//... mmc-cmdqd/0-339 [000] ...1 143.381065: flush_work

[Kernel][Crash] 워크큐(workqueue) 락업(3) at [0321]

Guillermo Austin Kim|2018년 4월 17일

[Kernel][Crash] 워크큐(workqueue) 락업(1) at [0321] [Kernel][Crash] 워크큐(workqueue) 락업(2) at [0321] 코어 덤프에서 계속... worker_pool_idr 전역 변수에 접근하면 (*(worker_pool_idr.top)).ary 각 CPU별 워커풀 인스턴스가 있다고 했죠. (static struct idr) worker_pool_idr = ( (struct idr_layer *) hint = 0xFFFFFFC6307B9308, (struct idr_layer *) top = 0xFFFFFFC6307B9308 -> ( (int) prefix = 0x0, (int) layer = 0x0, (stru

[Kernel][Crash] 워크큐(workqueue) 락업(2) at [0321]

Guillermo Austin Kim|2018년 4월 16일

[Kernel][Crash] 워크큐(workqueue) 락업(1) at [0321] http://rousalome.egloos.com/9974388코어 덤프에서 계속... 자 여기까지 커널 크래시가 발행한 원인까지 확인했습니다.그럼 CPU2에 워커풀에서 등록된 워커쓰레드를 살펴봐야 겠습니다. 워커쓰레드들은 워커 풀에 등록할 때 struct worker_pool.workers 멤버 링크드 리스트로 등록합니다.1 (struct worker_pool *) (struct worker_pool*)0xFFFFFFC63A339000 = 0xFFFFFFC63A339000 -> (2 (spinlock_t) lock = ((struct raw_spinlock) rlock = ((arch_spinlock_t)

[Linux][Kernel] ftrace - Workqueue 워크큐 로그 분석 - 1

Guillermo Austin Kim|2017년 12월 13일

리눅스 커널의 매우 중요한 Subsystem인 워크큐. 이번에는 잠깐 ftrace 로그에서 workqueue에 대해 분석을 해보려고 해요.ftrace 세팅은 Appendix [1]을 참고하시구요. 아래 로그는 보자마자 느낄 수 있는 건 irq/225-touch-279란 irq_thread에서 워크 큐를 큐잉하고 이 후 워크큐가 실행된다는 걸 알 수 있죠. irq/225-touch-279 [006] 53516.537609: workqueue_queue_work: work struct=0xed845d58 function=touch_update_work workqueue=0xed80cc00 req_cpu=8 cpu=6 //<<--[1] irq/225-touch-279 [006] 53