CN108984427A - The processing method and processing device of memory in a kind of equipment based on Shen prestige framework - Google Patents
The processing method and processing device of memory in a kind of equipment based on Shen prestige framework Download PDFInfo
- Publication number
- CN108984427A CN108984427A CN201810764340.XA CN201810764340A CN108984427A CN 108984427 A CN108984427 A CN 108984427A CN 201810764340 A CN201810764340 A CN 201810764340A CN 108984427 A CN108984427 A CN 108984427A
- Authority
- CN
- China
- Prior art keywords
- memory
- pkb
- dma
- target
- identifier
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0815—Cache consistency protocols
- G06F12/0831—Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means
- G06F12/0835—Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means for main memory peripheral accesses (e.g. I/O or DMA)
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
- G06F12/1081—Address translation for peripheral access to main memory, e.g. direct memory access [DMA]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
本发明实施例提供一种基于申威架构的设备中内存的处理方法及装置,所述方法包括:在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取目标内存块;根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取目标内存块;分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。所述装置执行上述方法。本发明实施例提供的方法及装置,能够避免基于申威架构的设备出现无法收发报文的异常状况。
Embodiments of the present invention provide a method and device for processing memory in a device based on the Shenwei architecture. The method includes: obtaining the amount of memory used by the device to send and receive messages during the initialization process of the large page memory; The usage is the sum of the packet cache PKB memory usage and the direct memory access DMA memory usage; after each large page memory block merge is completed, the memory usage and the preset memory limit address are cut according to the memory usage and the preset memory limit address. A large block of large page memory to obtain a target memory block; filter in the memory to be allocated of the device according to the PKB identifier or DMA identifier to obtain a target memory block; allocate the target memory block to the PKB memory and the DMA memory for use by the PKB memory and the DMA memory. The apparatus performs the method described above. The method and device provided by the embodiments of the present invention can avoid the abnormal situation that the equipment based on the Shenwei architecture cannot send and receive messages.
Description
技术领域technical field
本发明实施例涉及硬件设备故障处理技术领域,具体涉及一种基于申威架构的设备中内存的处理方法及装置。The embodiment of the present invention relates to the technical field of hardware device failure processing, and in particular to a method and device for processing memory in a device based on the Shenwei architecture.
背景技术Background technique
在基于申威架构的设备(可以包括防火墙等硬件设备)初始化过程中会将大页内存页按照物理地址从小到大排序,并且将属于同一物理节点的物理地址连续的大页内存页进行合并,从而合并成为一个大页内存大块,将该大页内存大块交由一个内存描述符表(rte_memseg)来管理,不同的大页内存大块的物理地址可能是分隔不连续的。During the initialization process of Shenwei architecture-based devices (including hardware devices such as firewalls), the huge page memory pages will be sorted according to the physical address from small to large, and the large page memory pages with continuous physical addresses belonging to the same physical node will be merged. Thereby merging into a large memory block of large pages, which is managed by a memory descriptor table (rte_memseg), the physical addresses of different large memory blocks of large pages may be separated and discontinuous.
现有技术中在上述大页内存初始化时,只要是物理地址连续的大页内存页就连接整合成一个大页内存大块,未提供内存地址限制相关接口,同样数据包缓存(packetbuffer以下简称“PKB”)及DMA收发报文的内存分配也未提供内存地址限制相关接口,如此分配出来的PKB及DMA收发报文的内存不能保证是在预设内存限制地址之内,如果不在该预设内存限制地址内,会导致设备出现收发报文的异常状况,例如:在该设备的输入/输出内存管理单元(input/output memory management unit以下简称“IOMMU”)模式开启时会有网卡无法正常收发报文的情况出现。In the prior art, when the above-mentioned large page memory is initialized, as long as the large page memory pages with continuous physical addresses are connected and integrated into a large large page memory block, no interface related to memory address limitation is provided. Similarly, the packet buffer (hereinafter referred to as "packetbuffer" PKB") and memory allocation for sending and receiving messages by DMA do not provide memory address limit related interfaces, so the memory allocated for PKB and DMA sending and receiving messages cannot be guaranteed to be within the preset memory limit address, if it is not in the preset memory Within the restricted address, it will cause the device to have an abnormal situation of sending and receiving messages. For example, when the input/output memory management unit (input/output memory management unit hereinafter referred to as "IOMMU") mode of the device is turned on, the network card will not be able to send and receive messages normally. The situation of the text appears.
因此,如何避免上述缺陷,避免基于申威架构的设备出现无法收发报文的异常状况,成为亟须解决的问题。Therefore, how to avoid the above-mentioned defects and avoid the abnormal situation that the equipment based on the Shenwei architecture cannot send and receive messages has become an urgent problem to be solved.
发明内容Contents of the invention
针对现有技术存在的问题,本发明实施例提供一种基于申威架构的设备中内存的处理方法及装置。Aiming at the problems existing in the prior art, embodiments of the present invention provide a method and device for processing memory in a device based on the Shenwei architecture.
第一方面,本发明实施例提供一种基于申威架构的设备中内存的处理方法,所述方法包括:In the first aspect, an embodiment of the present invention provides a method for processing memory in a device based on the Shenwei architecture, the method including:
在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;In the process of initializing the large page memory, the memory usage required by the device to send and receive messages is obtained; the memory usage is the sum of the packet cache PKB memory usage and the direct memory access DMA memory usage;
在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块;After each large block of large page memory is merged, according to the memory usage and the preset memory limit address, the large memory block of the large page is cut to obtain the target memory block;
根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块;Filtering the memory to be allocated of the device according to the PKB identifier or the DMA identifier to obtain the target memory block; wherein the PKB identifier or the DMA identifier is used to mark the PKB memory or the DMA memory; The memory to be allocated includes several target memory blocks;
分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。Allocating the target memory block to the PKB memory and the DMA memory for use by the PKB memory and the DMA memory.
第二方面,本发明实施例提供一种基于申威架构的设备中内存的处理装置,所述装置包括:In the second aspect, an embodiment of the present invention provides a device for processing memory in a device based on the Shenwei architecture, and the device includes:
获取单元,用于在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;The acquisition unit is used to obtain the memory usage required by the device to send and receive messages during the initialization process of the large page memory; the memory usage is the sum of the packet cache PKB memory usage and the direct memory access DMA memory usage ;
切割单元,用于在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块;A cutting unit, configured to cut the large memory block of the huge page according to the memory usage and the preset memory limit address after each large block merge of the large page memory is completed, so as to obtain the target memory block;
过滤单元,用于根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块;A filtering unit, configured to filter in the memory to be allocated of the device according to the PKB identifier or the DMA identifier, so as to obtain the target memory block; wherein, the PKB identifier or the DMA identifier is used to mark the PKB memory or The DMA memory; the memory to be allocated includes several target memory blocks;
分配单元,用于分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。An allocating unit, configured to allocate the target memory block to the PKB memory and the DMA memory for use by the PKB memory and the DMA memory.
第三方面,本发明实施例提供一种基于申威架构的电子设备,包括:申威处理器、存储器和总线,其中,In a third aspect, an embodiment of the present invention provides an electronic device based on the Shenwei architecture, including: a Shenwei processor, a memory, and a bus, wherein,
所述申威处理器和所述存储器通过所述总线完成相互间的通信;The Shenwei processor and the memory complete mutual communication through the bus;
所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行如下方法:The memory stores program instructions executable by the processor, and the processor calls the program instructions to perform the following methods:
在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;In the process of initializing the large page memory, the memory usage required by the device to send and receive messages is obtained; the memory usage is the sum of the packet cache PKB memory usage and the direct memory access DMA memory usage;
在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块;After each large block of large page memory is merged, according to the memory usage and the preset memory limit address, the large memory block of the large page is cut to obtain the target memory block;
根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块;Filtering the memory to be allocated of the device according to the PKB identifier or the DMA identifier to obtain the target memory block; wherein the PKB identifier or the DMA identifier is used to mark the PKB memory or the DMA memory; The memory to be allocated includes several target memory blocks;
分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。Allocating the target memory block to the PKB memory and the DMA memory for use by the PKB memory and the DMA memory.
第四方面,本发明实施例提供一种非暂态计算机可读存储介质,包括:In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, including:
所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行如下方法:The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to perform the following method:
在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;In the process of initializing the large page memory, the memory usage required by the device to send and receive messages is obtained; the memory usage is the sum of the packet cache PKB memory usage and the direct memory access DMA memory usage;
在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块;After each large block of large page memory is merged, according to the memory usage and the preset memory limit address, the large memory block of the large page is cut to obtain the target memory block;
根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块;Filtering the memory to be allocated of the device according to the PKB identifier or the DMA identifier to obtain the target memory block; wherein the PKB identifier or the DMA identifier is used to mark the PKB memory or the DMA memory; The memory to be allocated includes several target memory blocks;
分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。Allocating the target memory block to the PKB memory and the DMA memory for use by the PKB memory and the DMA memory.
本发明实施例提供的基于申威架构的设备中内存的处理方法及装置,通过在大页内存初始化的过程中,根据设备收发报文所需的内存使用量和预设内存限制地址,切割获取到目标内存块;在内存分配的过程中,通过PKB内存标识或DMA内存标识在待分配内存中进行过滤,以获取、并分配目标内存块,能够避免基于申威架构的设备出现无法收发报文的异常状况。The method and device for processing the memory in the device based on the Shenwei architecture provided by the embodiments of the present invention cut and obtain the large page memory according to the memory usage required for the device to send and receive messages and the preset memory limit address during the initialization process of the large page memory. to the target memory block; in the process of memory allocation, filter the memory to be allocated through the PKB memory ID or DMA memory ID to obtain and allocate the target memory block, which can avoid the failure of sending and receiving messages in the device based on Shenwei architecture abnormal situation.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例基于申威架构的设备中内存的处理方法流程示意图;FIG. 1 is a schematic flowchart of a processing method for memory in a device based on the Shenwei architecture according to an embodiment of the present invention;
图2为本发明实施例基于申威架构的设备中内存的处理装置结构示意图;2 is a schematic structural diagram of a memory processing device in a device based on the Shenwei architecture according to an embodiment of the present invention;
图3为本发明实施例提供的电子设备实体结构示意图。FIG. 3 is a schematic diagram of a physical structure of an electronic device provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
图1为本发明实施例基于申威架构的设备中内存的处理方法流程示意图,如图1所示,本发明实施例提供的一种基于申威架构的设备中内存的处理方法,包括以下步骤:Fig. 1 is a schematic flowchart of a memory processing method in a device based on the Shenwei architecture according to an embodiment of the present invention. As shown in Fig. 1 , a method for processing memory in a device based on the Shenwei architecture provided by an embodiment of the present invention includes the following steps :
S101:在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和。S101: In the process of initializing the large page memory, acquire the memory usage required by the device to send and receive messages; the memory usage is the sum of the packet cache PKB memory usage and the direct memory access DMA memory usage.
具体的,装置在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和。装置可以理解为该设备中的具有逻辑运算功能的部件,用于执行本发明实施例的方法。可以通过在数据平面开发套件(Data Plane Development Kit,以下简称“DPDK”)中的rte_eal_hugepage_init()函数进行所述大页内存初始化,再通过使所述rte_eal_hugepage_init()函数调用memory_get_pkb_dma_size()函数获取所述内存使用量,需要说明的是:该memory_get_pkb_dma_size()函数基于该设备的所安装的内存封装有对应的预留PKB+DMA内存,例如设备所能支持的最大内存容量为8G,所安装的内存容量为4G(预留PKB+DMA内存从4G中扣取),则预留PKB+DMA内存可对应为自定义128M;所安装的内存容量为8G(预留PKB+DMA内存从8G中扣取),则预留PKB+DMA内存可对应为自定义256M。为了便于后续的比较计算,可以将该内存使用量进行单位换算成字节。Specifically, in the process of initializing the large page memory, the device obtains the memory usage required by the device to send and receive messages; the memory usage is the sum of the packet cache PKB memory usage and the direct memory access DMA memory usage. A device may be understood as a component in the device having a logic operation function, and is used to execute the method of the embodiment of the present invention. The huge page memory can be initialized through the rte_eal_hugepage_init() function in the Data Plane Development Kit (hereinafter referred to as "DPDK"), and then the rte_eal_hugepage_init() function can be used to call the memory_get_pkb_dma_size() function to obtain the Memory usage, what needs to be explained is: the memory_get_pkb_dma_size() function is based on the installed memory of the device, and the corresponding reserved PKB+DMA memory is packaged. For example, the maximum memory capacity that the device can support is 8G, and the installed memory capacity If it is 4G (reserved PKB+DMA memory is deducted from 4G), the reserved PKB+DMA memory can correspond to custom 128M; the installed memory capacity is 8G (reserved PKB+DMA memory is deducted from 8G) , the reserved PKB+DMA memory can correspond to a custom 256M. In order to facilitate subsequent comparison calculations, the memory usage can be converted into bytes.
S102:在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块。S102: Cut the huge page memory block according to the memory usage and the preset memory limit address after each huge page memory block merge is completed, so as to obtain the target memory block.
具体的,装置在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块。大页内存大块合并可以理解为在上述大页内存初始化的过程中进行的,预设内存限制地址的具体数值可以根据该设备的硬件信息的指标参数来确定,硬件信息可以包括CPU信息和/或PCI总线信息、与所述CPU信息对应的所述指标参数可以包括CPU的体系架构和/或主频,但不作具体限定;与所述PCI总线信息对应的所述指标参数可以包括PCI总线下挂的外设信息的参数,但不作具体限定。预设内存限制地址可以根据实际情况自主设置,可选为3G(0xC0000000)。切割的步骤具体可以包括:一次切割所述大页内存大块,以使切割后的两部分中的至少一部分对应的内存总量大于等于所述内存使用量、且该内存总量的起止地址小于所述预设内存限制地址;将所述至少一部分作为所述目标内存块。通常情况下,只需要对开始地址小于内存限制地址而结束地址大于内存限制地址的大页内存大块以内存限制地址为临界值进行切割即可,举例如下:假设预设内存限制地址选为3G(0xC0000000)、收发内存使用量选为128M,大页内存大块A内存大小为7G,其为起止地址跨内存限制地址的大块,可以一次将大页内存大块A以内存限制地址为临界值进行切割,以大页内存大块A开始地址到以内存限制地址3G(0xC0000000)为结束地址的一块作为第一部分;以及以内存限制地址3G(0xC0000000)为开始地址到以大页内存大块A结束地址的一块作为第二部分,假若切割后的第一部分内存总量大于所需收发内存使用量128M,则将切割后的第一部分作为目标内存块;而切割后的第二部分则不能作为目标内存块。对于另一种情况,假若大页内存大块B内存大小为1G,其为起止地址都小于内存限制地址的大块,且满足内存总量大于收发内存使用量128M,则该大页内存大块B则无需切割可直接作为目标内存块使用。Specifically, after each huge page memory chunk merge is completed, the device cuts the huge page memory chunk according to the memory usage and the preset memory limit address, so as to obtain the target memory block. Huge page memory block merging can be understood as being carried out during the above huge page memory initialization process. The specific value of the preset memory limit address can be determined according to the index parameters of the hardware information of the device. The hardware information can include CPU information and/or Or the PCI bus information, the index parameter corresponding to the CPU information can include the architecture and/or main frequency of the CPU, but not specifically limited; the index parameter corresponding to the PCI bus information can include The parameters of the hanging peripheral information, but not specifically limited. The preset memory limit address can be set independently according to the actual situation, and it can be 3G (0xC0000000). The step of cutting may specifically include: cutting the large block of the huge page memory at a time, so that the total amount of memory corresponding to at least one part of the two parts after cutting is greater than or equal to the amount of memory used, and the start and end addresses of the total amount of memory are less than The preset memory limit address; using the at least a part as the target memory block. Normally, it is only necessary to cut the large page memory block whose start address is smaller than the memory limit address and whose end address is greater than the memory limit address, using the memory limit address as the critical value. For example, assuming that the default memory limit address is selected as 3G (0xC0000000), the amount of sending and receiving memory is selected as 128M, and the memory size of large block A of huge page memory is 7G. The value is cut, and the first part is from the start address of the huge page memory block A to the end address of the memory limit address 3G (0xC0000000); and the start address of the memory limit address 3G (0xC0000000) to the large page memory block A block of the end address is used as the second part. If the total memory of the first part after cutting is greater than the required sending and receiving memory usage of 128M, the first part after cutting will be used as the target memory block; while the second part after cutting cannot be used as the target memory block. target memory block. For another situation, if the memory size of large block B of the huge page memory is 1G, it is a large block whose start and end addresses are smaller than the memory limit address, and the total amount of memory is greater than the memory usage of sending and receiving 128M, then the large memory block of the large page B can be directly used as the target memory block without cutting.
S103:根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块。S103: Filter the memory to be allocated of the device according to the PKB identifier or the DMA identifier to obtain the target memory block; wherein the PKB identifier or the DMA identifier is used to mark the PKB memory or the DMA memory; the memory to be allocated includes several target memory blocks.
具体的,装置根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块。PKB标识或DMA标识可以为所述PKB内存或所述DMA内存各自的名称字符串,该名称字符串可以在DPDK调用malloc_heap_alloc()函数对应位置写入,该malloc_heap_alloc()函数用于在剩余内存描述符表(free_memseg)中查找(调用find_suitable_element()函数)分配(调用malloc_elem_alloc()函数)所需的可用的内存。即该调用函数当检测到该名称字符串,即可获知所需的可用的内存是和所述PKB内存或所述DMA内存相关的。具体获取目标内存块的步骤可以为:根据PKB标识或DMA标识,对所述待分配内存中的目标大页内存大块直接跳过,直到获取到所述目标内存块;其中,所述目标大页内存大块的起止物理地址大于所述预设内存限制地址。参照上述举例:如果起止物理地址均大于内存限制地址3G,则直接跳过(内存按物理地址从高到低使用)。Specifically, the apparatus performs filtering in the memory to be allocated of the device according to the PKB identifier or the DMA identifier, so as to obtain the target memory block; wherein, the PKB identifier or the DMA identifier is used to mark the PKB memory or the The DMA memory; the memory to be allocated includes several target memory blocks. The PKB identifier or DMA identifier can be the respective name string of the PKB memory or the DMA memory, and the name string can be written in the corresponding position of the malloc_heap_alloc() function called by DPDK. The malloc_heap_alloc() function is used to describe the remaining memory Find (call find_suitable_element() function) available memory required for allocation (call malloc_elem_alloc() function) in character table (free_memseg). That is, when the calling function detects the name string, it can know that the required and available memory is related to the PKB memory or the DMA memory. The specific step of obtaining the target memory block may be: according to the PKB identifier or the DMA identifier, directly skip the target large page memory block in the memory to be allocated until the target memory block is obtained; wherein, the target large page The start and end physical addresses of the page memory block are greater than the preset memory limit address. Refer to the above example: if the start and end physical addresses are greater than the memory limit address 3G, skip directly (the memory is used according to the physical address from high to low).
更进一步地,可以通过在DPDK中调用find_suitable_element()函数,以使所述find_suitable_element()函数根据所述名称字符串,对所述待分配内存中的不满足过滤条件的大页内存大块直接跳过,直到获取到所述目标内存块。需要说明的是:其他非DMA内存和非PKB内存的处理流程不再本发明实施例考虑范围之内。Furthermore, the find_suitable_element() function can be called in DPDK, so that the find_suitable_element() function can jump directly to the large memory block of the large page in the memory to be allocated that does not meet the filtering condition according to the name string through until the target memory block is acquired. It should be noted that the processing flow of other non-DMA memory and non-PKB memory is not considered in the scope of the embodiment of the present invention.
S104:分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。S104: Allocate the target memory block to the PKB memory and the DMA memory, so as to be used by the PKB memory and the DMA memory.
具体的,装置分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。可以参照上述实施例中通过malloc_heap_alloc()函数在剩余内存描述符表(free_memseg)中查找(调用find_suitable_element()函数)分配(调用malloc_elem_alloc()函数)所需的可用的内存,以供所述PKB内存和所述DMA内存使用。Specifically, the device allocates the target memory block to the PKB memory and the DMA memory for use by the PKB memory and the DMA memory. Can look up (call find_suitable_element () function) in the remaining memory descriptor table (free_memseg) by malloc_heap_alloc () function in the above-mentioned embodiment and allocate (call malloc_elem_alloc () function) required available memory, for described PKB memory and the DMA memory usage.
本发明实施例提供的基于申威架构的设备中内存的处理方法,通过在大页内存初始化的过程中,根据设备收发报文所需的内存使用量和预设内存限制地址,切割获取到目标内存块;在内存分配的过程中,通过PKB内存标识或DMA内存标识在待分配内存中进行过滤,以获取、并分配目标内存块,能够避免基于申威架构的设备出现无法收发报文的异常状况。The embodiment of the present invention provides a method for processing memory in a device based on the Shenwei architecture. During the initialization process of the large page memory, according to the memory usage required by the device to send and receive messages and the preset memory limit address, the target is cut and obtained. Memory block; in the process of memory allocation, filter the memory to be allocated through the PKB memory ID or DMA memory ID to obtain and allocate the target memory block, which can avoid the abnormality that the device based on Shenwei architecture cannot send and receive messages situation.
在上述实施例的基础上,所述根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块,包括:On the basis of the above-mentioned embodiments, the cutting the huge page memory block according to the memory usage and the preset memory limit address to obtain the target memory block includes:
一次切割所述大页内存大块,以使切割后的两部分中的至少一部分对应的内存总量大于等于所述内存使用量、且所述内存总量的起止地址小于所述预设内存限制地址。Cut the huge page memory block at a time, so that the total amount of memory corresponding to at least one of the two parts after cutting is greater than or equal to the amount of memory used, and the start and end addresses of the total amount of memory are less than the preset memory limit address.
具体的,装置一次切割所述大页内存大块,以使切割后的两部分中的至少一部分对应的内存总量大于等于所述内存使用量、且所述内存总量的起止地址小于所述预设内存限制地址。可参照上述实施例,不再赘述。Specifically, the device cuts the large block of huge page memory at a time, so that the total amount of memory corresponding to at least one of the two parts after cutting is greater than or equal to the amount of memory used, and the start and end addresses of the total amount of memory are smaller than the Default memory limit address. Reference may be made to the foregoing embodiments, and details are not repeated here.
将所述至少一部分作为所述内存块。The at least one part is used as the memory block.
具体的,装置将所述至少一部分作为所述内存块。可参照上述实施例,不再赘述。Specifically, the device uses the at least a part as the memory block. Reference may be made to the foregoing embodiments, and details are not repeated here.
本发明实施例提供的基于申威架构的设备中内存的处理方法,使分割后的内存块对应的内存总量大于等于内存使用量、且该内存总量的起止地址小于预设内存限制地址,能够有效避免基于申威架构的设备出现无法收发报文的异常状况。The embodiment of the present invention provides a method for processing memory in a device based on the Shenwei architecture, so that the total amount of memory corresponding to the divided memory block is greater than or equal to the amount of memory used, and the start and end addresses of the total amount of memory are less than the preset memory limit address, It can effectively avoid the abnormal situation that the equipment based on Shenwei architecture cannot send and receive messages.
在上述实施例的基础上,所述根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块,包括:On the basis of the foregoing embodiments, the filtering in the memory to be allocated of the device according to the PKB identifier or the DMA identifier to obtain the target memory block includes:
根据所述PKB标识或所述DMA标识,对所述待分配内存中的目标大页内存大块直接跳过,直到获取到所述目标内存块;其中,所述目标大页内存大块的起止物理地址大于所述预设内存限制地址。According to the PKB identifier or the DMA identifier, directly skip the target huge page memory block in the memory to be allocated until the target memory block is obtained; wherein, the start and end of the target huge page memory block The physical address is greater than the preset memory limit address.
具体的,装置根据所述PKB标识或所述DMA标识,对所述待分配内存中的目标大页内存大块直接跳过,直到获取到所述目标内存块;其中,所述目标大页内存大块的起止物理地址大于所述预设内存限制地址。可参照上述实施例,不再赘述。Specifically, according to the PKB identifier or the DMA identifier, the device directly skips the target huge page memory block in the memory to be allocated until the target memory block is obtained; wherein, the target huge page memory The starting and ending physical addresses of the large block are greater than the preset memory limit address. Reference may be made to the foregoing embodiments, and details are not repeated here.
本发明实施例提供的基于申威架构的设备中内存的处理方法,通过在待分配内存中过滤掉目标大页内存大块,能够快速获取到目标内存块。The method for processing memory in a device based on the Shenwei architecture provided by the embodiment of the present invention can quickly obtain the target memory block by filtering out large blocks of target large page memory in the memory to be allocated.
在上述实施例的基础上,所述PKB标识或所述DMA标识标识为所述PKB内存或所述DMA内存各自的名称字符串;相应的,所述根据所述PKB标识或所述DMA标识,对所述待分配内存中的目标大页内存大块直接跳过,直到获取到所述目标内存块,包括:On the basis of the above embodiments, the PKB identifier or the DMA identifier is the respective name string of the PKB memory or the DMA memory; correspondingly, according to the PKB identifier or the DMA identifier, Directly skip the target large page memory block in the memory to be allocated until the target memory block is obtained, including:
通过在数据平面开发套件DPDK中调用find_suitable_element()函数,以使所述find_suitable_element()函数根据所述名称字符串,对所述待分配内存中的目标大页内存大块直接跳过,直到获取到所述目标内存块。By calling the find_suitable_element() function in the data plane development kit DPDK, the find_suitable_element() function will directly skip the target large page memory block in the memory to be allocated according to the name string until it is obtained The target memory block.
具体的,装置通过在数据平面开发套件DPDK中调用find_suitable_element()函数,以使所述find_suitable_element()函数根据所述名称字符串,对所述待分配内存中的目标大页内存大块直接跳过,直到获取到所述目标内存块。可参照上述实施例,不再赘述。Specifically, the device calls the find_suitable_element() function in the data plane development kit DPDK, so that the find_suitable_element() function directly skips the target large page memory block in the memory to be allocated according to the name string , until the target memory block is acquired. Reference may be made to the foregoing embodiments, and details are not repeated here.
本发明实施例提供的基于申威架构的设备中内存的处理方法,通过调用相应函数实现在待分配内存中过滤掉目标大页内存大块,进一步能够方便、有效和快速地获取到目标内存块。The method for processing memory in a device based on the Shenwei architecture provided by the embodiment of the present invention can filter out large blocks of target large page memory in the memory to be allocated by calling corresponding functions, and can further obtain the target memory block conveniently, effectively and quickly .
在上述实施例的基础上,所述获取设备所需要的内存使用量,包括:On the basis of the above embodiments, the acquisition of the memory usage required by the device includes:
通过在数据平面开发套件DPDK中的rte_eal_hugepage_init()函数进行所述大页内存初始化。The huge page memory initialization is performed through the rte_eal_hugepage_init() function in the data plane development kit DPDK.
具体的,装置通过在数据平面开发套件DPDK中的rte_eal_hugepage_init()函数进行所述大页内存初始化。可参照上述实施例,不再赘述。Specifically, the device initializes the huge page memory through the rte_eal_hugepage_init() function in the data plane development kit DPDK. Reference may be made to the foregoing embodiments, and details are not repeated here.
通过使所述rte_eal_hugepage_init()函数调用memory_get_pkb_dma_size()函数获取所述PKB和DMA内存使用量。Get the PKB and DMA memory usage by making the rte_eal_hugepage_init() function call the memory_get_pkb_dma_size() function.
具体的,装置通过使所述rte_eal_hugepage_init()函数调用memory_get_pkb_dma_size()函数获取所述PKB和DMA内存使用量。可参照上述实施例,不再赘述。Specifically, the device obtains the PKB and DMA memory usage by making the rte_eal_hugepage_init() function call the memory_get_pkb_dma_size() function. Reference may be made to the foregoing embodiments, and details are not repeated here.
本发明实施例提供的基于申威架构的设备中内存的处理方法,通过调用相应函数,能够快速、高效地获取内存使用量。The method for processing memory in a device based on the Shenwei architecture provided by the embodiment of the present invention can quickly and efficiently obtain memory usage by calling corresponding functions.
在上述实施例的基础上,所述方法还包括:On the basis of the foregoing embodiments, the method further includes:
获取所述设备的硬件信息。Get hardware information for the device.
具体的,装置获取所述设备的硬件信息。可参照上述实施例,不再赘述。Specifically, the device acquires hardware information of the device. Reference may be made to the foregoing embodiments, and details are not repeated here.
根据所述硬件信息的指标参数,确定所述预设内存限制地址的具体数值。The specific value of the preset memory limit address is determined according to the index parameter of the hardware information.
具体的,装置根据所述硬件信息的指标参数,确定所述预设内存限制地址的具体数值。可参照上述实施例,不再赘述。Specifically, the device determines the specific value of the preset memory limit address according to the index parameter of the hardware information. Reference may be made to the foregoing embodiments, and details are not repeated here.
本发明实施例提供的基于申威架构的设备中内存的处理方法,能够合理、准确地确定预设内存限制地址的具体数值。The method for processing the memory in the device based on the Shenwei architecture provided by the embodiment of the present invention can reasonably and accurately determine the specific value of the preset memory limit address.
在上述实施例的基础上,所述硬件信息包括CPU信息和/或PCI总线信息;相应的,与所述CPU信息对应的所述指标参数包括CPU的体系架构和/或主频;与所述PCI总线信息对应的所述指标参数包括PCI总线下挂的外设信息的参数。On the basis of the foregoing embodiments, the hardware information includes CPU information and/or PCI bus information; correspondingly, the index parameter corresponding to the CPU information includes CPU architecture and/or main frequency; The index parameters corresponding to the PCI bus information include parameters of peripheral device information connected to the PCI bus.
具体的,装置中的与所述CPU信息对应的所述指标参数包括CPU的体系架构和/或主频;与所述PCI总线信息对应的所述指标参数包括PCI总线下挂的外设信息的参数。可参照上述实施例,不再赘述。Specifically, the index parameter corresponding to the CPU information in the device includes the system architecture and/or main frequency of the CPU; the index parameter corresponding to the PCI bus information includes the peripheral information of the PCI bus parameter. Reference may be made to the foregoing embodiments, and details are not repeated here.
本发明实施例提供的基于申威架构的设备中内存的处理方法,通过CPU信息和/或PCI总线信息,以及分别对应的具体指标参数;能够进一步合理、准确地确定预设内存限制地址的具体数值。The method for processing memory in a device based on the Shenwei architecture provided by the embodiment of the present invention, through CPU information and/or PCI bus information, and corresponding specific index parameters; can further reasonably and accurately determine the specific address of the preset memory limit address value.
图2为本发明实施例基于申威架构的设备中内存的处理装置结构示意图,如图2所示,本发明实施例提供了一种基于申威架构的设备中内存的处理装置,包括获取单元201、切割单元202、过滤单元203和分配单元204,其中:Fig. 2 is a schematic structural diagram of a memory processing device in a device based on the Shenwei architecture according to an embodiment of the present invention. As shown in Fig. 2, an embodiment of the present invention provides a memory processing device in a device based on the Shenwei architecture, including an acquisition unit 201, cutting unit 202, filtering unit 203 and distribution unit 204, wherein:
获取单元201用于在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;切割单元202用于在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块;过滤单元203用于根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块;分配单元204用于分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。The obtaining unit 201 is used to obtain the memory usage required by the device to send and receive messages during the initialization process of the large page memory; the memory usage is the sum of the packet cache PKB memory usage and the direct memory access DMA memory usage ; The cutting unit 202 is used to cut the large memory block of the large page according to the memory usage and the preset memory limit address to obtain the target memory block after each large memory block merge is completed; the filtering unit 203 is used to filter the to-be-allocated memory of the device according to the PKB identifier or the DMA identifier, so as to obtain the target memory block; wherein, the PKB identifier or the DMA identifier is used to mark the PKB memory or the DMA memory; the memory to be allocated includes several target memory blocks; the allocation unit 204 is used to allocate the target memory block to the PKB memory and the DMA memory for the PKB memory and the DMA memory use.
具体的,获取单元201用于在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;切割单元202用于在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块;过滤单元203用于根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块;分配单元204用于分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。Specifically, the obtaining unit 201 is used to obtain the memory usage required by the device to send and receive messages during the initialization process of the large page memory; the memory usage is the data packet cache PKB memory usage and the direct memory access DMA memory usage The sum of the amount; the cutting unit 202 is used to cut the large memory block of the huge page according to the memory usage and the preset memory limit address after completing the large block merge of the large page memory, so as to obtain the target memory block ; The filtering unit 203 is used to filter in the memory to be allocated of the device according to the PKB identifier or the DMA identifier, so as to obtain the target memory block; wherein, the PKB identifier or the DMA identifier is used to mark the PKB memory Or the DMA memory; the memory to be allocated includes several target memory blocks; the allocation unit 204 is used to allocate the target memory block to the PKB memory and the DMA memory, for the PKB memory and the DMA memory usage described above.
本发明实施例提供的基于申威架构的设备中内存的处理装置,通过在大页内存初始化的过程中,根据设备所需的内存使用量和预设内存限制地址,切割获取到目标内存块;在内存分配的过程中,通过PKB内存标识或DMA内存标识在待分配内存中进行过滤,以获取、并分配目标内存块,能够避免基于申威架构的设备出现无法收发报文的异常状况。The memory processing device in the device based on the Shenwei architecture provided by the embodiment of the present invention cuts and obtains the target memory block according to the memory usage required by the device and the preset memory limit address during the initialization process of the large page memory; In the process of memory allocation, filter the memory to be allocated through PKB memory identification or DMA memory identification to obtain and allocate the target memory block, which can avoid the abnormal situation that the Shenwei architecture-based device cannot send and receive messages.
本发明实施例提供的基于申威架构的设备中内存的处理装置具体可以用于执行上述各方法实施例的处理流程,其功能在此不再赘述,可以参照上述方法实施例的详细描述。The memory processing device in the device based on the Shenwei architecture provided by the embodiment of the present invention can be specifically used to execute the processing procedures of the above-mentioned method embodiments, and its functions will not be described in detail here, and the detailed description of the above-mentioned method embodiments can be referred to.
图3为本发明实施例提供的电子设备实体结构示意图,如图3所示,所述基于申威架构的电子设备包括:申威处理器(processor)301、存储器(memory)302和总线303;FIG. 3 is a schematic diagram of the physical structure of the electronic device provided by the embodiment of the present invention. As shown in FIG. 3 , the electronic device based on the Shenwei architecture includes: a Shenwei processor (processor) 301, a memory (memory) 302 and a bus 303;
其中,所述申威处理器301、存储器302通过总线303完成相互间的通信;Wherein, the Shenwei processor 301 and the memory 302 complete mutual communication through the bus 303;
所述申威处理器301用于调用所述存储器302中的程序指令,以执行上述各方法实施例所提供的方法,例如包括:在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块;根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块;分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。The Shenwei processor 301 is used to call the program instructions in the memory 302 to execute the methods provided by the above method embodiments, for example, including: in the process of initializing the large page memory, obtaining the information required by the device to send and receive messages. memory usage; the memory usage is the sum of the packet cache PKB memory usage and the direct memory access DMA memory usage; Set the memory limit address, cut the large memory block of the huge page, to obtain the target memory block; filter in the memory to be allocated of the device according to the PKB identifier or the DMA identifier, to obtain the target memory block; wherein, The PKB identifier or the DMA identifier is used to mark the PKB memory or the DMA memory; the memory to be allocated includes several target memory blocks; the target memory block is allocated to the PKB memory and the DMA memory for use by the PKB memory and the DMA memory.
本实施例公开一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法实施例所提供的方法,例如包括:在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块;根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块;分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。This embodiment discloses a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by the computer, the computer The method provided by each of the above method embodiments can be executed, for example, including: in the process of initializing the large page memory, obtaining the memory usage required by the device to send and receive messages; the memory usage is the packet cache PKB memory usage and The sum of direct memory access DMA memory usage; after each huge page memory chunk merge is completed, according to the memory usage and the preset memory limit address, cut the huge page memory chunk to obtain the target A memory block; filter the memory to be allocated of the device according to the PKB identifier or the DMA identifier to obtain the target memory block; wherein the PKB identifier or the DMA identifier is used to mark the PKB memory or the DMA memory; the memory to be allocated includes several target memory blocks; allocating the target memory blocks to the PKB memory and the DMA memory for use by the PKB memory and the DMA memory.
本实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述各方法实施例所提供的方法,例如包括:在大页内存初始化的过程中,获取设备收发报文所需要的内存使用量;所述内存使用量是数据包缓存PKB内存使用量和直接内存存取DMA内存使用量之和;在每完成一次大页内存大块合并后,根据所述内存使用量和预设内存限制地址,切割所述大页内存大块,以获取所述目标内存块;根据PKB标识或DMA标识在所述设备的待分配内存中进行过滤,以获取所述目标内存块;其中,所述PKB标识或所述DMA标识用于标记所述PKB内存或所述DMA内存;所述待分配内存中包括若干所述目标内存块;分配所述目标内存块至所述PKB内存和所述DMA内存,以供所述PKB内存和所述DMA内存使用。This embodiment provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the methods provided in the above method embodiments, for example, including : In the process of large page memory initialization, obtain the memory usage required by the device to send and receive messages; the memory usage is the sum of the packet buffer PKB memory usage and the direct memory access DMA memory usage; After a large block of large page memory is merged, cut the large block of large page memory according to the memory usage and the preset memory limit address to obtain the target memory block; according to the PKB identification or DMA identification in the device Filtering in the memory to be allocated to obtain the target memory block; wherein, the PKB identifier or the DMA identifier is used to mark the PKB memory or the DMA memory; the memory to be allocated includes several targets A memory block; assigning the target memory block to the PKB memory and the DMA memory for use by the PKB memory and the DMA memory.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
以上所描述的电子设备等实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The above-described embodiments such as electronic equipment are only illustrative, and the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, It can be located in one place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative effort.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the implementations, those skilled in the art can clearly understand that each implementation can be implemented by means of software plus a necessary general hardware platform, and of course also by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic discs, optical discs, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.
最后应说明的是:以上各实施例仅用以说明本发明的实施例的技术方案,而非对其限制;尽管参照前述各实施例对本发明的实施例进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明的各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, not to limit them; although the embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art The skilled person should understand that: it is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the present invention The scope of the technical solutions of each embodiment.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810764340.XA CN108984427B (en) | 2018-07-12 | 2018-07-12 | A method and device for processing memory in equipment based on Shenwei architecture |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810764340.XA CN108984427B (en) | 2018-07-12 | 2018-07-12 | A method and device for processing memory in equipment based on Shenwei architecture |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108984427A true CN108984427A (en) | 2018-12-11 |
| CN108984427B CN108984427B (en) | 2020-07-07 |
Family
ID=64537862
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810764340.XA Active CN108984427B (en) | 2018-07-12 | 2018-07-12 | A method and device for processing memory in equipment based on Shenwei architecture |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108984427B (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110865868A (en) * | 2019-10-21 | 2020-03-06 | 苏州元核云技术有限公司 | Low-delay control method, device and equipment |
| CN111143199A (en) * | 2019-12-11 | 2020-05-12 | 烽火通信科技股份有限公司 | Method for detecting DPDK application program memory out-of-range access in cloud platform |
| CN114020416A (en) * | 2021-11-16 | 2022-02-08 | 湖南麒麟信安科技股份有限公司 | Large page memory dynamic management method, apparatus and computer equipment |
| CN114564436A (en) * | 2022-03-02 | 2022-05-31 | 无锡江南计算技术研究所 | Support memory initialization method for heterogeneous CPUs in Qemu simulator |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102193816A (en) * | 2010-03-12 | 2011-09-21 | 中国长城计算机深圳股份有限公司 | Equipment distribution method and system |
| CN108255608A (en) * | 2018-01-10 | 2018-07-06 | 武汉斗鱼网络科技有限公司 | A kind of management method of memory pool |
-
2018
- 2018-07-12 CN CN201810764340.XA patent/CN108984427B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102193816A (en) * | 2010-03-12 | 2011-09-21 | 中国长城计算机深圳股份有限公司 | Equipment distribution method and system |
| CN108255608A (en) * | 2018-01-10 | 2018-07-06 | 武汉斗鱼网络科技有限公司 | A kind of management method of memory pool |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110865868A (en) * | 2019-10-21 | 2020-03-06 | 苏州元核云技术有限公司 | Low-delay control method, device and equipment |
| CN110865868B (en) * | 2019-10-21 | 2024-02-23 | 苏州元核云技术有限公司 | Low-delay control method, device and equipment thereof |
| CN111143199A (en) * | 2019-12-11 | 2020-05-12 | 烽火通信科技股份有限公司 | Method for detecting DPDK application program memory out-of-range access in cloud platform |
| CN114020416A (en) * | 2021-11-16 | 2022-02-08 | 湖南麒麟信安科技股份有限公司 | Large page memory dynamic management method, apparatus and computer equipment |
| CN114564436A (en) * | 2022-03-02 | 2022-05-31 | 无锡江南计算技术研究所 | Support memory initialization method for heterogeneous CPUs in Qemu simulator |
| CN114564436B (en) * | 2022-03-02 | 2025-09-05 | 无锡江南计算技术研究所 | Memory initialization method supporting heterogeneous CPUs in Qemu emulator |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108984427B (en) | 2020-07-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10545781B2 (en) | Dynamically deployed virtual machine | |
| WO2020156259A1 (en) | Memory management method and device, mobile terminal, and storage medium | |
| CN108984427B (en) | A method and device for processing memory in equipment based on Shenwei architecture | |
| CN106569806A (en) | Method achieving adaptive PCIE bandwidth distribution of BIOS, BIOS and motherboard | |
| EP3211530A1 (en) | Virtual machine memory management method, physical main machine, pcie device and configuration method therefor, and migration management device | |
| WO2021086693A1 (en) | Management of multiple physical function non-volatile memory devices | |
| CN104252419B (en) | A kind of method and device of Memory Allocation | |
| CN105183565A (en) | Computer and service quality control method and device | |
| CN109995814A (en) | Moving method and device, communication equipment, the storage medium of cloud host resource | |
| CN108762939A (en) | A kind of PCIe port resource allocation methods, system and equipment and storage medium | |
| CN104461698A (en) | Dynamic virtual disk mounting method, virtual disk management device and distributed storage system | |
| CN111209080A (en) | Transparent transmission method for graphic processor | |
| US10210109B2 (en) | Pre-allocating memory buffers by physical processor and using a bitmap metadata in a control program | |
| TW201702870A (en) | Method and system for allocating resources for virtual hosts | |
| CN108304044A (en) | A kind of setting method and system of NVME hard disk hot-plugs | |
| CN114640678A (en) | Pod management method, device and medium based on SR-IOV | |
| CN115469961A (en) | Method and device for creating container group, electronic equipment and storage medium | |
| CN115525217B (en) | Method, device, electronic device and storage medium for bad block processing | |
| CN104915288A (en) | Testing method and device | |
| CN113535087B (en) | Data processing method, server and storage system in data migration process | |
| WO2017166997A1 (en) | Inic-side exception handling method and device | |
| CN103761060A (en) | Data processing method and server | |
| CN105988920B (en) | A kind of test cases generation method and its device based on data set | |
| CN107818014A (en) | The concurrent memory allocation method of a kind of memory allocation method and multinuclear | |
| CN109947613B (en) | File reading test method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
| PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A processing method and device of memory in equipment based on Shenwei architecture Effective date of registration: 20220628 Granted publication date: 20200707 Pledgee: Xiamen International Bank Co.,Ltd. Beijing Branch Pledgor: BEIJING ZHONGKE WANGWEI INFORMATION TECHNOLOGY CO.,LTD. Registration number: Y2022990000380 |
|
| PC01 | Cancellation of the registration of the contract for pledge of patent right | ||
| PC01 | Cancellation of the registration of the contract for pledge of patent right |
Granted publication date: 20200707 Pledgee: Xiamen International Bank Co.,Ltd. Beijing Branch Pledgor: BEIJING ZHONGKE WANGWEI INFORMATION TECHNOLOGY CO.,LTD. Registration number: Y2022990000380 |