VM Shared Kernel Support


 
Read disclaimer notice.

Note: 11 May 2009
 
The VM Share Kernel Support procedure documented on this page was created a few years ago for use with an older Linux Kernel.

  • Linux kernel 2.6.21 (including the Development stream) and later provides NSS support.
  • Linux kernel 2.6.16 (October 2005 stream) provides NSS support in the kernel patches.

For documentation about NSS, see "Device Drivers, Features, and Commands" book on the developerWorks documentation page. The 'Shared kernel support' chapter describes how you can create and maintain a Linux NSS.

If your Linux distribution supports the "VM shared kernel support" configuration option, the Linux kernel can be generated as a shareable NSS (named saved system). Once generated with this option, the system must be IPLed, stopped at location x'10000' and saved (from a class E user) with something like the following example from a 64M machine:

DEFSYS LXSHR 0-FF EW 100-2FF SR 300-4FF EW MINSIZE=64M
SAVESYS LXSHR

Once this is done, any VM user can IPL LXSHR and about 1.5M of the kernel is shared among all users. Obviously, the more Linux virtual machines running, the greater the benefit of using the shared system.

Note:
Every virtual machine that IPLs your shared system must have the same disk configuration as the system that was saved. That is, the disks must be at the same addresses and be the same sizes as the virtual machine that issued the SAVESYS command.

An example of how to use VM Shared Kernel Support

Below is a sample EXEC that can be used to help you create a shared Linux NSS. Once you have generated a kernel with the "VM shared kernel support" config option and have that kernel ready to IPL from a device, the EXEC can be used as follows:

Userid Class
The VM userid that will run the EXEC should be a class E VM userid.

Storage size
The userid virtual machine storage should be defined to whatever size you want as the minimum size of the virtual machine to IPL your shared system. At least 64M is recommended.

Invoking the SAVELX EXEC

   SAVELX system_name device_number

system_name
is the name you want to give to your shared system (e.g. lxshr)
device_number
is the device number that you usually IPL to start your Linux system.
CP may take a couple minutes to save your system. When the SAVELX EXEC is complete, the VM userid will be in CP READ mode and at that point you or another VM user will be able to start up your shared system. by issuing the command:

I system_name


Sample SAVELX EXEC

   /* SAVELX EXEC */

/* get the system name and device to ipl */
parse arg lxname devnum
lxname = strip(lxname)
devnum = strip(devnum)

/* figure out the line end character */
'pipe cp q term | var termout'
parse var termout one myend three
myend = strip(myend)

/* figure out the storage size */
'pipe cp q v stor | var storout'
parse var storout one two storsize

/* construct the defsys command */
DODEF = 'DEFSYS' lxname '0-FF EW 100-2FF SR 300-4FF EW'
dodef = dodef 'MINSIZE=' || storsize
say dodef
/* define the saved system */
dodef
/* arrange to stop the ipl processing at the appropriate spot, */
/* at which point a savesys will be issued */
SETSAVE = 'TRACE I R 010000 CMD SAVESYS' lxname
setsave = setsave || myend 'TRACE END ALL'
say setsave
setsave

doipl = 'i' devnum
say doipl

/* all set, issue the ipl */
doipl
exit

Disclaimer:
Information provided has been developed as a collection of the experiences of technical services professionals over a wide variety of customer and internal IBM environments, and may be limited in application to those specific hardware and software products and levels.

The information contained in this document has not been submitted to any formal IBM test. The use of this information or the implementation of any of these techniques is a customer responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. While each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will be obtained elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk, and in some environments may not achieve all the benefits described.

The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: International Business Machines Corporation provides this publication "as is" without warranty of any kind, either express or implied, including, but not limited to, the implied warranties of non-infringement, merchantability or fitness for a particular purpose. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of this publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice.

IBM may not offer the products, services, or feature discussed in this document in all countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.

COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purpose of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platforms for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.

Return to Sample

Return to VM and Linux resources page