summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJavier Viguera <javier.viguera@digi.com>2012-01-25 19:45:32 +0100
committerJavier Viguera <javier.viguera@digi.com>2012-01-25 19:45:32 +0100
commit92f4a7fca23e9bb686fa93c49819a661fd9577fc (patch)
tree157c8b0432b992b9749e0ec53ca60ad6bcdfbd51 /include
parentfd98745dd8f0866c5597ae731a5a69fe0b4d2515 (diff)
Revert "mm: page allocator: adjust the per-cpu counter threshold when memory is low"
Otherwise playing fullHD videos on HDMI crashes with: [<800303cc>] (dump_backtrace+0x0/0x10c) from [<803d4104>] (dump_stack+0x18/0x1c) r7:8053a048 r6:8053a048 r5:0000000c r4:00000001 [<803d40ec>] (dump_stack+0x0/0x1c) from [<800891d4>] (__alloc_pages_nodemask+0x524/0x57c) [<80088cb0>] (__alloc_pages_nodemask+0x0/0x57c) from [<80031a4c>] (__dma_alloc+0xf4/0x2b8) [<80031958>] (__dma_alloc+0x0/0x2b8) from [<80031c38>] (dma_alloc_writecombine+0x28/0x34) [<80031c10>] (dma_alloc_writecombine+0x0/0x34) from [<801d51e0>] (mxcfb_set_par+0xd8/0x464) .... This reverts commit 7c2141d484fbfa03af5f83602162d9576564121b. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmzone.h10
-rw-r--r--include/linux/vmstat.h5
2 files changed, 7 insertions, 8 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 1e3d0b423f66..8b2db3d65564 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -463,6 +463,12 @@ static inline int zone_is_oom_locked(const struct zone *zone)
return test_bit(ZONE_OOM_LOCKED, &zone->flags);
}
+#ifdef CONFIG_SMP
+unsigned long zone_nr_free_pages(struct zone *zone);
+#else
+#define zone_nr_free_pages(zone) zone_page_state(zone, NR_FREE_PAGES)
+#endif /* CONFIG_SMP */
+
/*
* The "priority" of VM scanning is how much of the queues we will scan in one
* go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the
@@ -662,9 +668,7 @@ void get_zone_counts(unsigned long *active, unsigned long *inactive,
unsigned long *free);
void build_all_zonelists(void *data);
void wakeup_kswapd(struct zone *zone, int order);
-bool zone_watermark_ok(struct zone *z, int order, unsigned long mark,
- int classzone_idx, int alloc_flags);
-bool zone_watermark_ok_safe(struct zone *z, int order, unsigned long mark,
+int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
int classzone_idx, int alloc_flags);
enum memmap_context {
MEMMAP_EARLY,
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index e4cc21cf5870..eaaea37b3b75 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -254,8 +254,6 @@ extern void dec_zone_state(struct zone *, enum zone_stat_item);
extern void __dec_zone_state(struct zone *, enum zone_stat_item);
void refresh_cpu_vm_stats(int);
-void reduce_pgdat_percpu_threshold(pg_data_t *pgdat);
-void restore_pgdat_percpu_threshold(pg_data_t *pgdat);
#else /* CONFIG_SMP */
/*
@@ -300,9 +298,6 @@ static inline void __dec_zone_page_state(struct page *page,
#define dec_zone_page_state __dec_zone_page_state
#define mod_zone_page_state __mod_zone_page_state
-static inline void reduce_pgdat_percpu_threshold(pg_data_t *pgdat) { }
-static inline void restore_pgdat_percpu_threshold(pg_data_t *pgdat) { }
-
static inline void refresh_cpu_vm_stats(int cpu) { }
#endif