- 论坛徽章:
- 0
|
回复 1# chenzhanyiczy
sorry for that there is no chinese input soft on this computer, so i reply in my clumsy English.
To understand this problem, first of all, you should know how kernel use the memory and usage of the most mem used by kernel. I think the kernel use memory in three places. They are as follows.
First, dynamic objects - that is slab;
Second, pagecache used by fs;
Third,dma or not dma used by drievers, such as net card.
Here, we ignore the stack used by kernel.
Actually, page cahce dominate the memory kernel used. Now we return back to pagecache. Why page cache? Of course cache the data on the disk ,as a result saving the time and higher throughput.
Now, assume we have 16GB mem, and we want cache data as more as possible. Of course we want high mem. so in radix tree, we reference page with struct page rather page's address. Consequently, we can cache more data. If we want use the data, we can firstly map the page to the 128M , after finishing, we unmap it. so other pages can be used too.
so do the slab. |
|