Messages in this thread | | | From | Chris Li <> | Date | Sun, 19 Nov 2023 21:51:59 -0800 | Subject | Re: [PATCH] mm:zswap: fix zswap entry reclamation failure in two scenarios |
| |
On Sun, Nov 19, 2023 at 9:41 PM Huang, Ying <ying.huang@intel.com> wrote: > > Chris Li <chrisl@kernel.org> writes: > > > On Sun, Nov 19, 2023 at 7:20 PM Huang, Ying <ying.huang@intel.com> wrote: > > Per my understanding, memcg uncharging happens in > > swapcache_free_entries() > swap_entry_free() > mem_cgroup_uncharge_swap() > > The swap entries are uncharged one-by-one, not
Yes. That matches my understanding as well. I think I am using the term "batching" very loosely. My bad and thanks for the clarification.
I am referring to the fact that in most cases, the free_swap_slot() does not perform uncharge. It is grouped together with other entries to uncharge together inside swapcache_free_entries(). Yes, the uncharge itself is done by a for loop page by page. No batching in the for loop. BTW, Not all uncharges can be batched, because they can come from different memcg.
Chris
| |