Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilize the module registry #732

Open
wants to merge 1 commit into
base: v3.x/staging
Choose a base branch
from

Conversation

ifakhrutdinov
Copy link
Contributor

@ifakhrutdinov ifakhrutdinov commented Sep 26, 2024

Proposed changes

To decrease the ZIS LPA footprint, ZIS will use the module registry for its plug-in modules. When not in dev mode, ZIS will use the module registry API for adding plug-in modules to the LPA, and if a module is already registered, ZIS will reuse the existing LPA info. In dev mode, ZIS will load its own copy of plug-in modules to the LPA, just as it does now.

This PR depends upon the following PRs: zowe/zowe-common-c#492

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

PR Checklist

Please delete options that are not relevant.

  • If the changes in this PR are meant for the next release / mainline, this PR targets the "staging" branch.
  • My code follows the style guidelines of this project (see: Contributing guideline)
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Relevant update to CHANGELOG.md
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works, or describe a test method below

Testing

Adding a module to the registry

  • Upgrade your ZIS;
  • Start the ZIS instance with dynamic linkage on;
  • Check that SYSPRINT has the following messages:
    • ZWES0258I Module status: new instance added to registry (10D80000) (the address in the brackets will likely be different, and the same true for the other messages in this testing strategy text);
    • ZWES0022I Module KAYSISDL status: new instance added to registry (110B1000);
  • Restart the ZIS instance;
  • Check that SYSPRINT has the following messages:
    • ZWES0258I Module status: previously added/loaded instance reused (10D80000);
    • ZWES0022I Module KAYSISDL status: previously added/loaded instance reused (110B1000).

Module sharing

For the next test, you'll need another ZIS instance upgraded to the same level as the original instance.

  • Start another ZIS instance;
  • Check that SYSPRINT has the following messages:
    • ZWES0258I Module status: instance reused from registry (10D80000);
    • ZWES0022I Module KAYSISDL status: instance reused from registry (110B1000);
  • Restart the ZIS instance;
  • Check that SYSPRINT has the following messages:
    • ZWES0258I Module status: previously added/loaded instance reused (10D80000);
    • ZWES0022I Module KAYSISDL status: previously added/loaded instance reused (110B1000).

Non-eligible module

For this test, you will need a plug-in module which does not use the new feature; i.e., the plug-in does not use the MODREG_MARK_MODULE macro.

  • Start a ZIS instance with your legacy plug-in, and with the COLD option (S zisstc,,,COLD,REUSASID=YES);
  • Check that SYSPRINT has the following messages:
    • ZWES0023I Module <name of your plug-in module> not eligible for registry, proceeding with LPA ADD;
    • ZWES0022I Module <name of your plug-in module> status: own instance loaded to LPA (10BD1000).

Non-LPA module

For this test, you will need a plug-in module which does not use the LPA.

  • Start a ZIS instance with your non-LPA plug-in;
  • Check that SYSPRINT has the following messages:
    • ZWES0022I Module <name of your plug-in module> status: private storage instance used.

Registry disablement via the new parameter

  • Add ZWES.MODULE_REGISTRY=NO to the PARMLIB member of your ZIS;
  • Start your ZIS with the COLD option (S zisstc,,,COLD,REUSASID=YES);
  • Check that SYSPRINT has the following messages:
    • ZWES0258I Module status: own instance loaded to LPA (10BD1000);
    • ZWES0022I Module KAYSISDL status: own instance loaded to LPA (10B49000).

Registry disablement via the dev option

  • Remove ZWES.MODULE_REGISTRY=NO and add ZWES.DEV_MODE.LPA=YES to the PARMLIB member of your ZIS;
  • Start your ZIS with the COLD option (S zisstc,,,COLD,REUSASID=YES);
  • Check that SYSPRINT has the following messages:
    • ZWES0258I Module status: own instance loaded to LPA (10BD1000);
    • ZWES0022I Module KAYSISDL status: own instance loaded to LPA (10B49000).

@ifakhrutdinov ifakhrutdinov force-pushed the feature/module-registry branch 11 times, most recently from c5c344f to 6d323e9 Compare October 1, 2024 19:25
To decrease the ZIS LPA footprint, ZIS will use the module registry for
its plug-in modules. When not in dev mode, ZIS will use the module
registry API for adding plug-in modules to the LPA, and if a module is
already registered, ZIS will reuse the existing LPA info. In dev mode,
ZIS will load its own copy of plug-in modules to the LPA, just as it
does now.

Signed-off-by: Irek Fakhrutdinov <[email protected]>
@ifakhrutdinov ifakhrutdinov self-assigned this Oct 1, 2024
@ifakhrutdinov ifakhrutdinov added the enhancement New feature or request label Oct 1, 2024
@ifakhrutdinov ifakhrutdinov marked this pull request as ready for review October 1, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant