Patch Name: PHKL_34926 Patch Description: s700_800 11.11 Buffer cache performance improvement patch Creation Date: 06/05/30 Post Date: 06/09/15 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP Automatic Reboot?: Yes Status: General Release Critical: No (superseded patches were critical) PHKL_32165: HANG PHKL_27266: OTHER Defect leads to unmountable NFS filesystems. PHKL_26518: HANG Hang - Filesystem or Process Hang PHKL_23154: PANIC Category Tags: defect_repair enhancement general_release critical panic halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHKL_34926 Symptoms: PHKL_34926: ( SR:8606432767 CR:JAGaf92206 ) After experiencing heavy memory usage, the Dynamic Buffer Cache was reduced from dbc_max_pct down to the dbc_min_pct. However, after memory was freed up, the Dynamic Buffer Cache would not grow back to dbc_max_pct and remained at dbc_min_pct, causing filesystem performance problems. PHKL_33367: ( SR:8606384017 CR:JAGaf44208 ) Unmounting a CacheFS may fail with the device busy error. PHKL_32165: ( SR:8606369345 CR:JAGaf29889 ) Applications that read a file from filesystems larger than or equal to 2TB or read block devices larger than or equal to 2TB will hang if the device block address where the data resides is close to the 2TB area on the block device. PHKL_30920: ( SR:8606312681 CR:JAGae75497 ) syncer(1M) consumes a lot of CPU time. A top report will indicate a 90 plus percentage usage of CPU. PHKL_27266: ( SR:8606203127 CR:JAGad72301 ) NFS File Systems fail to unmount with error "NFS umount failed: device busy". The File System can stay in this state forever or recover after a while. PHKL_27211: ( SR:8606247419 CR:JAGae13857 ) Enhancement: This product update is a member of a set which improve the performance of mount(2) and umount(2). The full list of product updates that address this performance improvement are: PHKL_26239, PHKL_26694, PHKL_26695, PHKL_26698, and PHKL_27211. Each of these product updates may be installed independently of the others. Each provides an incremental performance improvement. ( SR:8606261834 CR:JAGae26152 ) Enhancement: Improve performance of final close. In particular, this improves fsck(1M) execution time. PHKL_26518: ( SR:8606251259 CR:JAGae17325 ) ( SR:8606241742 CR:JAGae09000 ) Processes may hang related to Filesystem access. PHKL_24071: ( SR:8606173812 CR:JAGad43065 ) Enhancement: Provide real time (RTSCHED) priority scheduling of threads. This is being provided because certain time sensitive applications were aborting (timing out), due to some long running kernel paths. PHKL_23154: ( SR:8606173404 CR:JAGad42662 ) System may panic when using Instant Capacity On Demand (iCOD) to do instant processor deactivation. The stack trace reads: panic+0x6c report_trap_or_int_and_panic+0x94 trap+0xed4 nokgdb+0x8 dflush+0x88 sync_buffer_cache+0x14 tsync+0xe8 syscall+0x750 $syscallrtn+0x0 Defect Description: PHKL_34926: ( SR:8606432767 CR:JAGaf92206 ) The buffer cache routines are unable to reuse the buffer headers on the empty queue when they try to obtain a new buffer. Hence, expansion of the buffer cache fails, and an existing buffer is reused. Resolution: The buffers on the empty queue are now properly reused so that the buffer cache can be expanded. PHKL_33367: ( SR:8606384017 CR:JAGaf44208 ) The unmount failure is caused by not releasing a hold on the CacheFS vnode when the buffer associated with the CacheFS was released by the garbage collector. Resolution: Kernel changes are made to release the hold on the CacheFS vnode appropriately. PHKL_32165: ( SR:8606369345 CR:JAGaf29889 ) The defect is caused due to an integer overflow during detection of buffer overlaps that causes the kernel routine to go into an infinite loop and become unkillable. Resolution: variable used in detecting buffer overlaps was changed from a signed 32-bit to unsigned 32-bit integer. PHKL_30920: ( SR:8606312681 CR:JAGae75497 ) syncer(1M) consumes a lot of CPU time. This happens as the thread does not sleep at all. The syncer(1M) is designed such that each thread will sleep for a calculated period of time after flushing it's respective SPU list. However, under some circumstances, we could have many buffers which are marked as B_BUSY, idling in the sync queue. Due to this , the time computation routine of the syncer(1M) computes the sleep time as zero. So, the thread wakes up immediatly. Resolution: Modified the time calculation routine to exclude B_BUSY buffers. PHKL_27266: ( SR:8606203127 CR:JAGad72301 ) The umount failures occur because some vnodes in the NFS filesystem have active references which cannot be removed at the time of umount. These references are held by buffers which have been removed inappropriately from the list that NFS uses to manage buffer flush and buffer-to-vnode references. The vnode reference of the buffers is not being reduced before removing the buffers from the list. The umounts will continue to fail indefinitely until all such buffers are re-used. Resolution: The fix was to release the vnode references held by the buffers when they are being removed from the list. PHKL_27211: ( SR:8606247419 CR:JAGae13857 ) This product update contains minor changes necessary to improve the performance of mount(2) and umount(2) for all filesystems. We incorrectly held a lock to serialize all access to all filesystems for mount/umount service calls. These filesystems specific operations are already serialized where necessary, and the additional higher level serialization results in unnecessary performance degradation. Resolution: Removed the unnecessary use of a filesystem lock that used to unconditionally serialize all access to all filesystems for mount/umount service calls. ( SR:8606261834 CR:JAGae26152 ) 1. All of buffer cache is searched for buffers associated with the vnode being closed, even when there are none. 2. After each buffer is inspected, we check to see if it is time for a kernel preemption, in a very expensive manner. Resolution: 1. Before starting to loop through buffer cache for the vnode, verify that the vnode has at least one buffer associated with it. 2. Use a less expensive way to check if it is time for a kernel preemption. PHKL_26518: ( SR:8606251259 CR:JAGae17325 ) ( SR:8606241742 CR:JAGae09000 ) The problem is caused by a thread/process waiting on a buffer that it incorrectly believes is still owned by another process. The previous process failed to update the internal data structure used to show that the buffer is no longer in use. The new process sees this stale information, goes to sleep believing that the buffer is still in use, and never wakes up, which results in a filesystem hang. This was seen with a process accessing a VxFS 3.3 filessytem with Veritas NetBackup running. However, this defect is not specific to any one filesystem; it applies to all block filesystem access. Resolution: Change the code to modify the internal data before releasing the buffer and doing the wakeup. PHKL_24071: ( SR:8606173812 CR:JAGad43065 ) This is an enhancement to provide realtime (RTSCHED) scheduling of threads. Threads that were executing long running kernel paths kept running on the CPU while there were other threads waiting. If the waiting threads were time sensitive, they would abort without receiving any CPU time. Resolution: Long running kernel code paths were identified and preemption points were introduced in these paths. At these preemption points if there are any realtime threads waiting then the current thread is switched out and the real time thread is given an opportunity to run on the CPU. PHKL_23154: ( SR:8606173404 CR:JAGad42662 ) When a syncer thread is processing a dirty buffer list, and it gets preempted for a long time (>30 seconds) because of the instant processor deactivation activities, a new thread could be started by the syncer to process the same dirty list. If the new syncer thread cleans up some buffers from the dirty list, the old syncer thread may still have an old link address of the dirty list which has been set to NULL by the new syncer thread. The operating system will panic when the old syncer thread resumes and tries to access the NULL address. Resolution: The syncer will now validate an address before referencing it, and terminate if the address is NULL. Enhancement: No (superseded patches contained enhancements) PHKL_30920: Enhancements were delivered in a patch this one has superseded. Please review the Defect Description text for more information. SR: 8606432767 8606173404 8606173812 8606203127 8606241742 8606247419 8606251259 8606261834 8606312681 8606369345 8606384017 Patch Files: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libfs.a(vfs_bio.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libfs.a(vfs_bio.o) what(1) Output: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libfs.a(vfs_bio.o): vfs_bio.c $Date: 2006/05/21 23:02:08 $Revision: r11. 11/10 PATCH_11.11 (PHKL_34926) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libfs.a(vfs_bio.o): vfs_bio.c $Date: 2006/05/21 23:02:08 $Revision: r11. 11/10 PATCH_11.11 (PHKL_34926) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: 2280099771 44392 /usr/conf/lib/libfs.a(vfs_bio.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: 1569716107 102280 /usr/conf/lib/libfs.a(vfs_bio.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_33367 PHKL_32165 PHKL_30920 PHKL_27266 PHKL_27211 PHKL_26518 PHKL_24071 PHKL_23154 Equivalent Patches: PHKL_30709: s700: 11.00 s800: 11.00 Patch Package Size: 90 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. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHKL_34926 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_34926.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_34926. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHKL_34926.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_34926.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_34926.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None