Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19363
b: refs/heads/master
c: 8928862
h: refs/heads/master
i:
  19361: dfbb618
  19359: c627961
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Feb 1, 2006
1 parent a213ba8 commit 2cfc599
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 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: 537421be79b94bcf620467f50dd9e38b739c2a00
refs/heads/master: 8928862398fef04a137e5673ac5fa9e797960c87
29 changes: 15 additions & 14 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1589,37 +1589,38 @@ int zone_reclaim_mode __read_mostly;
/*
* Mininum time between zone reclaim scans
*/
#define ZONE_RECLAIM_INTERVAL HZ/2
#define ZONE_RECLAIM_INTERVAL 30*HZ
/*
* Try to free up some pages from this zone through reclaim.
*/
int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
{
int nr_pages = 1 << order;
int nr_pages;
struct task_struct *p = current;
struct reclaim_state reclaim_state;
struct scan_control sc = {
.gfp_mask = gfp_mask,
.may_writepage = 0,
.may_swap = 0,
.nr_mapped = read_page_state(nr_mapped),
.nr_scanned = 0,
.nr_reclaimed = 0,
.priority = 0
};
struct scan_control sc;

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

if (!(gfp_mask & __GFP_WAIT) ||
zone->zone_pgdat->node_id != numa_node_id() ||
zone->all_unreclaimable ||
atomic_read(&zone->reclaim_in_progress) > 0)
return 0;

if (time_before(jiffies,
zone->last_unsuccessful_zone_reclaim + ZONE_RECLAIM_INTERVAL))
return 0;
sc.may_writepage = 0;
sc.may_swap = 0;
sc.nr_scanned = 0;
sc.nr_reclaimed = 0;
sc.priority = 0;
sc.nr_mapped = read_page_state(nr_mapped);
sc.gfp_mask = gfp_mask;

disable_swap_token();

nr_pages = 1 << order;
if (nr_pages > SWAP_CLUSTER_MAX)
sc.swap_cluster_max = nr_pages;
else
Expand Down

0 comments on commit 2cfc599

Please sign in to comment.