Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338723
b: refs/heads/master
c: d84da3f
h: refs/heads/master
i:
  338721: b1c6f81
  338719: df1b992
v: v3
  • Loading branch information
Kirill A. Shutemov authored and Linus Torvalds committed Dec 12, 2012
1 parent 20e3d6d commit fbe3457
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 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: e5adfffc857788c8b7eca0e98cf1e26f1964b292
refs/heads/master: d84da3f9e4f18809821562bd960e00a10673b341
7 changes: 0 additions & 7 deletions trunk/include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -687,13 +687,6 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
/* Trap pasters of __FUNCTION__ at compile-time */
#define __FUNCTION__ (__func__)

/* This helps us avoid #ifdef CONFIG_COMPACTION */
#ifdef CONFIG_COMPACTION
#define COMPACTION_BUILD 1
#else
#define COMPACTION_BUILD 0
#endif

/* This helps us to avoid #ifdef CONFIG_SYMBOL_PREFIX */
#ifdef CONFIG_SYMBOL_PREFIX
#define SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
Expand Down
9 changes: 5 additions & 4 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
/* Use reclaim/compaction for costly allocs or under memory pressure */
static bool in_reclaim_compaction(struct scan_control *sc)
{
if (COMPACTION_BUILD && sc->order &&
if (IS_ENABLED(CONFIG_COMPACTION) && sc->order &&
(sc->order > PAGE_ALLOC_COSTLY_ORDER ||
sc->priority < DEF_PRIORITY - 2))
return true;
Expand Down Expand Up @@ -2005,7 +2005,7 @@ static bool shrink_zones(struct zonelist *zonelist, struct scan_control *sc)
if (zone->all_unreclaimable &&
sc->priority != DEF_PRIORITY)
continue; /* Let kswapd poll it */
if (COMPACTION_BUILD) {
if (IS_ENABLED(CONFIG_COMPACTION)) {
/*
* If we already have plenty of memory free for
* compaction in this zone, don't free any more.
Expand Down Expand Up @@ -2421,7 +2421,8 @@ static bool zone_balanced(struct zone *zone, int order,
balance_gap, classzone_idx, 0))
return false;

if (COMPACTION_BUILD && order && !compaction_suitable(zone, order))
if (IS_ENABLED(CONFIG_COMPACTION) && order &&
!compaction_suitable(zone, order))
return false;

return true;
Expand Down Expand Up @@ -2684,7 +2685,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
* Do not reclaim more than needed for compaction.
*/
testorder = order;
if (COMPACTION_BUILD && order &&
if (IS_ENABLED(CONFIG_COMPACTION) && order &&
compaction_suitable(zone, order) !=
COMPACT_SKIPPED)
testorder = 0;
Expand Down

0 comments on commit fbe3457

Please sign in to comment.