Swap token re-tuned
Subsystems (4)
RFC PATCH 2/2 Swap token re-tuned
Resending patch.
New scheme to preempt token.
Signed-off-by Ashwin Chaugule <[email protected]>
include/linux/sched.h +9 -3
@@ -342,9 +342,15 @@ struct mm_struct {/* Architecture-specific MM context */ mm_context_t context; -/* Token based thrashing protection. */ -unsigned long swap_token_time; -char recent_pagein; +/* Swap token stuff */ +/* Last value of global fault stamp as seen by this process. +* In other words, this value gives an indication of how long +* it has been since this task got the token */ +unsigned int faultstamp; + +/* Deciding factor ! Increment if (global_faults - faultstamp < 5) +* else decrement. High priority wins the token.*/ +int token_priority;/* coredumping support */ int core_waiters;
include/linux/swap.h +0 -1
@@ -259,7 +259,6 @@ extern spinlock_t swap_lock;/* linux/mm/thrash.c */ extern struct mm_struct * swap_token_mm; -extern unsigned long swap_token_default_timeout;extern void grab_swap_token (void );extern void __put_swap_token (struct mm_struct *);
kernel/sysctl.c +2 -0
@@ -910,6 +910,7 @@ #ifdef HAVE_ARCH_PICK_MMAP_LAYOUT .extra1 = &zero, },#endif +#if 0 /* Not needed anymore */ #ifdef CONFIG_SWAP { .ctl_name = VM_SWAP_TOKEN_TIMEOUT,
@@ -921,6 +922,7 @@ #ifdef CONFIG_SWAP .strategy = &sysctl_jiffies, },#endif +#endif #ifdef CONFIG_NUMA { .ctl_name = VM_ZONE_RECLAIM_MODE,
mm/thrash.c +48 -60
140 lines not on this page · raw message