Messages in this thread Patch in this message | | | Date | Thu, 29 Oct 1998 09:48:46 +0100 (CET) | From | Andrea Arcangeli <> | Subject | Re: [patch] my latest oom stuff |
| |
On Thu, 29 Oct 1998, Andrea Arcangeli wrote:
>Here the patch:
Woops I forgot to include this piece of the patch:
Index: linux/ipc/shm.c diff -u linux/ipc/shm.c:1.1.1.3 linux/ipc/shm.c:1.1.1.2.4.3 --- linux/ipc/shm.c:1.1.1.3 Sat Oct 24 15:42:48 1998 +++ linux/ipc/shm.c Thu Oct 29 09:47:42 1998 @@ -4,6 +4,7 @@ * Many improvements/fixes by Bruno Haible. * Replaced `struct shm_desc' by `struct vm_area_struct', July 1994. * Fixed the shm swap deallocation (shm_unuse()), August 1998 Andrea Arcangeli. + * New FP retval logic to automagically detect real OOM, 1998 Andrea Arcangeli. */ #include <linux/errno.h> @@ -701,12 +702,11 @@ struct vm_area_struct *shmd; unsigned long swap_nr; unsigned long id, idx; - int loop = 0; - int counter; + int loop = 0, counter; counter = shm_rss >> prio; if (!counter || !(swap_nr = get_swap_page())) - return 0; + return FP_IMPOSSIBLE; check_id: shp = shm_segs[swap_id]; @@ -738,7 +738,7 @@ if (--counter < 0) { /* failed */ failed: swap_free (swap_nr); - return 0; + return FP_IMPOSSIBLE; } if (shp->attaches) for (shmd = shp->attaches; ; ) { @@ -803,7 +803,7 @@ swap_successes++; shm_swp++; shm_rss--; - return 1; + return FP_DONE; } /*
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |