재밌는 기사가 있어서 가져왔습니다.
리누스 토발즈 멀티코어 환경에서 컴파일 타임을 줄이기 위한 패치를 만들어
Linus Torvalds Just Made A Big Optimization To Help Code Compilation Times On Big CPUs
https://www.phoronix.com/scan.php?page=news_item&px=Linux-Pipe-Parallel-Job-Opt
PIPE에 fix가 있는것 같습니다. 지금은 GNU Make job들이 멀티코어에서 한개 writer가 여러개 reader를 깨우는 비효율적인 문제가 있었나본데 그것을 수정했다는 이야기 인듯.(말인지 방구인지 저는 잘 몰라서 코드는 안보고 영어만 해석했습니다. T.T)
이 패치결과 context switch가 11M에서 1.2M 으로 90%까지 줄었다고 하네요.
>this patch caused the number of context switches on the test program to drop from 11 million to just 1.2 million.
가장 많은 코어/스레드를 지원하는 AMD Threadripper의 경우 어마어마한 속도향상이 있겠네요.
AMD Threadripper 3990X 64-core / 128-thread CPU
잘못된 형식의 이미지 링크입니다.
이 패치 링크,
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ddad21d3e99c743a3aa473121dc5561679e26bb
This makes the pipe code use separate wait-queues and exclusive waiting
for readers and writers, avoiding a nasty thundering herd problem when
there are lots of readers waiting for data on a pipe (or, less commonly,
lots of writers waiting for a pipe to have space).
앞으로 HPE desktop은 32 core는 저렴한 버전 64 core가 대중화 되고 96 core를 잠시 거쳐 128 core까지 가겠지요?
기대됩니다. 클리앙 풀옵으로 돌리는 그 날이~
좋네요
본문의 내용을 와이프에게 설명하면 3990X 구입을 윤허하겠지요?
어림도 없지 ㅋㅋ
리눅스에 저런 식의 최적화를 할 거리가 남아있다는게 흥미롭네용 ㅎㅎ
아 커널 소스 공부해서 함 기여할 거리 찾는건 힘들겠죠? ㅠ
원글링크에 "The patch *substantially* improves parallel build times on large (~100 CPU) systems, both with parallel make and with other things that use make's pipe-based jobserver." 랍니다. 아마 Git 에서 벌어지는 수많은 동시다발적 Make 빌드들, 적어도 100개 넘는 코어들에게 pipe 사용의 불필요한 부분이 수정된거같아요.
(저런 변경이 간단해보이지만 틀리기 아주 쉽죠)