Contact Us Contact Us

VFS-LOCKF-ENH

  Software Depot
Electronic download
Frequently asked questions
HP Inc. Software Depot
Product details and specifications
Select
Overview

VFS-LOCKF-ENH delivers an enhanced file segment lock kernel module named vfs_lock_enh in the Virtual File System (VFS) layer.

 

What's new in the version 3.0

This release of VFS-LOCKF-ENH contains an enhancement (QXCR1001524694) to improve file segment locking feature.

What's new in the version 2.0

VFS-LOCKF-ENH version 2.0 provides the enhanced Virtual File System Kernel module namely vfs_lock_enh to avoid thundering herd caused by a application which calls read(2) or write(2) system call on a file along with locking and unlocking the same file using lockf64(2) system call for the same range. As thundering herd is avoided, the processes calling the locking mechanism as above scenario follows FIFO (First In First Out) policy for lock requests for almost all situations in a heavy workload.

For example:

To initialise/edit use the below steps:

echo "Avoid_Kill_Hold_Count/=400" | adb -w /stand/vmunix /dev/kmem

echo "Sleep_Time/=400" | adb -w /stand/vmunix /dev/kmem

Please note the value used for initialization is a hexadecimal value.

To display use the below steps:

echo "Avoid_Kill_Hold_Count/D" | adb -o /stand/vmunix /dev/kmem

echo "Sleep_Time/D" | adb -o /stand/vmunix /dev/kmem

Please note the values need to be tuned according to the workload. The values to be initialized are directly proportional to the workload.

To Disable the fix, initialize the above two variables with zero.

Limitation: The fix avoids almost all the thundering herd occurrence for a same range locks. But still there are rare situation where we cannot avoid thundering herd.

New feature

-       64-bit file segment lock.

 

VFS-LOCKF-ENH provides the enhanced Virtual File System kernel module vfs_lock_enh to support the 64-bit file segment lock feature for lockf(2) and fcntl(2) system calls on HP-UX irrespective of the maximum file size supported by the physical file system.

 

When a file lock range with lock start or end greater than 2TB or maximum file size supported by underlying file system is requested through the fcntl(2) and lockf(2) system calls, the current HP-UX implementation fails with an Invalid argument(EINVAL) error.

 

For instance, consider a 64-bit application requesting a file lock through fcntl(2) that starts at 9223372036854775807 and the length of 0 on a file which resides on the HFS file system. Such a lock start and the end are beyond 2TB, system calls fcntl(2) or lockf(2) fail with the EINVAL error.

 

Delivery of the solution

The complete solution is delivered in four Enablement Patches (EPs) and one New Core Functionality (NCF) bundle form as described below.

 

-      NCF kernel module:

vfs_lock_enh:

This module delivers the changes in the fcntl(2), lockf(2), pstat_getfiledetails(2) system calls and the kernel interfaces in VFS layer that are required to provide the 64-bit file segment lock feature.

 

  EP Patches:

-       PHKL_42307 : 11.31 fs_filedscrp cumulative patch

Delivers the changes required in fcntl(2) system call to enable the 64-bit file segment lock feature.

 

-       PHKL_42308: 11.31 fs_pstat cumulative patch

Delivers the changes required in pstat_getfiledetails(2) system call to enable the 64-bit file segment lock feature.

 

-       PHKL_42309: 11.31 vfs_lock cumulative patch

Delivers the changes required in kernel interfaces in the VFS layer to enable the 64-bit file segment lock feature.

 

-       PHKL_42310: 11.31 vfs_scalls override_umask,cumulative patch

Delivers the changes required in lockf(2) system call to enable the 64-bit file segment lock feature.  

Warnings:

     Problem: In supporting 64-bit file segment lock enabled by VFS-LOCKF-ENH, the internal representation of the lower bound and upper bound of a file locking range has been changed to inclusive bounds. VOP_LOCKCTL() takes care of adjusting the external exclusive bounds to convert them to inclusive bounds when VFS-LOCKF-ENH is installed. Under a specific scenario whereby an NFSv4 server has stopped transiently and failed to process unlock requests from a client, the NFS reaper thread will have to call cleanlocks() to clean up the locks at cache timeout. But cleanlocks() incorrectly passes in the internal inclusive bounds when issuing VOP_LOCKCTL() to perform the unlock operation and these already inclusive bounds are being adjusted once again making them smaller than the intended range to be unlocked. The result is that not the entire range is being unlocked, leaving stale locks behind which triggers the panic.

Solution: The fix in cleanlocks() was released through  a VFS hot patch PHKL_44419 as part of a web release in Jan 2016.

Notes:

-      For the solution to work as expected, all the 4 Enablement Patches must be installed. The behavior is not specified if any one of the patches is not installed.

-   The 64-bit file segment lock feature enhances the file segment lock to the 64-bit offsets only for fcntl(2) and lockf(2) system calls. This solution does not alter the maximum file size supported by the physical file system for other file system operations like read(2), write(2). Hence a read(2)or write(2) request on a file with an offset or size that is beyond the end of file or the maximum file size supported by the physical file system will still fail.

 

 

Updated: December 2017

 

 
Additional product information
Product #: VfsLockfEnh
Version: 3.0
Software specification: 11.31 (vfs_lockf_enh_r11.31_ver3.depot)
Installation
Select