diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-04-14 07:18:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-04-14 07:19:04 -0400 |
commit | 6ac1ef482d7ae0c690f1640bf6eb818ff9a2d91e (patch) | |
tree | 021cc9f6b477146fcebe6f3be4752abfa2ba18a9 /include/linux/swap.h | |
parent | 682968e0c425c60f0dde37977e5beb2b12ddc4cc (diff) | |
parent | a385ec4f11bdcf81af094c03e2444ee9b7fad2e5 (diff) |
Merge branch 'perf/core' into perf/uprobes
Merge in latest upstream (and the latest perf development tree),
to prepare for tooling changes, and also to pick up v3.4 MM
changes that the uprobes code needs to take care of.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 3e60228e7299..b1fd5c7925fe 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -21,6 +21,9 @@ struct bio; | |||
21 | #define SWAP_FLAG_PRIO_SHIFT 0 | 21 | #define SWAP_FLAG_PRIO_SHIFT 0 |
22 | #define SWAP_FLAG_DISCARD 0x10000 /* discard swap cluster after use */ | 22 | #define SWAP_FLAG_DISCARD 0x10000 /* discard swap cluster after use */ |
23 | 23 | ||
24 | #define SWAP_FLAGS_VALID (SWAP_FLAG_PRIO_MASK | SWAP_FLAG_PREFER | \ | ||
25 | SWAP_FLAG_DISCARD) | ||
26 | |||
24 | static inline int current_is_kswapd(void) | 27 | static inline int current_is_kswapd(void) |
25 | { | 28 | { |
26 | return current->flags & PF_KSWAPD; | 29 | return current->flags & PF_KSWAPD; |
@@ -223,6 +226,7 @@ extern void lru_add_page_tail(struct zone* zone, | |||
223 | extern void activate_page(struct page *); | 226 | extern void activate_page(struct page *); |
224 | extern void mark_page_accessed(struct page *); | 227 | extern void mark_page_accessed(struct page *); |
225 | extern void lru_add_drain(void); | 228 | extern void lru_add_drain(void); |
229 | extern void lru_add_drain_cpu(int cpu); | ||
226 | extern int lru_add_drain_all(void); | 230 | extern int lru_add_drain_all(void); |
227 | extern void rotate_reclaimable_page(struct page *page); | 231 | extern void rotate_reclaimable_page(struct page *page); |
228 | extern void deactivate_page(struct page *page); | 232 | extern void deactivate_page(struct page *page); |
@@ -301,6 +305,13 @@ static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) | |||
301 | return vm_swappiness; | 305 | return vm_swappiness; |
302 | } | 306 | } |
303 | #endif | 307 | #endif |
308 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | ||
309 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); | ||
310 | #else | ||
311 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | ||
312 | { | ||
313 | } | ||
314 | #endif | ||
304 | #ifdef CONFIG_SWAP | 315 | #ifdef CONFIG_SWAP |
305 | /* linux/mm/page_io.c */ | 316 | /* linux/mm/page_io.c */ |
306 | extern int swap_readpage(struct page *); | 317 | extern int swap_readpage(struct page *); |
@@ -329,7 +340,6 @@ extern long total_swap_pages; | |||
329 | extern void si_swapinfo(struct sysinfo *); | 340 | extern void si_swapinfo(struct sysinfo *); |
330 | extern swp_entry_t get_swap_page(void); | 341 | extern swp_entry_t get_swap_page(void); |
331 | extern swp_entry_t get_swap_page_of_type(int); | 342 | extern swp_entry_t get_swap_page_of_type(int); |
332 | extern int valid_swaphandles(swp_entry_t, unsigned long *); | ||
333 | extern int add_swap_count_continuation(swp_entry_t, gfp_t); | 343 | extern int add_swap_count_continuation(swp_entry_t, gfp_t); |
334 | extern void swap_shmem_alloc(swp_entry_t); | 344 | extern void swap_shmem_alloc(swp_entry_t); |
335 | extern int swap_duplicate(swp_entry_t); | 345 | extern int swap_duplicate(swp_entry_t); |
@@ -372,13 +382,6 @@ mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) | |||
372 | { | 382 | { |
373 | } | 383 | } |
374 | #endif | 384 | #endif |
375 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | ||
376 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); | ||
377 | #else | ||
378 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | ||
379 | { | ||
380 | } | ||
381 | #endif | ||
382 | 385 | ||
383 | #else /* CONFIG_SWAP */ | 386 | #else /* CONFIG_SWAP */ |
384 | 387 | ||