public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] Add swappiness argument to memory.reclaim
@ 2022-05-16 22:29 Yosry Ahmed
       [not found] ` <CAJD7tkbDpyoODveCsnaqBBMZEkDvshXJmNdbk51yKSNgD7aGdg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Yosry Ahmed @ 2022-05-16 22:29 UTC (permalink / raw)
  To: Johannes Weiner, Michal Hocko, Shakeel Butt, Andrew Morton,
	David Rientjes, Roman Gushchin
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA, Tejun Heo, Linux-MM, Yu Zhao,
	Wei Xu, Greg Thelen, Chen Wandun

The discussions on the patch series [1] to add memory.reclaim has
shown that it is desirable to add an argument to control the type of
memory being reclaimed by invoked proactive reclaim using
memory.reclaim.

I am proposing adding a swappiness optional argument to the interface.
If set, it overwrites vm.swappiness and per-memcg swappiness. This
provides a way to enforce user policy on a stateless per-reclaim
basis. We can make policy decisions to perform reclaim differently for
tasks of different app classes based on their individual QoS needs. It
also helps for use cases when particularly page cache is high and we
want to mainly hit that without swapping out.

The interface would be something like this (utilizing the nested-keyed
interface we documented earlier):

$ echo "200M swappiness=30" > memory.reclaim

Looking forward to hearing thoughts about this before I go ahead and
send a patch.

[1]https://lore.kernel.org/lkml/20220331084151.2600229-1-yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org/

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-05-19 18:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-16 22:29 [RFC] Add swappiness argument to memory.reclaim Yosry Ahmed
     [not found] ` <CAJD7tkbDpyoODveCsnaqBBMZEkDvshXJmNdbk51yKSNgD7aGdg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-17  6:56   ` Michal Hocko
     [not found]     ` <YoNHJwyjR7NJ5kG7-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2022-05-17 18:06       ` Yosry Ahmed
     [not found]         ` <CAJD7tkYnBjuwQDzdeo6irHY=so-E8z=Kc_kZe52anMOmRL+8yA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-17 20:06           ` Johannes Weiner
     [not found]             ` <YoQAVeGj19YpSMDb-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2022-05-19  5:44               ` Wei Xu
     [not found]                 ` <CAAPL-u8pZ_p+SQZnr=8UV37yiQpWRZny7g9p6YES0wa+g_kMJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-19  8:51                   ` Michal Hocko
     [not found]                     ` <YoYFKdqayKRw2npp-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2022-05-19 15:29                       ` Wei Xu
2022-05-19 18:24                       ` Yosry Ahmed
2022-05-17 16:05   ` Roman Gushchin
2022-05-17 18:13     ` Yosry Ahmed
     [not found]       ` <CAJD7tkbbiP0RusWBdCvozjauKN-vhgvzWtsL3Hu5y2dLr63idQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-17 19:49         ` Roman Gushchin
2022-05-17 20:11           ` Yosry Ahmed
     [not found]             ` <CAJD7tkaPWcFyisv3Kso0AFUGkQiiAiFmsV2R3ZU2SNc4XP8v+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-17 20:45               ` Roman Gushchin
2022-05-19  5:17                 ` Wei Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox