Lines Matching +full:hot +full:- +full:swap

7 Base Kernel Version: based on 2.6.33-rc7-mm(candidate for 34).
13 (*) Topics on API should be in Documentation/admin-guide/cgroup-v1/memory.rst)
22 Allocated at boot or memory hotplug. Freed at memory hot removal.
29 occurs. swap_cgroup is used only when a charged page is swapped-out.
41 a page/swp_entry may be uncharged (usage -= PAGE_SIZE) by
47 Called when swp_entry's refcnt goes down to 0. A charge against swap
50 3. charge-commit-cancel
55 - mem_cgroup_try_charge()
56 - mem_cgroup_commit_charge() or mem_cgroup_cancel_charge()
63 At cancel(), simply usage -= PAGE_SIZE.
71 - page fault into MAP_ANONYMOUS mapping.
72 - Copy-On-Write.
74 4.1 Swap-in.
75 At swap-in, the page is taken from swap-cache. There are 2 cases.
81 4.2 Swap-out.
82 At swap-out, typical state transition is below.
84 (a) add to swap cache. (marked as SwapCache)
88 (c) write back to swap.
89 (d) delete from swap cache. (remove from SwapCache)
90 swp_entry's refcnt -= 1.
94 (e) zap_pte() is called and swp_entry's refcnt -=1 -> 0.
100 - filemap_add_folio().
119 - radix-tree of shmem's inode.
120 - SwapCache.
121 - Both on radix-tree and SwapCache. This happens at swap-in
122 and swap-out,
126 - A new page is added to shmem's radix-tree.
127 - A swp page is read. (move a charge from swap_cgroup to page_cgroup)
146 -------------------------
156 ---------
159 of troubles here. This is because shmem is page-cache but can be
163 -------------
168 mount -t cgroup -o cpuset none /opt/cpuset
183 --
189 echo -n $pid
190 echo -n " "
198 --
201 ------------------
214 ------------------
234 -------------------------------
241 # mount -t cgroup none /cgroup -o cpuset,memory,cpu,devices
246 -----------
248 Besides management of swap is one of complicated parts of memcg,
249 call path of swap-in at swapoff is not same as usual swap-in path..
254 (Shell-A)::
256 # mount -t cgroup none /cgroup -o memory
263 (Shell-B)::
266 # /sbin/swapoff -a
272 9.8 OOM-Killer
273 --------------
275 Out-of-memory caused by memcg's limit will kill tasks under
286 #swapoff -a
291 Case B) when you use mem+swap limitation::
299 ----------------------------------
303 (Shell-A)::
310 (Shell-B)::
319 See 8.2 of Documentation/admin-guide/cgroup-v1/memory.rst to see what value should
323 ----------------------
328 (Shell-A) Create cgroup and run event listener::
333 (Shell-B) Add task to cgroup and try to allocate and free memory::