History

mm: memcontrol: let v2 cgroups follow changes in system swappiness

Cgroup2 currently doesn't have a per-cgroup swappiness setting. We might want to add one later - that's a different discussion - but until we do, the cgroups should always follow the system setting. Otherwise it will be unchangeably set to whatever the ancestor inherited from the system setting at the time of cgroup creation.

Johannes Weiner committed 10 years ago

Commit 4550c4e1 parent 145bdaa1 file · +4 −0Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/swap.h+4−0
@@ -533,6 +533,10 @@ static inline swp_entry_t get_swap_page(void) · 532 unmodified lines
533#ifdef CONFIG_MEMCG533#ifdef CONFIG_MEMCG
534static inline int mem_cgroup_swappiness(struct mem_cgroup *memcg)534static inline int mem_cgroup_swappiness(struct mem_cgroup *memcg)
535{535{
536 /* Cgroup2 doesn't have per-cgroup swappiness */
537 if (cgroup_subsys_on_dfl(memory_cgrp_subsys))
538 return vm_swappiness;
539
536 /* root ? */540 /* root ? */
537 if (mem_cgroup_disabled() || !memcg->css.parent)541 if (mem_cgroup_disabled() || !memcg->css.parent)
538 return vm_swappiness;542 return vm_swappiness;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t