Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258935
b: refs/heads/master
c: 45ebb84
h: refs/heads/master
i:
  258933: 4bc87a3
  258931: 78e511b
  258927: a550dfd
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Jul 26, 2011
1 parent e8f69c1 commit d47e275
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53bb01f593d50188c8d638f89db96f9b6b042bcd
refs/heads/master: 45ebb840257b060ec54416aebffd9747e210962c
11 changes: 11 additions & 0 deletions trunk/mm/thrash.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ void grab_swap_token(struct mm_struct *mm)
if (!swap_token_mm)
goto replace_token;

/*
* Usually, we don't need priority aging because long interval faults
* makes priority decrease quickly. But there is one exception. If the
* token owner task is sleeping, it never make long interval faults.
* Thus, we need a priority aging mechanism instead. The requirements
* of priority aging are
* 1) An aging interval is reasonable enough long. Too short aging
* interval makes quick swap token lost and decrease performance.
* 2) The swap token owner task have to get priority aging even if
* it's under sleep.
*/
if ((global_faults - last_aging) > TOKEN_AGING_INTERVAL) {
swap_token_mm->token_priority /= 2;
last_aging = global_faults;
Expand Down

0 comments on commit d47e275

Please sign in to comment.