Skip to Content
BPF로 리눅스 관측 가능성 향상하기: 성능 분석과 네트워킹을 위한 고급 프로그래밍
book

BPF로 리눅스 관측 가능성 향상하기: 성능 분석과 네트워킹을 위한 고급 프로그래밍

by 류광, 데이비드 칼라베라, 로렌초 폰타나
May 2020
Beginner to intermediate
236 pages
5h 15m
Korean
Hanbit Media, Inc.
Content preview from BPF로 리눅스 관측 가능성 향상하기: 성능 분석과 네트워킹을 위한 고급 프로그래밍
3
BPF 맵
58
참고:
해시 맵을 갱신할 때와 배열 또는
cgroup
저장소 맵을 갱신할 때
BPF
_
F
_
LOCK
의 행동 방식이 조금
다르다. 배열이나
cgroup
저장소 맵에서는 갱신이 제자리에서 (
in
place
) 일어난다. 이는 갱신할 요소가
반드시 맵에 이미 존재해야 한다는 뜻이다. 그러나 해시 맵의 경우에는 그런 제약이 없다. 존재하지 않는
요소를 갱신하려 하면
BPF
는 그 요소에 대한 맵의 해싱용 버킷
bucket
을 잠근 후 새 요소를 삽입한다.
회전 자물쇠가 항상 필요한 것은 아니다. 맵에 담긴 값들을 취합 (
aggregating
)하기만 하면
될 때는 굳이 잠금이 필요하지 않다. 회전 자물쇠는 여러분의 프로그램이 맵의 요소들에 대해
여러 가지 연산을 수행하는 동안 다른 프로그램들이 맵의 요소들을 절대로 변경하지 않는다는
보장이 필요할 때, 즉 다수의 연산을 “원자적으로” 수행해야 할 때 유용하다.
지금까지
BPF
맵으로 할 수 있는 여러 연산을 살펴보았다. 그런데
BPF
맵 자체는 한 종류
밖에 나오지 않았다.
BPF
는 지금까지의 예제들에 나온 해시 맵(
BPF
_
MAP
_
TYPE
_
HASH
) 외에도
다양한 유형의 맵을 제공하며, 유형마다 그 용도가 다르다. 다음 절부터는
BPF
에 정의된 모든
맵 유형을 살펴보고, 상황에 맞게
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

컨테이너 보안: 컨테이너화된 응용 프로그램의 보안을 위한 개념, 이론, 대응법과 모범 관행까지

컨테이너 보안: 컨테이너화된 응용 프로그램의 보안을 위한 개념, 이론, 대응법과 모범 관행까지

류광, 리즈 라이스

Publisher Resources

ISBN: 9791162243053