While testing for memcg aware swap token, I observed a swap token
was often grabbed an intermittent running process (eg init, auditd)
and they never release a token.
Why? Currently, swap toke priority is only decreased at page fault
path. Then, if the process sleep immediately after to grab swap
token, their swap token priority never be decreased. That makes
obviously undesired result.
This patch implement very poor (and lightweight) priority decay
mechanism. It only be affect to the above corner case and doesn't
change swap tendency workload performance (eg multi process qsbench
load)
Signed-off-by: KOSAKI Motohiro<kosaki.motohiro@xxxxxxxxxxxxxx>