Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356499
b: refs/heads/master
c: 7103f16
h: refs/heads/master
i:
  356497: 238270e
  356495: dd0a07d
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Feb 24, 2013
1 parent 1caa2c6 commit f5237fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 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: 1998cc048901109a29924380b8e91bc049b32951
refs/heads/master: 7103f16dbff20fa969c9500902d980d17f953fa6
5 changes: 2 additions & 3 deletions trunk/include/linux/compaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern int fragmentation_index(struct zone *zone, unsigned int order);
extern unsigned long try_to_compact_pages(struct zonelist *zonelist,
int order, gfp_t gfp_mask, nodemask_t *mask,
bool sync, bool *contended);
extern int compact_pgdat(pg_data_t *pgdat, int order);
extern void compact_pgdat(pg_data_t *pgdat, int order);
extern void reset_isolation_suitable(pg_data_t *pgdat);
extern unsigned long compaction_suitable(struct zone *zone, int order);

Expand Down Expand Up @@ -80,9 +80,8 @@ static inline unsigned long try_to_compact_pages(struct zonelist *zonelist,
return COMPACT_CONTINUE;
}

static inline int compact_pgdat(pg_data_t *pgdat, int order)
static inline void compact_pgdat(pg_data_t *pgdat, int order)
{
return COMPACT_CONTINUE;
}

static inline void reset_isolation_suitable(pg_data_t *pgdat)
Expand Down
12 changes: 5 additions & 7 deletions trunk/mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist,


/* Compact all zones within a node */
static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
static void __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
{
int zoneid;
struct zone *zone;
Expand Down Expand Up @@ -1118,28 +1118,26 @@ static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
VM_BUG_ON(!list_empty(&cc->freepages));
VM_BUG_ON(!list_empty(&cc->migratepages));
}

return 0;
}

int compact_pgdat(pg_data_t *pgdat, int order)
void compact_pgdat(pg_data_t *pgdat, int order)
{
struct compact_control cc = {
.order = order,
.sync = false,
};

return __compact_pgdat(pgdat, &cc);
__compact_pgdat(pgdat, &cc);
}

static int compact_node(int nid)
static void compact_node(int nid)
{
struct compact_control cc = {
.order = -1,
.sync = true,
};

return __compact_pgdat(NODE_DATA(nid), &cc);
__compact_pgdat(NODE_DATA(nid), &cc);
}

/* Compact all nodes in the system */
Expand Down

0 comments on commit f5237fe

Please sign in to comment.