diff options
| author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
|---|---|---|
| committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
| commit | e05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch) | |
| tree | 31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/linux/compaction.h | |
| parent | 3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff) | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'include/linux/compaction.h')
| -rw-r--r-- | include/linux/compaction.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index ef658147e4e8..6ecb6dc2f303 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
| @@ -22,8 +22,9 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
| 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
| 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 24 | int order, gfp_t gfp_mask, nodemask_t *mask, | 24 | int order, gfp_t gfp_mask, nodemask_t *mask, |
| 25 | bool sync, bool *contended); | 25 | bool sync, bool *contended, struct page **page); |
| 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); | 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); |
| 27 | extern void reset_isolation_suitable(pg_data_t *pgdat); | ||
| 27 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 28 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
| 28 | 29 | ||
| 29 | /* Do not skip compaction more than 64 times */ | 30 | /* Do not skip compaction more than 64 times */ |
| @@ -61,10 +62,20 @@ static inline bool compaction_deferred(struct zone *zone, int order) | |||
| 61 | return zone->compact_considered < defer_limit; | 62 | return zone->compact_considered < defer_limit; |
| 62 | } | 63 | } |
| 63 | 64 | ||
| 65 | /* Returns true if restarting compaction after many failures */ | ||
| 66 | static inline bool compaction_restarting(struct zone *zone, int order) | ||
| 67 | { | ||
| 68 | if (order < zone->compact_order_failed) | ||
| 69 | return false; | ||
| 70 | |||
| 71 | return zone->compact_defer_shift == COMPACT_MAX_DEFER_SHIFT && | ||
| 72 | zone->compact_considered >= 1UL << zone->compact_defer_shift; | ||
| 73 | } | ||
| 74 | |||
| 64 | #else | 75 | #else |
| 65 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 76 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 66 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 77 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
| 67 | bool sync, bool *contended) | 78 | bool sync, bool *contended, struct page **page) |
| 68 | { | 79 | { |
| 69 | return COMPACT_CONTINUE; | 80 | return COMPACT_CONTINUE; |
| 70 | } | 81 | } |
| @@ -74,6 +85,10 @@ static inline int compact_pgdat(pg_data_t *pgdat, int order) | |||
| 74 | return COMPACT_CONTINUE; | 85 | return COMPACT_CONTINUE; |
| 75 | } | 86 | } |
| 76 | 87 | ||
| 88 | static inline void reset_isolation_suitable(pg_data_t *pgdat) | ||
| 89 | { | ||
| 90 | } | ||
| 91 | |||
| 77 | static inline unsigned long compaction_suitable(struct zone *zone, int order) | 92 | static inline unsigned long compaction_suitable(struct zone *zone, int order) |
| 78 | { | 93 | { |
| 79 | return COMPACT_SKIPPED; | 94 | return COMPACT_SKIPPED; |
