patch-2.1.34 linux/mm/page_alloc.c
Next file: linux/mm/slab.c
Previous file: linux/mm/memory.c
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Mon Apr 14 09:31:10 1997
- Orig file:
v2.1.33/linux/mm/page_alloc.c
- Orig date:
Thu Mar 27 14:40:12 1997
diff -u --recursive --new-file v2.1.33/linux/mm/page_alloc.c linux/mm/page_alloc.c
@@ -190,7 +190,7 @@
index += size; \
map += size; \
} \
- map->count = 1; \
+ atomic_set(&map->count, 1); \
map->age = PAGE_INITIAL_AGE; \
} while (0)
@@ -201,8 +201,8 @@
if (order >= NR_MEM_LISTS)
return 0;
-#if 0
- if (intr_count && priority != GFP_ATOMIC) {
+
+ if (in_interrupt() && priority != GFP_ATOMIC) {
static int count = 0;
if (++count < 5) {
printk("gfp called nonatomically from interrupt %p\n",
@@ -210,7 +210,7 @@
priority = GFP_ATOMIC;
}
}
-#endif
+
reserved_pages = 5;
if (priority != GFP_NFS)
reserved_pages = min_free_pages;
@@ -288,6 +288,7 @@
memset(mem_map, 0, start_mem - (unsigned long) mem_map);
do {
--p;
+ atomic_set(&p->count, 0);
p->flags = (1 << PG_DMA) | (1 << PG_reserved);
p->map_nr = p - mem_map;
} while (p > mem_map);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov