If there were a mechanism whereby one could opt out of the SIGKILL,
most if not all of the complaints would go away.  SIGDANGER would
suffice, but even a rude hack would do in a pinch, such as the one
included below (untested).  If you mmap real disk instead of sbrk'ing,
and use this procfs control then the overcommit world won't interfere
with your process (but take care of thrashing stack/text of course).
No more need to fight the holy war!

3.2-STABLE:

===
diff -u vm/vm_pageout.c ../../src3.2/sys/vm/vm_pageout.c
--- vm/vm_pageout.c     Thu Jul 15 20:40:56 1999
+++ ../../src3.2/sys/vm/vm_pageout.c    Thu Mar 18 17:28:39 1999
@@ -1144,7 +1144,7 @@
                        /*
                         * if this is a system process, skip it
                         */
-                       if ((p->p_flag &
(P_PRECIOUS|P_SYSTEM|P_NOSWAP)) || (p->p_pid == 1) ||
+                       if ((p->p_flag & (P_SYSTEM|P_NOSWAP)) ||
(p->p_pid == 1) ||
                            ((p->p_pid < 48) && (vm_swap_size != 0)))
{
                                continue;
                        }
===
diff -u sys/proc.h ../../src3.2/sys/sys/proc.h
--- sys/proc.h  Thu Jul 15 20:41:50 1999
+++ ../../src3.2/sys/sys/proc.h Fri May 14 01:32:41 1999
@@ -268,8 +268,6 @@
 
 #define        P_NOCLDWAIT     0x400000 /* No zombies if child dies
*/
 
-#define        P_PRECIOUS      0x800000 /* Please, please let me live 
*/
-
 
 /*
  * MOVE TO ucred.h?
===
diff -u miscfs/procfs/procfs_ctl.c
../../src3.2/sys/miscfs/procfs/procfs_ctl.c
--- miscfs/procfs/procfs_ctl.c  Thu Jul 15 20:40:59 1999
+++ ../../src3.2/sys/miscfs/procfs/procfs_ctl.c Sat Aug  2 09:32:10
1997
@@ -69,8 +69,6 @@
 #define PROCFS_CTL_STEP                3
 #define PROCFS_CTL_RUN         4
 #define PROCFS_CTL_WAIT                5
-#define PROCFS_CTL_PRECIOUS    6
-#define PROCFS_CTL_NOPRECIOUS  7
 
 static vfs_namemap_t ctlnames[] = {
        /* special /proc commands */
@@ -79,8 +77,6 @@
        { "step",       PROCFS_CTL_STEP },
        { "run",        PROCFS_CTL_RUN },
        { "wait",       PROCFS_CTL_WAIT },
-       { "precious",   PROCFS_CTL_PRECIOUS },
-       { "noprecious", PROCFS_CTL_NOPRECIOUS },
        { 0 },
 };
 
@@ -255,14 +251,6 @@
                        }
                }
                return (error);
-
-       case PROCFS_CTL_PRECIOUS:
-               p->p_flag |= P_PRECIOUS;
-               return 0;
-
-       case PROCFS_CTL_NOPRECIOUS:
-               p->p_flag &= ~P_PRECIOUS;
-               return 0;
 
        default:
                panic("procfs_control");






To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to