BigAdmin System Administration Portal
Feature Tech Tip
Print-friendly VersionPrint-friendly Version

LOFS Mounted Platform-Specific Routine Libraries With CMT UltraSPARC Processor-Based Systems

Abhinandan Ekande, February 2009

Abstract

The Solaris 10 OS has the concept of a platform-specific routine (PSR) library, but PSR capability has been extended on chip multithreading (CMT) UltraSPARC processor-based systems running the Solaris 10 OS. On these systems, PSR capability has been extended to support multiple versions of platform-specific routines: one per processor, per platform. This allows a platform to support multiple processors, and each processor can be optimally utilized.

Overview

The Solaris 10 OS supports PSR capability, in which a platform can replace a set of library routines with an optimized version that is specific to the platform. The limitation of the platform-specific libraries approach has been that a platform could provide only one version of an optimized routine regardless of the processor types supported on that platform.

Now, on CMT UltraSPARC processor-based servers with CoolThreads technology that run the Solaris 10 OS, Sun has introduced support for multiple versions of PSRs, one per processor, per platform. This allows multiple processors to be supported per platform, and each processor can be optimally utilized. Please note that these libraries contain only optimized routines and not the entire libc.so.1 library routines.

Currently, there are two different versions of libc_psr_hwcap for CMT UltraSPARC processors: one for UltraSPARC T1 processors, named libc_psr_hwcap1.so.1 and a second for the UltraSPARC T2 family of processors, named libc_psr_hwcap2.so.1. These libraries are located in the following directories on the system:

/platform/`uname -i`/lib/libc_psr
/platform/`uname -i`/lib/sparcv9/libc_psr

To enable this functionality, bits are set in the shared object (.so). These bits are called hardware capabilities (HWCAP) bits, and they are required for using the correct version of the shared object.

The HWCAP bits can be viewed using either the file or elfdump commands. The elfdump command offers more detailed information than the file command. Mainly, the elfdump command provides the hexadecimal value of the bits (0x80 in the following example) as well as the HWCAP name (ASI_BLK_INIT in the following example).

A complete list of the HWCAP full names and values can be found in the /usr/include/sys/auxv_SPARC.h file.

Here is a list of the HWCAP bits for SPARC platforms:

The hardware capabilities are published for specific hardware. You can determine the hardware capabilities of your hardware using the isainfo -v command. For example, the hardware capabilities of a Sun Fire T2000 server are:

# isainfo -v
64-bit sparcv9 applications
        asi_blk_init
32-bit sparc applications
        asi_blk_init v8plus div32 mul32

The binding of a processor-specific library to a processor is done during boot by finding the optimal processor-specific platform library. Then the Loopback File System (LOFS) mounting mechanism is used to mount the optimal processor-specific platform library on top of the libc_psr.so.1 library.

Here is the output from a Sun Fire T2000 system for the libc_psr_hwcap1.so.1 library (the output has been truncated).

About the Author

Abhinandan Ekande is a Software Engineer in the Systems Group at Sun Microsystems.

For More Information

Here are some additional resources:


Comments (latest comments first)

Discuss and comment on this resource in the BigAdmin Wiki

Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


BigAdmin