Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19373
b: refs/heads/master
c: 2a11ff0
h: refs/heads/master
i:
  19371: 56ba5ce
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Feb 1, 2006
1 parent 0c84b88 commit 4a57274
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a92f71263af9d0ab77c260f709c0c079656221aa
refs/heads/master: 2a11ff06d7d12be5d1bbcf592fff649b45ac2388
12 changes: 12 additions & 0 deletions trunk/Documentation/sysctl/vm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Currently, these files are in /proc/sys/vm:
- block_dump
- drop-caches
- zone_reclaim_mode
- zone_reclaim_interval

==============================================================

Expand Down Expand Up @@ -137,4 +138,15 @@ of memory should be used for caching files from disk.

It may be beneficial to switch this on if one wants to do zone
reclaim regardless of the numa distances in the system.
================================================================

zone_reclaim_interval:

The time allowed for off node allocations after zone reclaim
has failed to reclaim enough pages to allow a local allocation.

Time is set in seconds and set by default to 30 seconds.

Reduce the interval if undesired off node allocations occur. However, too
frequent scans will have a negative impact onoff node allocation performance.

1 change: 1 addition & 0 deletions trunk/include/linux/swap.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ extern int vm_swappiness;

#ifdef CONFIG_NUMA
extern int zone_reclaim_mode;
extern int zone_reclaim_interval;
extern int zone_reclaim(struct zone *, gfp_t, unsigned int);
#else
#define zone_reclaim_mode 0
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ enum
VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */
VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */
VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */
VM_ZONE_RECLAIM_MODE=31,/* reclaim local zone memory before going off node */
VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */
VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */
};


Expand Down
9 changes: 9 additions & 0 deletions trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,15 @@ static ctl_table vm_table[] = {
.strategy = &sysctl_intvec,
.extra1 = &zero,
},
{
.ctl_name = VM_ZONE_RECLAIM_INTERVAL,
.procname = "zone_reclaim_interval",
.data = &zone_reclaim_interval,
.maxlen = sizeof(zone_reclaim_interval),
.mode = 0644,
.proc_handler = &proc_dointvec_jiffies,
.strategy = &sysctl_jiffies,
},
#endif
{ .ctl_name = 0 }
};
Expand Down
4 changes: 2 additions & 2 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,7 @@ int zone_reclaim_mode __read_mostly;
/*
* Mininum time between zone reclaim scans
*/
#define ZONE_RECLAIM_INTERVAL 30*HZ
int zone_reclaim_interval __read_mostly = 30*HZ;

/*
* Priority for ZONE_RECLAIM. This determines the fraction of pages
Expand All @@ -1617,7 +1617,7 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
int node_id;

if (time_before(jiffies,
zone->last_unsuccessful_zone_reclaim + ZONE_RECLAIM_INTERVAL))
zone->last_unsuccessful_zone_reclaim + zone_reclaim_interval))
return 0;

if (!(gfp_mask & __GFP_WAIT) ||
Expand Down

0 comments on commit 4a57274

Please sign in to comment.