Method and system for dynamic perception and allocation of virtualized resources based on partition pass-through

CN122309130APending Publication Date: 2026-06-30MASSCLOUDS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MASSCLOUDS
Filing Date
2026-02-06
Publication Date
2026-06-30

Smart Images

  • Figure CN122309130A_ABST
    Figure CN122309130A_ABST
Patent Text Reader

Abstract

This disclosure provides a method and system for dynamic perception and allocation of virtualized resources based on partition passthrough, relating to the field of virtualized resource perception technology. The method includes: acquiring client access requests for target resources and extracting multiple access characteristics such as access type, scope, latency sensitivity, and estimated usage; based on these access characteristics, dynamically determining a list of partitions corresponding to the target physical resource according to a preset perception strategy and global resource status, and constructing a mapping relationship from virtual view to physical partitions; filtering the partition list to obtain a candidate set, selecting the target partition from the candidate set based on a selection strategy and executing an allocation decision, establishing an access path through a passthrough mechanism; and when it is detected that a client no longer accesses a resource or the demand drops below a threshold, revoking part or all of the allocation based on a preset strategy and reclaiming the resource to the global resource pool. This disclosure results in lower resource consumption at startup and higher overall utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of virtualization resource awareness technology, specifically to a method and system for dynamic awareness and allocation of virtualization resources based on partition passthrough. Background Technology

[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.

[0003] In existing virtual machine and cloud environments, guest machine resources are typically allocated in advance before startup. For example, to create a virtual machine, the number of vCPUs, memory size, and disk capacity must be determined beforehand. These resources remain largely unchanged throughout the guest machine's lifecycle. If adjustments are needed midway, migration, downtime for reconfiguration, or hot-swapping are usually required, which are cumbersome and coarse-grained.

[0004] While traditional dynamic scheduling schemes, such as DRS, can migrate and adjust based on historical usage in seconds or minutes, they are still based on the logic of pre-allocation before startup and cannot quickly respond to instantaneous access from clients and sudden loads.

[0005] While the existing partition passthrough architecture has the advantages of low overhead and fast response, the current implementation still binds a large resource quota at startup, which still has the following limitations: (1) In order to cope with peak load, a lot of resources need to be reserved at startup, resulting in low utilization in the long term; (2) It is not possible to make fine-grained adjustments based on the client's actual access patterns; (3) The advantages of fast access were not brought into play, and access could not be allocated in a timely manner as needed. Summary of the Invention

[0006] To address the aforementioned issues, this disclosure proposes a method and system for dynamic sensing and allocation of virtualized resources based on partition passthrough. Upon receiving a guest resource access request, the Hypervisor dynamically senses and allocates resources in real time, alleviating problems such as rigid pre-allocation, low utilization, and slow response.

[0007] According to some embodiments, the present disclosure adopts the following technical solutions: A method for dynamic awareness and allocation of virtualized resources based on partition passthrough includes: It acquires client access requests to target resources and extracts various access characteristics, including access type, scope, latency sensitivity, and estimated usage. Based on access characteristics, according to preset perception strategies and global resource status, the partition list corresponding to the target physical resource is dynamically determined, and the mapping relationship from virtual view to physical partition is constructed. The candidate set is obtained by filtering the partition list. The target partition is selected from the candidate set based on the selection strategy and the allocation decision is executed. An access path is established through the pass-through mechanism. When it is detected that a client no longer accesses a resource or the demand drops below a threshold, some or all of the allocations are revoked based on a preset policy and recycled back to the global resource pool.

[0008] According to some embodiments, the present disclosure adopts the following technical solutions: A virtual resource dynamic awareness and allocation system based on partition passthrough includes: The request acquisition module is used to acquire client access requests to target resources and extract various access characteristics such as access type, scope, latency sensitivity, and estimated usage. The perception module is used to dynamically determine the partition list corresponding to the target physical resource based on access characteristics, according to the preset perception strategy and the global resource status, and to build a mapping relationship from virtual view to physical partition. The allocation decision module is used to filter the partition list to obtain a candidate set, select the target partition from the candidate set based on the selection strategy and execute the allocation decision, and establish an access path through a pass-through mechanism; The resource reclamation module is used to revoke part or all of the allocation and reclaim it to the global resource pool when it is detected that a client no longer accesses a resource or the demand drops below a threshold, based on a preset strategy.

[0009] According to some embodiments, the present disclosure adopts the following technical solutions: A computer program product includes a computer program that, when executed by a processor, implements the aforementioned method for dynamic perception and allocation of virtualized resources based on partition passthrough.

[0010] According to some embodiments, the present disclosure adopts the following technical solutions: A non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the aforementioned method for dynamic perception and allocation of virtualized resources based on partition passthrough.

[0011] According to some embodiments, the present disclosure adopts the following technical solutions: An electronic device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the virtualization resource dynamic perception and allocation method based on partition passthrough.

[0012] Compared with the prior art, the beneficial effects of this disclosure are as follows: This disclosure presents a method for dynamic perception and allocation of virtualization resources based on partition passthrough. Upon startup, only the minimum boot resources required for operation are allocated, with computing power, memory, and I / O added only as needed, avoiding long-term hoarding for unexpected peak loads. Idle cores and memory are promptly returned to the partition pool, allowing for reuse by more instances and a more balanced resource allocation. This method consumes fewer resources at startup and achieves higher overall utilization.

[0013] This disclosure presents a method for dynamic perception and allocation of virtualization resources based on partition passthrough. When the number of CPU threads increases or the scheduling queue becomes long, vCPUs are added according to a strategy and bound to appropriate CPU partitions; they are then reclaimed when the load decreases. Memory is mapped segment by segment according to gPA page faults, and physical pages are reallocated only when the application actually uses them, avoiding large blocks of reserved memory. When I / O requires high bandwidth, it is passthrough to one SR-IOV VF or more queues; after the task is completed, the memory is released to reduce long-term occupation. The triggering link is short (Hypercall / VMExit / MMIO / page fault directly to the Hypervisor), which is closer to the real-time load than DRS that relies on minute-level statistics.

[0014] This disclosure presents a method for dynamic perception and allocation of virtualized resources based on partition passthrough. By establishing a direct mapping through IOMMU / secondary page tables, it eliminates one layer of forwarding and virtual interruption, resulting in more controllable latency and jitter. It is suitable for latency-sensitive scenarios such as real-time audio and video processing, small-batch inference, and online transactions; throughput-oriented scenarios can also benefit from lower virtual overhead.

[0015] This disclosure discloses a method for dynamic awareness and allocation of virtualized resources based on partition passthrough. High-QoS tenants can be configured with a guaranteed minimum number of cores / bandwidth and stricter latency thresholds; low-QoS tenants are preferentially downgraded or rejected when resources are scarce. Energy consumption is preferentially reduced to high-energy-efficiency partitions under low load, and idle partitions can be powered down or have their frequency reduced. Access boundaries are restricted by combining partition isolation levels and IOMMU; "soft / hard caps" and tenant-level / client-level quotas are supported.

[0016] This disclosure presents a method for dynamic perception and allocation of virtualized resources based on partition passthrough. Demand changes are primarily addressed through "mapping adjustments," minimizing disruption to business operations. The mapping table records access frequency and recent active time, automatically reclaiming idle resources to reduce the risk of resource leakage. Partition selection, binding, and reclamation are all tracked with events and statistics, facilitating capacity assessment, alerting, and auditing, resulting in lower operational costs and improved stability. Attached Figure Description

[0017] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure.

[0018] Figure 1This is an overall architecture diagram of the virtualization resource dynamic perception and allocation system based on partition passthrough according to an embodiment of this disclosure; Figure 2 This is a schematic diagram illustrating the resource allocation strategy and control in an embodiment of this disclosure; Figure 3 This is a flowchart of a method for dynamic sensing and allocation of virtualized resources based on partition passthrough according to an embodiment of this disclosure; Figure 4 This is a schematic diagram of dynamic resource mapping according to an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the memory-on-demand expansion of the second-level page table mapping update according to an embodiment of this disclosure; Figure 6 This is a schematic diagram of the dynamic scaling of ARM64 CPU partition pass-through in an embodiment of this disclosure. Detailed Implementation

[0019] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0020] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0021] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0022] Example 1 One embodiment of this disclosure provides a method for dynamic sensing and allocation of virtualized resources based on partition passthrough, the method steps of which include: Step 1: Obtain client access requests to the target resource and extract various access characteristics such as access type, scope, latency sensitivity, and estimated usage; Step 2: Based on access characteristics, according to the preset perception strategy and global resource status, dynamically determine the partition list corresponding to the target physical resource, and construct the mapping relationship from virtual view to physical partition; Step 3: Filter the partition list to obtain a candidate set, select the target partition from the candidate set based on the selection strategy and execute the allocation decision, and establish an access path through the pass-through mechanism; Step 4: When it is detected that a client no longer accesses a resource or the demand drops below a threshold, the allocation is revoked in part or in whole based on a preset policy and the resource is returned to the global resource pool.

[0023] As one embodiment, the disclosed method for dynamic awareness and allocation of virtualization resources based on partition passthrough is designed for virtualization technology, especially for virtualization scenarios using a partition passthrough architecture for resource management. Simply put, the hypervisor can immediately detect and allocate resources when a client has resource needs, rather than rigidly reserving resources in advance. Upon receiving a client's resource access request, the hypervisor dynamically detects and allocates resources in real time, alleviating problems such as rigid pre-allocation, low utilization, and slow response. The specific implementation process is as follows: Step 1: Obtain client access requests to the target resource and extract various access characteristics such as access type, scope, latency sensitivity, and estimated usage; Specifically, the Hypervisor layer receives client requests for access to target resources (such as CPU, memory, I / O, etc.) in real time and extracts features such as access type, scope, latency sensitivity, and estimated usage.

[0024] Furthermore, the overall data transmission architecture of the system consists of three relatively independent layers: the physical resource partitioning layer, the Hypervisor layer, and the client layer. The physical resource partitioning layer partitions CPU, memory, and I / O resources into manageable units. Each partition has type, capacity, isolation level, and performance attributes, supporting independent management and rapid binding. The Hypervisor layer handles access awareness, resource status maintenance, real-time scheduling and allocation, and mapping relationship maintenance. It detects requests through events such as Hypercall, VMExit, MMIO, and page faults in the second-level page table, selects target partitions based on policies and global status, and establishes direct access paths; it continuously maintains mappings and statistics, supporting scaling and reclamation. In the client layer, clients start with minimal boot resources, initiate resource requests as needed during operation, and resources are dynamically configured based on access behavior; reclamation is triggered when the load decreases, and resources are returned to the partition pool.

[0025] Furthermore, resource allocation strategies and quota controls are used to achieve secure and controllable resource allocation. Clients are treated as temporary tenants rather than long-term occupants, and the system sets hard / soft quota limits for them. When the limit is reached, downgrading allocation or stopping expansion is performed.

[0026] In resource-constrained scenarios, priority control is implemented based on Service Level (QoS), with higher-QoS clients receiving priority access to partition resources. Security is enhanced through client security authentication and resource partition isolation; sensitive partitions can only be bound to authorized clients, and I / O passthrough must be combined with IOMMU to restrict access to the authorized address space.

[0027] The implementation uses a centralized configuration file to describe the rules, which the Hypervisor reads and applies upon startup or reload. To simultaneously control long-term usage and allow short bursts, CPU, memory, and I / O are managed using a token bucket model. Setting the issuance rate and burst capacity, operations such as expanding vCPUs, mapping memory pages, and binding pass-through queues all consume corresponding tokens. A simplified configuration example is given below: qos: GOLD: {cpu_rate: 4, cpu_burst: 8, mem_rate_mb: 4096, mem_burst_mb:8192, io_rate_gbps: 10, io_burst_gbps: 20, weights: {alpha: 0.4, beta: 0.5, gamma: 0.1}, min_cores: 2} SILVER: {cpu_rate: 2, cpu_burst: 4, mem_rate_mb: 2048, mem_burst_mb:4096, io_rate_gbps: 5, io_burst_gbps: 10, weights: {alpha: 0.5, beta: 0.3, gamma: 0.2}, min_cores: 1} BRONZE: {cpu_rate: 1, cpu_burst: 2, mem_rate_mb: 1024, mem_burst_mb:2048, io_rate_gbps: 2, io_burst_gbps: 4, weights: {alpha: 0.6, beta: 0.2, gamma: 0.2}, min_cores: 0} degrade: cpu_util_threshold: 0.85 actions: GOLD:{allow_partial: true} SILVER: {allow_partial: true} BRONZE: {deny_on_high_util: true} Partition selection is based on a weighted score of the candidate set rather than a static threshold: partitions with higher remaining capacity, lower access latency, and lighter current load receive higher scores and are prioritized. After allocation, tokens are deducted, and the partition's used_capacity and mapping are updated; during the reclamation phase, the gradual return of recoverable tokens is supported to maintain system stability.

[0028] Upon detecting client access, the system first verifies the quota and token bucket balance; then it filters candidate partitions and calculates scores based on QoS weights to select the target partition; after successful allocation, the token is deducted and the partition usage and mapping are updated; when entering the recycling phase, statistical data is synchronized for the next round of scheduling and quota evaluation.

[0029] As one embodiment, the specific steps for a client to initiate an access request include: (1) Guest startup: In a lightweight virtualization environment, the Hypervisor allocates the minimum boot resources required for basic startup of the newly created guest, including: at least one vCPU and a certain amount of memory for loading the operating system kernel and basic processes.

[0030] Furthermore, a large number of CPU partitions, memory partitions, or I / O partitions were not pre-allocated to the client machines.

[0031] (2) The client initiates an access request When a client needs to access a specific type of target resource (such as expanding CPU computing power, accessing high-bandwidth I / O devices, or requesting additional memory) during operation, it initiates an access request in one of the following ways: 1) Hypercall Triggered User-mode or kernel-mode components within the client machine invoke the agreed-upon Hypercall interfaces (such as HCALL_REQ_CPU_PARTITION, HCALL_REQ_MEM_PARTITION, HCALL_REQ_IO_PARTITION) to explicitly request resources from the Hypervisor.

[0032] 2) Triggered by MMIO or I / O port access When a client accesses a pre-configured "on-demand pass-through trigger zone" (a special MMIO address range or I / O port), it triggers a VMExit event, which is then interpreted by the Hypervisor as a resource access request.

[0033] 3) Page fault triggered by a second-level page table (memory expansion) When a client accesses a region gPA that has not yet been mapped, an EPT / NPT page fault is triggered; if the address range belongs to the "Expand on Demand Region", the Hypervisor treats the page fault as a memory resource access request.

[0034] Step 2: Based on access characteristics, according to the preset perception strategy and global resource status, dynamically determine the partition list corresponding to the target physical resource, and construct the mapping relationship from virtual view to physical partition; Specifically, the Hypervisor's dynamic perception and decision-making process includes the following steps: (a) First, the access request structure is abstracted. The client access awareness module abstracts various events into a unified access request structure AccessRequest, with the following main fields: (1) guest_id: Client identifier; (2) res_type: resource type (CPU / MEM / IO); (3) access_addr: access address, port, or gPA range; (4) access_size: The size of the accessed data or the expected capacity; (5) latency_class: Access latency sensitivity level (e.g., REALTIME / NORMAL / BATCH). (6) qos_class: Service level flag; (7) estimated_demand: estimated demand (e.g., the number of additional vCPUs, memory pages, I / O bandwidth, etc.). (8) timestamp: The timestamp generated by the access request.

[0035] (II) Resource Status Acquisition and Decision-Making Process Based on access characteristics, and according to a preset perception strategy and global resource status, the system dynamically determines the list of partitions corresponding to the target physical resource, and constructs a mapping relationship from virtual view to physical partitions. The partition list is then filtered to obtain a candidate set. Based on a selection strategy, the target partition is selected from the candidate set and an allocation decision is executed. An access path is established through a pass-through mechanism. The specific process is as follows: (1) Obtain global resource status. Hypervisor queries the resource status monitoring submodule to obtain the partition list corresponding to the requested resource type and its current usage, including available capacity, load, historical access statistics, etc.

[0036] (2) Candidate partition filtering: Based on the resource type and QoS requirements in the AccessRequest, the partition set is filtered to form a candidate set C: 1) Filter partitions that do not meet the isolation level (isolation_level); 2) Zones with insufficient filtration capacity; 3) Filter closer partitions based on topology information (such as NUMA nodes, local / remote I / O) to reduce access latency.

[0037] (3) Candidate partition selection strategy: Select the target partition p from the candidate set C. One or a combination of the following strategies can be used: 1) If the client machine already has a bound partition, then select that partition first to reduce migration costs; 2) Otherwise, select from the partition with the lowest load or optimal latency; 3) Optimize selection by combining heuristics or weighted scoring functions: score = α (Remaining capacity ratio) +β (Performance Rating) -γ (Load factor) (4) Allocation decision, determine the target partition p Does the available capacity meet the estimated_demand? If the following conditions are met: allocate the required capacity to the client and update the partition's used_capacity; If not satisfied: you can try using multiple partitions for allocation (such as multi-CPU partition parallelism); Furthermore, a downgrade allocation may be performed based on a policy (e.g., allocating only a portion of the capacity and notifying the client agent).

[0038] (5) Output the results. The decision results are output to the mapping relationship maintenance module to drive subsequent mapping update or cancellation operations.

[0039] As one example, the process of dynamic allocation and mapping specifically includes: (1) The Hypervisor maintains the "client-partition mapping table". The mapping relationship maintenance submodule is responsible for inserting new mapping entries (initial allocation), updating the status and statistical attributes of existing entries, deleting or marking unused entries for recycling, etc. Its typical entry structure is as follows: GuestPartitionMapEntry { guest_id / / Client identifier partition_id / / Partition identifier res_type / / Resource type: CPU / MEM / IO bind_mode / / Binding mode: EXCLUSIVE / SHARED / BURST bind_state / / State: UNBOUND / BOUND / RECLAIMING last_access_ts / / Timestamp of the most recent access access_counter / / Total access count or access frequency within a period }

[0040] (2) Example of dynamic binding of CPU partition: 1. The decision module selected a CPU partition p_cpu; 2. The Hypervisor allocates one or more new vCPU objects to the client and binds these vCPUs to one or more physical cores on the p_cpu; 3. Update the virtual machine control structure (such as VMCS / VMCB) so that guest machines can use the newly added vCPUs in subsequent scheduling; 4. Add or update the corresponding GuestPartitionMapEntry in the mapping table, and set its status to BOUND.

[0041] (3) Example of dynamic mapping of memory partitions: 1. When a client accesses an unmapped gPA range and triggers a page fault in the second-level page table, the Hypervisor determines that the address belongs to the on-demand expansion region; 2. The hypervisor allocates a corresponding number of physical pages from a memory partition p_mem; 3. Establish the mapping from gPA to pPA in EPT / NPT; 4. Add / update the corresponding entry in the mapping table and record last_access_ts.

[0042] (4) Example of I / O partition pass-through 1. Clients request high-bandwidth I / O devices by accessing special MMIO areas or initiating Hypercalls; 2. The decision module selects an I / O partition p_io for it, such as SR-IOV VF; 3. Configure the Hypervisor IOMMU to map the client's IOVA space to the selected device; 4. Update the client's virtual device configuration so that subsequent accesses can directly pass through the IOMMU to the physical device; 5. Record the binding relationship in the mapping table and track access statistics.

[0043] Step 3: When it is detected that a client no longer accesses a resource or the demand drops below a threshold, the allocation is revoked in part or in whole based on a preset policy and the resource is recycled to the global resource pool.

[0044] Specifically, the Hypervisor periodically iterates through all GuestPartitionMapEntries, using metrics such as now-last_access_ts and access_counter to determine whether the partition is in an "idle" or "low-use" state for a particular client, and then performs resource reclamation, including: 1. If now - last_access_ts > T_idle and access_counter remains below the threshold for a period of time: 1) Change bind_state from BOUND to RECLAIMING; 2) Entering the resource recycling stage.

[0045] 2. Recycling methods for different types of resources: CPU partition: 1) Disable the running permissions of the corresponding vCPU and remove it from the scheduler; 2) Update the client configuration to mark the vCPU as no longer available.

[0046] Memory partitioning: 1) Revoke the EPT / NPT mapping for physical pages marked as "movable / cached"; 2) Reclaim it to the available pool of the p_mem partition.

[0047] I / O partition: 1) Cancel the relevant IOMMU mapping; 2) Reclaim SR-IOV VF or I / O channel resources and restore them to their initial placeholder state.

[0048] 3. After recycling is completed: 1) Update the partition's used_capacity and availability status; 2) Delete or reset GuestPartitionMapEntry to UNBOUND.

[0049] 4. By setting appropriate idle threshold T_idle and minimum hold time T_min_hold, jitter caused by frequent allocation / reclaim can be avoided.

[0050] As one embodiment, the triggering mechanism of this disclosure, in addition to common methods such as Hypercall, MMIO, and page faults, can also use other VMExit events (such as specific interrupts / exceptions) to trigger access awareness. As long as the idea of ​​"client initiates access → Hypervisor detects → dynamic allocation based on access" is followed, it can be considered an equivalent implementation.

[0051] Regarding the granularity and type of partitioning disclosed herein, some implementations only perform partition passthrough for CPU and memory, while network / storage I / O can continue to use traditional virtualization. For example, further partitioning can be done by cache, NUMA nodes, etc. Partition selection in this disclosure can use threshold strategies, heuristics, prediction based on historical data, or even reinforcement learning. Selecting and binding partitions from the resource partition pool according to a predetermined strategy upon triggering an access request all fall within the scope of this method.

[0052] Example 2 One embodiment of this disclosure provides a virtualization resource dynamic sensing and allocation system based on partition passthrough, including: The request acquisition module is used to acquire client access requests to target resources and extract various access characteristics such as access type, scope, latency sensitivity, and estimated usage. The perception module is used to dynamically determine the partition list corresponding to the target physical resource based on access characteristics, according to the preset perception strategy and the global resource status, and to build a mapping relationship from virtual view to physical partition. The allocation decision module is used to filter the partition list to obtain a candidate set, select the target partition from the candidate set based on the selection strategy and execute the allocation decision, and establish an access path through a pass-through mechanism; The resource reclamation module is used to revoke part or all of the allocation and reclaim it to the global resource pool when it is detected that a client no longer accesses a resource or the demand drops below a threshold, based on a preset strategy.

[0053] Example 3 One embodiment of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for dynamic perception and allocation of virtualized resources based on partition passthrough.

[0054] Example 4 One embodiment of this disclosure provides a non-transitory computer-readable storage medium for storing computer instructions. When these computer instructions are executed by a processor, they implement the aforementioned method for dynamic perception and allocation of virtualized resources based on partition passthrough.

[0055] Example 5 One embodiment of this disclosure provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the virtualization resource dynamic perception and allocation method based on partition passthrough.

[0056] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0057] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0058] While the specific embodiments of this disclosure have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of this disclosure. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this disclosure are still within the scope of protection of this disclosure.

Claims

1. A method for dynamic perception and allocation of virtualized resources based on partition pass-through, characterized in that, include: It acquires client access requests to target resources and extracts various access characteristics, including access type, scope, latency sensitivity, and estimated usage. Based on access characteristics, according to preset perception strategies and global resource status, the partition list corresponding to the target physical resource is dynamically determined, and the mapping relationship from virtual view to physical partition is constructed. The candidate set is obtained by filtering the partition list. The target partition is selected from the candidate set based on the selection strategy and the allocation decision is executed. An access path is established through the pass-through mechanism. When it is detected that a client no longer accesses a resource or the demand drops below a threshold, some or all of the allocations are revoked based on a preset policy and recycled back to the global resource pool.

2. The partition pass-through based virtualization resource dynamic sensing and allocating method according to claim 1, wherein, The client machine starts with minimal boot resources and initiates resource access requests as needed during operation. Resources are dynamically configured based on access behavior. The Hypervisor receives and senses the client machine's access requests for target resources in real time. Target resources include CPU, memory, and I / O.

3. The method for dynamic sensing and allocation of virtualized resources based on partition passthrough as described in claim 1, characterized in that, Upon detecting client access, the quota and token bucket balance are first verified; then candidate partitions are filtered and scores are calculated based on QoS weights to select the target partition; partition selection is based on the weighted score of the candidate set rather than a static threshold, and partitions with higher remaining capacity, lower access latency, and lighter current load are given higher scores and are selected first. After allocation, tokens are deducted and the partition's used_capacity and mapping relationship are updated.

4. The method for dynamic sensing and allocation of virtualized resources based on partition passthrough as described in claim 1, characterized in that, When a client needs to access a specific type of target resource during operation, it can initiate access requests in the following ways: Hypercall trigger: User-mode or kernel-mode components within the client machine call the agreed-upon Hypercall interface to explicitly request resources from the Hypervisor; MMIO or I / O port access trigger: The guest performs an access to the pre-configured "on-demand pass-through trigger zone", triggering the VMExit event, which is interpreted by the Hypervisor as a resource access request; Second-level page table page fault triggering: When a client accesses a region gPA that has not yet been mapped, an EPT / NPT page fault is triggered; if the address range belongs to the "On-Demand Extension Region", the Hypervisor will treat the page fault as a memory resource access request.

5. The method for dynamic sensing and allocation of virtualized resources based on partition passthrough as described in claim 1, characterized in that, Select the target partition p from the candidate set. The methods include: If the client already has a bound partition, that partition will be selected first to reduce migration costs; otherwise, the partition with the lowest load or best latency will be selected. Combine heuristic or weighted scoring function score = α (remaining capacity ratio) + β Performance rating - γ Use load factor to optimize selection.

6. The method for dynamic sensing and allocation of virtualized resources based on partition passthrough as described in claim 1, characterized in that, The allocation decision-making process includes: Determine the target partition p If the available capacity meets the estimated_demand, allocate the required capacity to the client and update the used_capacity of the partition; otherwise, use multiple partitions for allocation. Alternatively, a downgrade allocation can be implemented based on the strategy.

7. A virtualization resource dynamic sensing and allocation system based on partition passthrough, characterized in that, include: The request acquisition module is used to acquire client access requests to target resources and extract various access characteristics such as access type, scope, latency sensitivity, and estimated usage. The perception module is used to dynamically determine the partition list corresponding to the target physical resource based on access characteristics, according to the preset perception strategy and the global resource status, and to build a mapping relationship from virtual view to physical partition. The allocation decision module is used to filter the partition list to obtain a candidate set, select the target partition from the candidate set based on the selection strategy and execute the allocation decision, and establish an access path through a pass-through mechanism; The resource reclamation module is used to revoke part or all of the allocation and reclaim it to the global resource pool when it is detected that a client no longer accesses a resource or the demand drops below a threshold, based on a preset strategy.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for dynamic perception and allocation of virtualized resources based on partition passthrough as described in any one of claims 1-6.

9. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement the virtualization resource dynamic perception and allocation method based on partition passthrough as described in any one of claims 1-6.

10. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the virtualization resource dynamic sensing and allocation method based on partition passthrough as described in any one of claims 1-6.