{"id":49204568,"url":"https://github.com/qualcomm/userspace-resource-manager-extensions","last_synced_at":"2026-04-23T17:04:40.020Z","repository":{"id":336815204,"uuid":"1035431152","full_name":"qualcomm/userspace-resource-manager-extensions","owner":"qualcomm","description":"Userspace Resource Manager Extensions: Extension Configs \u0026 Plugins","archived":false,"fork":false,"pushed_at":"2026-04-08T10:28:30.000Z","size":485,"stargazers_count":0,"open_issues_count":2,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T12:20:12.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qualcomm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-10T11:40:03.000Z","updated_at":"2026-04-08T10:28:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/qualcomm/userspace-resource-manager-extensions","commit_stats":null,"previous_names":["qualcomm/userspace-resource-manager-extensions"],"tags_count":2,"template":false,"template_full_name":"qualcomm/qualcomm-repository-template","purl":"pkg:github/qualcomm/userspace-resource-manager-extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fuserspace-resource-manager-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fuserspace-resource-manager-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fuserspace-resource-manager-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fuserspace-resource-manager-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qualcomm","download_url":"https://codeload.github.com/qualcomm/userspace-resource-manager-extensions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qualcomm%2Fuserspace-resource-manager-extensions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32189670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T15:28:30.493Z","status":"ssl_error","status_checked_at":"2026-04-23T15:28:29.972Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-23T17:04:39.952Z","updated_at":"2026-04-23T17:04:40.009Z","avatar_url":"https://github.com/qualcomm.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Userspace Resource Manager Extensions (URM Extensions)\n\nOfficial repository for URM Extensions project. This project provides **customizations and extensions** for the [Userspace Resource Manager (URM)](https://github.com/qualcomm/userspace-resource-manager).\n\n## Overview\n\nThe **Userspace Resource Manager (URM)** provides a standard upstream framework for managing system resources through a well-defined set of resources and signals. However, different targets, segments, and use cases often require:\n\n- **Custom resources** beyond the standard upstream set\n- **Target-specific signals** tailored to particular usecase and hardware platforms\n- **Specialized resource provisioning logic** for unique scenarios\n\nThe **URM Extensions** framework enables developers to:\n\n- Add new custom resources and signals without modifying the core URM codebase\n- Override default resource handlers with custom implementations\n- Provide target-specific configurations for different hardware platforms\n- Extend URM functionality through a clean plugin architecture\n\n## What's Included\n\nThis repository contains:\n\n- **Extended Configurations**: Custom resource and signal configurations for specific targets\n- **Extension Modules**: Plugin implementations that extend URM's core functionality\n- **Target-Specific Configs**: Hardware-specific tuning parameters for platforms like qcm6490, qcs8300, qcs9100\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│         Userspace Resource Manager (URM)                │\n│  ┌──────────────────────────────────────────────────┐   │\n│  │  Standard Upstream Resources \u0026 Signals           │   │\n│  │  - CPU, GPU, Memory, Cgroups, etc.               │   │\n│  │  - Generic app lifecycle signals                 │   │\n│  └──────────────────────────────────────────────────┘   │\n│                         ▲                               │\n│                         │                               │\n│                         │ Extension Interface           │\n│                         │                               │\n└─────────────────────────┼───────────────────────────────┘\n                          │\n┌─────────────────────────┼────────────────────────────────┐\n│                         │                                │\n│    URM Extensions (This Project)                         │\n│  ┌──────────────────────┴──────────────────────────┐     │\n│  │  Custom Resources \u0026 Signals                     │     │\n│  │  - GPU resources (power levels, devfreq)        │     │\n│  │  - Multimedia signals (video decode, camera)    │     │\n│  │  - Target-specific optimizations                │     │\n│  └─────────────────────────────────────────────────┘     │\n│  ┌──────────────────────────────────────────────────┐    │\n│  │  Extensions                                      │    │\n│  │  - Custom resource handlers                      │    │\n│  │  - Post processing logic                         │    │\n│  │  - custom developer/customer specific features   │    │\n│  └──────────────────────────────────────────────────┘    │\n└──────────────────────────────────────────────────────────┘\n\n```\n\n## When to Use Extensions\n\nUse URM Extensions when you need to:\n\n| Scenario                                                      |                   Solution                                       |\n|---------------------------------------------------------------|------------------------------------------------------------------|\n| Add hardware-specific resources (e.g., vendor GPU controls)   | Define custom resources in `Configs/ResourcesConfig.yaml`        |\n| Implement target-specific signals                             | Add signal configurations in `Configs/SignalsConfig.yaml`        |\n| Override default resource provisioning logic                  | Register custom callbacks via extension APIs                     |\n| Support multiple hardware variants                            | Use target-specific config directories `Configs/target-specific` |\n| Add post-processing or validation logic                       | Implement extension modules                                      |\n\n## Branches\n\n**main**: Primary development branch. Contributors should develop submissions based on this branch, and submit pull requests to this branch.\n\n## Requirements\n\nThis project depends on the URM project:\n- **Repository**: https://github.com/qualcomm/userspace-resource-manager\n- **Required Libraries**: UrmExtApis, UrmAuxUtils\n- **Required Headers**: Urm/Extensions.h, Urm/UrmPlatformAL.h\n\n## Build and Install Instructions\n\n### On Ubuntu\n\n#### Step 1: Build and Install URM\n\nFirst, build and install the base URM framework:\n\n```bash\n# Follow the instructions at:\n# https://github.com/qualcomm/userspace-resource-manager#build-and-install-instructions\n```\n\nSuccessful completion of Step 1 ensures these dependencies are met.\n\n#### Step 2: Build and Install Extension Plugin\n\nBuild the extensions module:\n\n```bash\n# Create a build directory\nrm -rf build \u0026\u0026 mkdir build \u0026\u0026 cd build\n\n# Configure the project\ncmake .. -DCMAKE_INSTALL_PREFIX=/\n\n# Build the extensions project\ncmake --build .\n\n# Install (requires sudo)\nsudo cmake --install .\n```\n\n**What Step 2 Does**:\n- Builds the extension module (`RestunePlugin.so`)\n- Installs the library to `/usr/lib`\n- Installs custom configurations to `/etc/urm/custom/`\n\nWhen URM starts, it automatically loads `RestunePlugin.so` and applies the customizations.\n\n#### Step 3: Start URM Server\n\n```bash\n/usr/bin/urm\n```\n\nThe URM server will:\n1. Load the base upstream resources and signals\n2. Discover and load `RestunePlugin.so`\n3. Apply custom resources, signals, and handlers from the extensions\n4. Start serving requests with the extended functionality\n\n## Project Structure\n\n```\nuserspace-resource-manager-extensions/\n├── Configs/                         # Custom configuration files\n│   ├── InitConfig.yaml              # Initialization settings\n│   ├── ResourcesConfig.yaml         # Custom resource definitions\n│   ├── SignalsConfig.yaml           # Custom signal definitions\n│   ├── PerApp.yaml                  # Per-application configurations\n│   └── target-specific/             # Target-specific overrides\n│       ├── qcm6490/\n│       ├── qcs8300/\n│       └── qcs9100/\n├── Extensions/                      # Extension module implementations\n│   ├── CyclicTestsExt.cpp           # Example extension\n│   └── PostProcessingBlock.cpp      # Post-processing logic\n├── docs/                            # Detailed documentation\n│   └── README.md                    \n└── README.md                        # This file\n```\n\n## Examples: Adding Custom Resources\n\n### Example 1: I/O Scheduler\n\n#### 1. Define the Resource in Config\n\nAdd to `Configs/ResourcesConfig.yaml`:\n\n```yaml\nResourceConfigs:\n  - ResType: \"0x80\"                    # 0x80 reserved for Custom resources\n    ResID: \"0x0001\"                    # Custom ID\n    Name: \"RES_DISK_IO_SCHEDULER\"\n    Path: \"/sys/block/sda/queue/scheduler\"\n    Supported: true\n    HighThreshold: 3                   # Max scheduler index\n    LowThreshold: 0                    # Min scheduler index\n    Permissions: \"third_party\"\n    Policy: \"pass_through\"             # Always apply\n    # Scheduler mapping: 0=noop, 1=deadline, 2=cfq, 3=bfq\n```\n\n#### 2. (Optional) Register Custom Handler\n\nIn your extension module:\n\n```cpp\n#include \u003cUrm/Extensions.h\u003e\n\nint32_t applyCustomIoScheduler(void* res) {\n    // Custom logic to apply I/O scheduler\n    // Map numeric value to scheduler name\n    const char* schedulers[] = {\"noop\", \"deadline\", \"cfq\", \"bfq\"};\n    // Write scheduler name to sysfs\n    // ...\n    return 0;\n}\n\nint32_t teardownCustomIoScheduler(void* res) {\n    // Custom logic to restore default I/O scheduler\n    // Reset to system default scheduler\n    // ...\n    return 0;\n}\n\n// Register the custom handlers\nURM_REGISTER_RES_APPLIER_CB(0x00800001, applyCustomIoScheduler);\nURM_REGISTER_RES_TEAR_CB(0x00800001, teardownCustomIoScheduler);\n```\n\n#### 3. Use in Client Code\n\n```cpp\n#include \u003cUrm/UrmAPIs.h\u003e\n\nSysResource resource;\nresource.mResCode = 0x00060001;  // RES_DISK_IO_SCHEDULER\nresource.mResInfo = 0;\nresource.mNumValues = 1;\nresource.mResValue.value = 2;    // Set scheduler to 'cfq'\nint64_t duration = 5000; /*milli seconds*/\nint32_t properties = 0;\nint32_t numRes = 1;\n\nint64_t handle = tuneResources(duration, properties, numRes, \u0026resource);\n```\n\n### Example 2: KGSL GPU\n\n#### 1. Define the Resource in Config\n\nAdd to `Configs/ResourcesConfig.yaml`:\n\n```yaml\nResourceConfigs:\n  - ResType: \"0x80\"                    # GPU resource type\n    ResID: \"0x0003\"                    # Custom ID\n    Name: \"RES_KGSL_DEF_PWRLEVEL\"\n    Path: \"/sys/class/kgsl/kgsl-3d0/default_pwrlevel\"\n    Supported: true\n    HighThreshold: 6\n    LowThreshold: 0\n    Permissions: \"third_party\"\n    Modes: [\"display_on\", \"doze\"]\n    Policy: \"lower_is_better\"\n```\n\n#### 2. (Optional) Register Custom Handler\n\nIn your extension module:\n\n```cpp\n#include \u003cUrm/Extensions.h\u003e\n\nint32_t applyCustomGpuPowerLevel(void* res) {\n    // Custom logic to apply GPU power level\n    // ...\n    return 0;\n}\n\nint32_t teardownCustomGpuPowerLevel(void* res) {\n    // Custom logic to restore default GPU power level\n    // Reset to default power level\n    // ...\n    return 0;\n}\n\n// Register the custom handlers\nURM_REGISTER_RES_APPLIER_CB(0x00800003, applyCustomGpuPowerLevel);\nURM_REGISTER_RES_TEAR_CB(0x00800003, teardownCustomGpuPowerLevel);\n```\n\n#### 3. Use in Client Code\n\n```cpp\n#include \u003cUrm/UrmAPIs.h\u003e\n\nSysResource resource;\nresource.mResCode = 0x00050003;  // RES_KGSL_DEF_PWRLEVEL\nresource.mResInfo = 0;\nresource.mNumValues = 1;\nresource.mResValue.value = 3;    // Set power level to 3\nint64_t duration = 5000; /*milli seconds*/\nint32_t properties = 0;\nint32_t numRes = 1;\n\nint64_t handle = tuneResources(duration, properties, numRes, \u0026resource);\n```\n\n## Documentation\n\nFor detailed documentation on:\n- Available custom resources and signals\n- Extension API reference\n- Target-specific configurations\n- Development guidelines\n\nPlease refer to: [`docs/README.md`](docs/README.md)\n\n## Development\n\n### Contributing\n\nWe welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) file for:\n- Code style guidelines\n- Pull request process\n- Testing requirements\n- Documentation standards\n\n### Adding New Extensions\n\n1. Define your custom resources/signals in the appropriate config files\n2. Implement extension modules in the `Extensions/` directory\n3. Register callbacks using the extension API\n4. Test thoroughly on target hardware\n5. Submit a pull request with documentation\n\n## Getting in Contact\n\nFor questions, issues, or discussions:\n\n* [Report an Issue on GitHub](../../issues)\n* [Open a Discussion on GitHub](../../discussions)\n* [E-mail us](mailto:maintainers.resource-tuner-moderator@qti.qualcomm.com) for general questions\n\n## License\n\n*userspace-resource-manager-extensions* is licensed under the [BSD-3-Clause-Clear license](https://spdx.org/licenses/BSD-3-Clause-Clear.html). See [LICENSE.txt](LICENSE.txt) for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualcomm%2Fuserspace-resource-manager-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqualcomm%2Fuserspace-resource-manager-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqualcomm%2Fuserspace-resource-manager-extensions/lists"}