Patch Name: PHKL_3211 Patch Description: s700 8.07 patch for vfork/virtual memory/swap PHKL_3211: This patch fixes a Data Segmentation Fault that would occur when a system call to vfork() was performed and the proc table was full. (i.e. another process entry could not be added). The error path of the "traditional" vfork semantics created in PHKL_0743 did not take this into account correctly and upon exit the parent inappropriately accessed a data structure that had not been initialized. PHKL_1415: This patch allows file system link routines to call register_vfs_type() for approved third party file systems. This patch allows third party file systems to link into the vfssw[] table. The config program will need to run before attempting to link a new hp-ux. This new config program generates the nvfssw variable in conf.c. PHKL_1065: Fix extended interactive hangs during VM stress. Note: This patch is essentially an 8.07 version of a subset of the virtual memory improvements being made to 9.0 for work stations. Problems this patch addresses: This patch improves interactive response times while the system is heavily paging or swapping, particularly during transient periods where the system would run out of physical memory. However, It could either improve or degrade the total time needed to run a program while heavily paging. That is, this patch's intent is to improve response time, not throughput, which will likely improve but could worsen. For example, a set of memory intensive processes are less likely to spend time being temporarily completely swapped to disk, so more processes will be interfering with each other at a time, possible giving slower overall throughput than if they'd been run fewer at a time. There are, of course, performance problems in hp-ux, which may appear related to virtual memory, but which this patch does not address. Specific problems addressed by this patch are - During periods where a small number of processes quickly and continually absorb all free physical memory. Usually the startup phase of a large process. Typically, the system appears to hang until the such a period ends. - During the swapping of large processes. Other disk accesses may temporarily be suspended, potentially causing a temporary hang. - "nice" had little impact when the system is paging heavily How this patch addresses the above problems: When "nice" is used to lower the priority of batch processes, this patch greatly improves the situations described above, and may somewhat improve other performance problems caused by memory stress. Even if "nice" is not used, improvement in interactive response will be seen, but using "nice" gives considerably better results. The patch includes a new page-out algorithm, a less intrusive swapping mechanism, fixes defects causing lockup situations while there is no free physical memory, and reduces the chance of the system getting in a situation where it has no free physical memory. It would be wise to first run this patch on a trial basis and see if your particular performance problems are improved. PHKL_0616: Improve interactive performance of a stressed VM system. Problem this patch addresses: During periods where a process quickly and continually absorbs all free physical memory, the system may appear to lock-up for anywhere between a few seconds to over a minute. This creates delays in interactive response, and slows processes in general. The start-up phase of a large program is an example where a process quickly uses up physical memory. How this patch addresses the above problems: Installing the patch file vm_vhand.o will fix a defect in the page-out algorithm that contributed to the above problem. There are other related problems not fixed by this patch, so this patch does not completely solve the problem. The improvement you see will depend on on type and severity of the programs/problems causing slow-downs you see. X/Vue response times are difficult to objectively measure, but seem to be about twice as fast under some conditions. Also, these changes were tested with a simple set of programs that tested response times while another batch program used up free memory as fast as possible. Response times improved by about 5X. The batch program ran faster too. NOTE: Even with these changes there can be still significant system delays, particularly when a large program starts up, this patch improves the situation, but does not always solve it. PHKL_0900: Fix interactive hangs caused by low memory and swapping. Note: This patch is essentially an 8.07 version of a subset of the virtual memory improvements being made to 9.0 for workstations. Problems this patch addresses: This patch improves interactive response times while the system is heavily paging or swapping, particularly during transient periods where the system would run out of physical memory. However, It could either improve or degrade the total time needed to run a program while heavily paging. That is, this patch's intent is to improve response time, not throughput, which will likely improve but could worsen. - During periods where a process quickly and continually absorbs all free physical memory. Usually the startup phase of a large process. Typically, the system appears to hang until the such a period ends. - During the swapping of large processes. Other disk accesses may temporarily be suspended, potentially causing a temporary hang. - "nice" has little impact when the system is paging heavily How this patch addresses the above problems: When "nice" is used to lower the priority of batch processes, this patch greatly improves the situations described above, and may somewhat improve other performance problems caused by memory stress. Even if "nice" is not used, some improvement in interactive response will be seen, but using "nice" gives considerably better results. The patch includes a new page-out algorithm, a less intrusive swapping mechanism, fixes defects causing lockup situations while there is no free physical memory, and reduces the chance of the system getting in a situation where it has no free physical memory. This patch is an early version of some 9.0 improvements for interactive performance. It would be wise to first run this patch on a trial basis and see if your particular performance problems are improved. PHKL_0897: Eliminate the kernel panic "panic: dupreg: new region > old region" Problem this patch addresses: If a program is NFS mounted from a remote machine, and the executable is overwritten on the remote machine while it is running locally, and the executable is started again (locally) while it is being overwritten, then it is possible for the kernel to panic with the message "panic: dupreg: new region > old region" This patch fixes this kernel panic. The kernel will kills programs that are modfied while they are executing. The process being started will also be killed if the executable is changed. PHKL_1011: Correctly and automatically return swap to file system. File system swap space could be reserved without being allocated, in which case it was not specificaly tagged as being used. However, the return swap to file system functionality only returned tagged space. Also, the code path to return swap was not executed by syncer calling tsync() on stand-alone systems. This patch makes the VM system return both tagged and untagged space, and executes the necessary code path for all types of sync'ing. This is very similar to PHKL_0804. The difference is the automatic return of swap on stand alone systems, which this patch handles and PHKL_0804 did not handle. PHKL_0804: S700 -- Correctly return swap space to file system. File system swap space could be reserved without being allocated, in which case it was not specificaly tagged as being used. However, the return swap to file system functionality only returned tagged space. This patch makes the VM system return both tagged and untagged space. PHKL_1200: Implement "traditional" vfork semantics This patch implements "traditional" vfork semantics. Without this patch, vfork(2) in 8.0 is exactly the same as fork(2). The problem is that if a very large process vforks in order to exec a small program, the vfork may fail due to requiring the same amount of swap space as the parent. With this patch, the child shares the address space of the parent process, and the parent is suspended until the child exits or execs. This patch supersedes PHKL_0743. PHKL_0743: S700 -- Implement "traditional" vfork semantics This patch implements "traditional" vfork semantics. Without this patch, vfork(2) in 8.0 is exactly the same as fork(2). The problem is that if a very large process vforks in order to exec a small program, the vfork may fail due to requiring the same amount of swap space as the parent. With this patch, the child shares the address space of the parent process, and the parent is suspended until the child exits or execs. Path Name: /hp-ux_patches/s700/8.X/PHKL_3211 Effective Date: 931011 Patch Files: /system/PHKL_3211/new/asm_utl.o /system/PHKL_3211/new/config /system/PHKL_3211/new/genassym.o /system/PHKL_3211/new/kern_exec.o /system/PHKL_3211/new/kern_exit.o /system/PHKL_3211/new/kern_fork.o /system/PHKL_3211/new/kern_synch.o /system/PHKL_3211/new/pm_proc.o /system/PHKL_3211/new/pm_procdup.o /system/PHKL_3211/new/resume.o /system/PHKL_3211/new/sem_utl.o /system/PHKL_3211/new/subr_xxx.o /system/PHKL_3211/new/vfork.h /system/PHKL_3211/new/vfs.o /system/PHKL_3211/new/vfs_vm.o /system/PHKL_3211/new/vm_devswap.o /system/PHKL_3211/new/vm_fault.o /system/PHKL_3211/new/vm_machdep.o /system/PHKL_3211/new/vm_misc.o /system/PHKL_3211/new/vm_page.o /system/PHKL_3211/new/vm_pregion.o /system/PHKL_3211/new/vm_region.o /system/PHKL_3211/new/vm_sched.o /system/PHKL_3211/new/vm_swalloc.o /system/PHKL_3211/new/vm_swp.o /system/PHKL_3211/new/vm_vhand.o SR/APR#: "what" string/timestamp: asm_utl.o: asm_utl.s $Revision: 1.112.77.4 $ $Date: 93/10/11 10:39:45 $ PATCH_8.07 PHKL_3211 genassym.o: genassym.c $Revision: 1.71.77.4 $ $Date: 93/10/11 13:05:10 $ PATCH_8.07 PHKL_3211 kern_exec.o: kern_exec.c $Revision: 1.88.77.4 $ $Date: 93/10/11 10:56:12 $ PATCH_8.07 PHKL_3211 kern_exit.o: kern_exit.c $Revision: 1.72.77.4 $ $Date: 93/10/11 10:57:40 $ PATCH_8.07 PHKL_3211 kern_fork.o: kern_fork.c $Revision: 1.66.77.5 $ $Date: 93/10/11 10:32:45 $ PATCH_8.07 PHKL_3211 kern_synch.o: kern_synch.c $Revision: 1.54.77.4 $ $Date: 93/10/11 10:59:31 $ PATCH_8.07 PHKL_3211 pm_proc.o: pm_proc.c $Revision: 1.8.77.4 $ $Date: 93/10/11 11:00:51 $ PATCH_8.07 PHKL_3211 pm_procdup.o: pm_procdup.c $Revision: 1.7.77.4 $ $Date: 93/10/11 10:51:56 $ PATCH_8.07 PHKL_3211 resume.o: resume.s $Revision: 1.8.77.4 $ $Date: 93/10/11 10:40:51 $ PATCH_8.07 PHKL_3211 sem_utl.o: sem_utl.c $Revision: 1.9.77.4 $ $Date: 93/10/11 11:02:17 $ PATCH_8.07 PHKL_3211 subr_xxx.o: subr_xxx.c $Revision: 1.56.77.4 $ $Date: 93/10/11 10:53:58 $ PATCH_8.07 PHKL_3211 vfs.o: vfs.c $Revision: 1.18.77.6 $ $Date: 93/10/11 11:03:29 $ PATCH_8.07 PHKL_3211 vfs_vm.o: vfs_vm.c $Revision: 1.11.77.4 $ $Date: 93/10/11 11:04:51 $ PATCH_8.07 PHKL_3211 vm_devswap.o: vm_devswap.c $Revision: 1.14.77.4 $ $Date: 93/10/11 11:06:10 $ PATCH_8.07 PHKL_3211 vm_fault.o: vm_fault.c $Revision: 1.16.77.5 $ $Date: 93/10/11 11:07:35 $ PATCH_8.07 PHKL_3211 vm_machdep.o: vm_machdep.c $Revision: 1.150.77.5 $ $Date: 93/10/11 10:48:16 $ PATCH_8.07 PHKL_3211 vm_misc.o: vm_misc.c $Revision: 1.8.77.4 $ $Date: 93/10/11 11:08:40 $ PATCH_8.07 PHKL_3211 vm_page.o: vm_page.c $Revision: 1.85.77.4 $ $Date: 93/10/11 11:10:48 $ PATCH_8.07 PHKL_3211 vm_pregion.o: vm_pregion.c $Revision: 1.11.77.4 $ $Date: 93/10/11 11:12:09 $ PATCH_8.07 PHKL_3211 vm_region.o: vm_region.c $Revision: 1.16.77.4 $ $Date: 93/10/11 11:13:25 $ PATCH_8.07 PHKL_3211 PATCH_8.07: vm_region.o 1.11.61.3 92/03/06 vm_sched.o: vm_sched.c $Revision: 1.53.77.4 $ $Date: 93/10/11 11:14:46 $ PATCH_8.07 PHKL_3211 vm_swalloc.o: vm_swalloc.c $Revision: 1.13.77.6 $ $Date: 93/10/11 11:16:05 $ PATCH_8.07 PHKL_3211 vm_swp.o: vm_swp.c $Revision: 1.44.77.4 $ $Date: 93/10/11 11:18:27 $ PATCH_8.07 PHKL_3211 vm_vhand.o: vm_vhand.c $Revision: 1.15.77.5 $ $Date: 93/10/11 11:18:10 $ PATCH_8.07 PHKL_3211 "sum" output: 25384 32 asm_utl.o 12887 344 config 35595 75 genassym.o 34698 35 kern_exec.o 32937 24 kern_exit.o 27155 21 kern_fork.o 60893 21 kern_synch.o 58175 9 pm_proc.o 58709 13 pm_procdup.o 60455 7 resume.o 33028 13 sem_utl.o 45218 33 subr_xxx.o 49613 2 vfork.h 5787 28 vfs.o 58747 16 vfs_vm.o 10929 22 vm_devswap.o 45765 16 vm_fault.o 36461 79 vm_machdep.o 8653 20 vm_misc.o 14080 23 vm_page.o 21331 20 vm_pregion.o 5568 16 vm_region.o 22223 43 vm_sched.o 52180 37 vm_swalloc.o 16282 12 vm_swp.o 43775 26 vm_vhand.o Dependencies: None Supersedes: PHKL_0616 PHKL_0743 PHKL_0804 PHKL_0897 PHKL_0900 PHKL_1011 PHKL_1065 PHKL_1200 PHKL_1415 Patch Package Size: 584 Kbytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. Note: Please back up your system before you patch. --------------------------------------------------------------------------- After getting the patch onto your machine, unshar the patch (sh PHKL_3211). To install this patch do the following: 1) Run /etc/update (Note: you must be logged in as root to update a system). 2) Once in the update "Main Menu" move the highlighted line to "Change Source or Destination ->" and press "Return" or "Select Item". 3) Make sure the highlighted item in the "Change Source or Destination" window is "From Tape Device to Local System ...", then press "Return" or "Select Item". 4) You should now be in the "From Tape Device to Local System" window. Change the "Source: /dev/rmt/0m" to "Source: /tmp/PHKL_3211.updt" (this assumes that you are in the /tmp directory where PHKL_3211.updt has been placed). Note: You must enter the complete path name. 5) Press "Done". 6) From here on follow the standard directions for update. The customized script that update runs will move the original software to /system/PHKL_3211/orig. HP recommends keeping this software there in order to recover from any potential problems. It is also recommended that you move the PHKL_3211.text file to /system/PHKL_3211 to be retained for future reference. If you wish to put this patch on a magnetic tape and update from the tape drive, dd a copy of the patch to the tape drive. As an example the following will create a copy of the patch that update can read: dd if=PHKL_3211.updt of=/dev/rmt/0m bs=2048