amarao: (Default)
[personal profile] amarao
Меня заинтересовал вопрос, что такое RSS?

Документация невнятна, сырцы яснее:

hiwater_rss = total_rss = anon + file + shmem;

RSS - это сумма anon, file и shmem.

anon = get_mm_counter(mm, MM_ANONPAGES);
file = get_mm_counter(mm, MM_FILEPAGES);
shmem = get_mm_counter(mm, MM_SHMEMPAGES);


MM_FILEPAGES, /* Resident file mapping pages */
MM_ANONPAGES, /* Resident anonymous pages */
MM_SHMEMPAGES, /* Resident shared memory pages */

https://www.kernel.org/doc/html/latest/admin-guide/mm/concepts.html#anonymous-memory

... implicitly created for program’s stack and heap or by explicit calls to mmap(2) system call.

То есть в ANONPAGES попадают:
* stack
* initial heap (???)
* всё, что сделано mmap'ом.

Вопрос: исключаются ли страницы из MM_ANONPAGES если они выгружаются в swap? Есть MM_SWAPENTS, /* Anonymous swap entries */, исключают ли их из ANONPAGES в этот момент?

Мне по коду этого быстро не найти... Видимо, стоит экспериментов.

(Срачик на тему, попадают ли .rodata в RSS или нет).
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

amarao: (Default)
amarao

April 2026

S M T W T F S
   1234
567 891011
12131415161718
19202122232425
2627282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 12th, 2026 09:37 am
Powered by Dreamwidth Studios