CN112395220A - Processing method, device and system of shared storage controller and storage controller - Google Patents

Processing method, device and system of shared storage controller and storage controller Download PDF

Info

Publication number
CN112395220A
CN112395220A CN202011297443.3A CN202011297443A CN112395220A CN 112395220 A CN112395220 A CN 112395220A CN 202011297443 A CN202011297443 A CN 202011297443A CN 112395220 A CN112395220 A CN 112395220A
Authority
CN
China
Prior art keywords
address
request
hard disk
storage controller
shared storage
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
Application number
CN202011297443.3A
Other languages
Chinese (zh)
Other versions
CN112395220B (en
Inventor
倪亚路
刘新春
杨晓君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haiguang Information Technology Co Ltd
Original Assignee
Haiguang Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Haiguang Information Technology Co Ltd filed Critical Haiguang Information Technology Co Ltd
Priority to CN202011297443.3A priority Critical patent/CN112395220B/en
Publication of CN112395220A publication Critical patent/CN112395220A/en
Application granted granted Critical
Publication of CN112395220B publication Critical patent/CN112395220B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0615Address space extension
    • G06F12/0623Address space extension for memory modules

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

The invention provides a processing method, a processing device and a processing system of a shared storage controller, a storage controller and a storage medium. The method comprises the following steps: the shared storage controller receives a request of a computing node for data; the shared storage controller analyzes the request to obtain a virtual address carried in the request; the shared storage controller carries out address mapping according to an address mapping relation table to obtain a physical address corresponding to the virtual address; the shared storage controller initiates hard disk access according to the mapped physical address; and the shared storage controller receives a response result of the hard disk and forwards the response result to the computing node which initiates the request. The invention can avoid the waste of storage resources.

Description

Processing method, device and system of shared storage controller and storage controller
Technical Field
The present invention relates to the field of computer storage technologies, and in particular, to a processing method, an apparatus, a system, a storage controller, and a storage medium for a shared storage controller.
Background
The shared storage controller can solve the problems that a high-density server storage system occupies too much cabinet space and storage resources cannot be distributed as required. The shared storage controller performs pooling on the storage resources, and the whole storage resources can be distributed as required according to the requirements of different applications in a software configuration mode, so that the shared storage controller has the characteristics of elasticity and simplicity as required.
In the process of implementing the invention, the inventor finds that at least the following technical problems exist in the prior art:
the existing shared memory controller is implemented based on a static address mapping mode. On one hand, the method needs to configure the size of each partition for each computing node using the shared storage controller one by one, and is very complicated. On the other hand, in this method, storage resources are not allocated according to the size of the hard disk actually used by each computing node, which may cause waste of storage resources.
Disclosure of Invention
The processing method, the processing device and the processing system for the shared storage controller, the storage controller and the storage medium can avoid waste of storage resources.
In one aspect, the present invention provides a processing method for a shared memory controller, including:
the shared storage controller receives a request of a computing node for data;
the shared storage controller analyzes the request to obtain a virtual address carried in the request;
the shared storage controller carries out address mapping according to an address mapping relation table to obtain a physical address corresponding to the virtual address;
the shared storage controller initiates hard disk access according to the mapped physical address;
and the shared storage controller receives a response result of the hard disk and forwards the response result to the computing node which initiates the request.
In another aspect, the present invention further provides a shared memory controller, including:
a first receiving unit, configured to receive a request for data from a computing node;
the analysis unit is used for analyzing the request to obtain a virtual address carried in the request;
the mapping unit is used for carrying out address mapping according to an address mapping relation table to obtain a physical address corresponding to the virtual address;
the access unit is used for initiating hard disk access according to the mapped physical address;
and the second receiving unit is used for receiving the response result of the hard disk and forwarding the response result to the computing node which initiates the request.
In another aspect, the present invention further provides a processing system for sharing a storage controller, including:
at least one shared memory controller; the hard disk and the at least one computing node are respectively and directly connected with each shared storage controller;
the shared storage controller is used for receiving a request of a computing node for data; analyzing the request to obtain a virtual address carried in the request; performing address mapping according to an address mapping relation table to obtain a physical address corresponding to the virtual address; initiating hard disk access according to the mapped physical address; and receiving a response result of the hard disk, and forwarding the response result to the computing node which initiates the request.
In another aspect, the present invention further provides a processing apparatus for sharing a storage controller, including:
a memory;
and a processor coupled to the memory, the processor configured to perform the method based on instructions stored in the memory.
In another aspect, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions, when executed by a processor, implement the method.
In the scheme, the shared storage controller based on dynamic address mapping autonomously establishes and maintains the address mapping relation table in the whole process, and only allocates the physical address space for the virtual address with real access, thereby avoiding the waste of storage resources.
Drawings
FIG. 1 is a flowchart illustrating a processing method of a shared memory controller according to a first embodiment of the present invention;
FIG. 2 is a diagram illustrating an implementation of a dynamic address mapping shared memory controller in an embodiment of the invention;
FIG. 3 is a diagram illustrating a data structure of a hard disk table entry DTE according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a process of a dynamic address mapping shared memory controller according to an embodiment of the invention.
FIG. 5 is a diagram illustrating Disk Table Cache according to an embodiment of the present invention;
FIG. 6 is a diagram of a processing system sharing a memory controller according to an embodiment of the present invention;
FIG. 7 is a flow chart illustrating a process of sharing a memory controller according to an embodiment of the present invention;
FIG. 8 is a connection diagram of a shared memory controller according to the present invention.
FIG. 9 is a connection diagram of a processing device sharing a memory controller according to the present invention.
Detailed Description
In order to make the objects, 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 with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment:
as shown in fig. 1, a processing method for a shared memory controller according to the present invention includes:
step 11, taking the hard disk address accessed by each computing node as a virtual address, and taking the address mapped by the virtual address as a physical address; dividing the space of the virtual address and the space of the physical address by a unit of a block with a predetermined size;
and step 12, establishing an address mapping relation table in the shared storage controller, wherein the address mapping relation table is used for recording the mapping relation between the virtual address and the physical address in the local hard disk of the shared storage controller.
Step 13, the shared storage controller receives a request of the computing node for data;
step 14, the shared storage controller analyzes the request to obtain a virtual address carried in the request;
step 15, the shared storage controller performs address mapping according to the address mapping relation table to obtain a physical address corresponding to the virtual address;
step 16, the shared storage controller initiates hard disk access according to the mapped physical address;
and step 17, the shared storage controller receives the response result of the hard disk and forwards the response result to the computing node which initiates the request.
In the scheme, the shared storage controller based on dynamic address mapping autonomously establishes and maintains the address mapping relation table in the whole process, and only allocates the physical address space for the virtual address with real access, thereby avoiding the waste of storage resources.
In the middle, the address mapping relation table comprises a hard disk table entry DTE;
the data structure of the hard disk table entry DTE comprises:
PR, for marking the described hard disk table entry is effective or not, when bit is 1, said table entry is effective, and when bit is 0, said table entry is invalid;
s: when the bit is a shared zone bit, the virtual address is shared by multiple computing nodes when the bit is 1, and the virtual address is a private address when the bit is 0;
a compute node identification bit for identifying an identification of the compute node originating the request;
a virtual address bit, which is a bit that identifies a virtual address accessed by a compute node;
a physical address bit, which is a bit identifying a physical address mapped by the shared memory controller.
Optionally, the step 15 includes:
when a first hard disk table entry is found in an address mapping relation table, if the identification of the computing node in the first hard disk table entry is consistent with the identification of the computing node initiating the request, and the virtual address in the hard disk table entry is the same as the virtual address in the request, converting the virtual address of the request address into the physical address recorded in the first hard disk table entry, and completing address mapping;
when the first hard disk table entry is not found in the address mapping relation table, a second hard disk table entry is newly established in the address mapping relation table; and the Req ID of the second hard disk table entry is a computing node of the request, the virtual address of the second hard disk table entry is a virtual address carried by the request, and the physical address of the second hard disk table entry is the head address of the next unallocated physical address block of the hard disk so as to complete address mapping.
Second embodiment:
another embodiment of a processing method for a shared memory controller according to the present invention includes:
step 21, taking the hard disk address accessed by each computing node as a virtual address, and taking the address mapped by the virtual address as a physical address; dividing the space of the virtual address and the space of the physical address by a unit of a block with a predetermined size;
step 22, establishing an address mapping relation table in the shared storage controller, where the address mapping relation table is used to record a mapping relation between a virtual address and a physical address in a local hard disk of the shared storage controller.
Step 23, the shared storage controller receives a request of the computing node for data;
step 24, when the data requested by the computing node spans at least two blocks, splitting the request into at least two sub-requests, each sub-request corresponding to an access of one block; and respectively analyzing the virtual addresses carried in the sub-requests.
Step 25, the shared storage controller performs address mapping according to the address mapping relation table to obtain a physical address corresponding to the virtual address;
step 26, the shared storage controller initiates hard disk access according to the mapped physical address;
and 27, receiving the at least two response results of the hard disk by the shared storage controller, combining the responses returned by the at least two accesses to the hard disk into one response, and returning the combined response to the computing node.
In the above embodiments, processing can be performed for a scenario in which data requested by a compute node spans at least two blocks.
The third embodiment:
another embodiment of a processing method for a shared memory controller according to the present invention includes:
step 31, taking the hard disk address accessed by each computing node as a virtual address, and taking the address mapped by the virtual address as a physical address; dividing the space of the virtual address and the space of the physical address by a unit of a block with a predetermined size;
and step 32, establishing an address mapping relation table in the shared storage controller, wherein the address mapping relation table is used for recording the mapping relation between the virtual address and the physical address in the local hard disk of the shared storage controller. An address mapping relation table cache space is preset in the shared storage controller, and hard disk table entries are stored in the address mapping relation table cache space;
step 33, the shared storage controller receives a request of the computing node for data;
step 34, the shared storage controller analyzes the request to obtain a virtual address carried in the request;
step 35, the shared storage controller performs address mapping according to the address mapping relation table to obtain a physical address corresponding to the virtual address; the step 15 includes: searching the first hard disk table entry in the address mapping relation table and the address mapping relation table cache space respectively; and when the first hard disk table entry is found in the address mapping relation table, performing address mapping and stopping finding in the address mapping relation table.
Step 36, the shared storage controller initiates hard disk access according to the mapped physical address;
step 37, the shared storage controller receives the response result of the hard disk, and forwards the response result to the computing node that initiated the request.
In the above embodiment, the address mapping relationship table is used to cache the space, so that the mapping time of the address mapping can be shortened.
The fourth embodiment:
another embodiment of a processing method for a shared memory controller according to the present invention includes:
step 41, taking the hard disk address accessed by each computing node as a virtual address, and taking the address mapped by the virtual address as a physical address; dividing the space of the virtual address and the space of the physical address by a unit of a block with a predetermined size; pre-configuring the initial address and the space size of a shared virtual address space;
and 42, establishing an address mapping relation table in the shared storage controller, wherein the address mapping relation table is used for recording the mapping relation between the virtual address and the physical address in the local hard disk of the shared storage controller.
Step 43, the shared storage controller receives a request of the computing node for data;
step 44, the shared storage controller analyzes the request to obtain a virtual address carried in the request;
step 45, the shared storage controller performs address mapping according to the address mapping relation table to obtain a physical address corresponding to the virtual address; the step 15 includes: and when the virtual address in the second hard disk table entry is the same as the virtual address in the request and the S bit of the second hard disk table entry indicates that the virtual address is in the shared virtual address space range, converting the virtual address of the request address into the physical address recorded in the second hard disk table entry to complete address mapping.
Step 46, the shared storage controller initiates hard disk access according to the mapped physical address;
step 47, the shared storage controller receives the response result of the hard disk, and forwards the response result to the computing node that initiated the request.
The above embodiments can be applied to processing scenarios in which virtual address spaces are shared.
Fifth embodiment:
another embodiment of a processing method for a shared memory controller according to the present invention includes:
step 41, taking the hard disk address accessed by each computing node as a virtual address, and taking the address mapped by the virtual address as a physical address; dividing the space of the virtual address and the space of the physical address by a unit of a block with a predetermined size;
and 42, establishing an address mapping relation table in the shared storage controller, wherein the address mapping relation table is used for recording the mapping relation between the virtual address and the physical address in the local hard disk of the shared storage controller.
Step 43, the shared storage controller receives a request of the computing node for data; when the request is a write request and the virtual address of the request is in the range of the shared virtual address space, the shared storage controller judges whether the request is initiated by the main control computing node or not, and generates a judgment result; if yes, executing step 14; otherwise, the request is discarded and no processing is performed.
Step 44, the shared storage controller analyzes the request to obtain a virtual address carried in the request;
step 45, the shared storage controller performs address mapping according to the address mapping relation table to obtain a physical address corresponding to the virtual address;
step 46, the shared storage controller initiates hard disk access according to the mapped physical address;
step 47, the shared storage controller receives the response result of the hard disk, and forwards the response result to the computing node that initiated the request.
The above embodiment is applicable to application scenarios of a plurality of computing nodes.
The following describes an application scenario of the present invention. The invention provides a processing method of a shared memory controller based on dynamic address mapping. According to the method, when each computing node accesses a hard disk, the mapping relation between the computing node and each hard disk is dynamically determined according to the access address and the condition of a storage resource pool. Instead of fixing the mapping relationship between each computing node and each hard disk in advance. On one hand, the realization method does not need to configure the mapping relation between each partition of each computing node and each hard disk in the storage resource pool in advance, and only needs to configure the total storage capacity and the shared space address used by each computing node. On the other hand, the method only performs storage resource mapping on the hard disk addresses actually used by each computing node, and does not reserve resources for the unused addresses in the storage resource pool, so that the waste of storage resources is avoided. The shared storage controller can allocate the whole storage resource pool to each computing node according to the requirement in a software configuration mode. And the whole process is completely transparent to the individual compute nodes.
The whole system consists of three modules, namely a computing node, a shared storage controller and a hard disk, and is shown in figure 2. The scheme is realized by configuring the size of the storage resource required by each computing node and the address of the shared space through software. The specific mapping relationship is dynamically established and maintained by the shared memory controller.
FIG. 2 is a dynamic address mapping shared memory controller implementation. The hard disk address accessed by each computing node is called a virtual address, and the address mapped by the shared storage controller is called a physical address. The virtual address space and the physical address space are divided in units of blocks. For example: each block may be 2M Bytes in size. If a physical address space has a capacity of 4T Bytes, 2M Bytes are divided into a block, and 2M block units can be divided.
The shared storage controller itself maintains an address mapping relationship Table, called Disk Table, which is responsible for maintaining address mappings associated with the hard disks carried by the shared storage controller. The Table entries contained in the Disk Table are called Disk Table Entry (DTE), and each DTE is responsible for maintaining the address mapping relationship of one block unit. For example, if the capacity of the hard Disk attached to the shared storage controller is 4T Bytes, the Disk Table in the shared storage controller contains 2M DTEs. The format of the DTE is shown in fig. 3.
PR: identifying whether the entry is valid. The bit is 1 to indicate that the table entry is valid, and 0 to indicate that the table entry is invalid.
S: and sharing a flag bit, wherein the bit is 1 to represent that the virtual address is shared by multiple computing nodes, and the bit is 0 to represent that the virtual address is a private address.
Computing node identification Req ID: the identity of the computing node that originated the request is identified.
The Virtual Address [47:21], identifies the upper 27 bits of the Virtual Address accessed by the compute node.
Reserved: the bit is reserved.
Physical Address [47:21 ]: the upper 27 bits of the physical address mapped by the shared memory controller are identified.
After each compute node initiates a hard disk request, the request is sent to the shared memory controller. The processing flow of the shared memory controller is shown in fig. 4, and may be specifically divided into the following steps:
step 1, the shared storage controller analyzes the request of the computing node. And analyzing information such as request command, address, length, data and the like initiated by the computing node.
And 2, the shared memory controller performs table lookup according to the address in the request.
If the Table entry containing the request Address corresponding to the computing node is found in the Disk Table, that is, the Req ID in the Table entry is consistent with the computing node initiating the request, and the Virtual Address [47:21] in the Table entry is the same as the high 27 bits of the request Address, the high 27 bits of the request Address are converted into the Physical Address [47:21] recorded in the Table entry, and the Address mapping is completed.
If the Table item containing the corresponding request address of the computing node cannot be found in the Disk Table, a new Table item is built in the Disk Table. The Req ID of the table entry is the requested computing node, the Virtual Address [47:21] of the table entry is the high 27 bits of the corresponding request Address, the Physical Address [47:21] of the table entry is the high 27 bits of the head Address of the next unallocated Physical Address block of the hard disk, and finally the PR of the table entry is set. After a new table entry is established, the address mapping can be completed according to the table entry.
And 3, initiating hard disk access by the shared memory controller according to the mapped physical address.
And 4, the shared storage controller receives the result of the hard disk response and forwards the result to the computing node which initiates the request.
In one embodiment, if a data request of a compute node spans 2 blocks, the data request needs to be split into two requests, each corresponding to an access of one block. And then, sequentially and respectively performing table lookup, address mapping and hard disk access on the two requests. And finally, combining the results returned by the two hard disk accesses to form a response, and returning the response to the corresponding computing node.
In one embodiment, in order to further improve the speed of data request response and reduce the time for Table lookup, Disk Table Cache is added to the shared memory controller. 2K DTEs can be stored in the Cache, and after the data request is analyzed each time, the Table lookup is carried out by using the number of the computing node and the high 27 bits of the request address, and meanwhile, the lookup is carried out in the Disk Table Cache. If hit in the Disk Table Cache, the address mapping is directly performed, and the searching in the Disk Table is stopped. If the DTE does not hit in the Disk Table Cache, the DTE is copied into the Disk Table Cache after the DTE is found in the Disk Table, as shown in FIG. 5, which is a schematic diagram of the Disk Table Cache. If the Disk Table Cache is full, the DTE missing the longest time is removed from the Disk Table Cache.
In an embodiment, the shared storage controller implemented based on the dynamic address mapping method disclosed in the present technical solution may also support multiple computing nodes to share a virtual address. If the shared virtual address function is to be enabled, the start address and the space size of the shared virtual address space need to be configured during software configuration.
After the shared virtual address is enabled, when a new DTE Table entry is established in the Disk Table, it is necessary to check whether the virtual address in the data request initiated by the computing node is in the shared virtual address space range, and if the virtual address is in the shared virtual address space range, the S sharing flag bit in the DTE Table entry is set.
The shared storage controller processes the data request initiated by each computing node and performs table lookup. If the S bit of the DTE table entry matched with the Virtual Address is 1, namely the Address is in the range of the shared Virtual Address space, the Address mapping can be completed by using the DTE without matching the Req ID.
Under the condition that different computing nodes share the same address space, only the computing node 1 has write permission to the shared address space, and the other computing nodes only have read permission to the shared address space. If the data request initiated by the compute node is a write request and the address is within the shared virtual address space, it needs to check if the request is initiated for compute node 1. If the request is initiated by the computing node 1, the processing is carried out according to a normal flow. If the request is not the request initiated by the computing node 1, the request is directly discarded, and a normal completion response is returned to the initiated computing node.
In the existing method for implementing the shared memory controller, the address mapping relation table is statically configured in a software mode. In the configuration mode, on one hand, the contents to be configured are very complicated and are easy to be configured wrongly; on the other hand, even a virtual address space that is not used by each compute node is allocated with a corresponding physical address space, which wastes storage resources.
The invention has the following beneficial effects:
1. in the invention, the shared storage controller maintains an address mapping relation Table, a Disk Table is established in the shared storage controller, address mapping is completed by Table lookup, and access is carried out across block boundaries.
2. The invention improves the Table lookup efficiency by adding Disk Table Cache.
3. The invention relates to a multi-computing node sharing virtual address based on dynamic address mapping, wherein a dynamic address mapping sharing storage controller maintains an address mapping relation table by the sharing storage controller, and dynamically establishes the mapping relation between a virtual address and a physical address. Therefore, the complexity of software configuration can be avoided, and the physical address space can be only allocated to the virtual address space actually used by the computing node, so that the utilization rate of storage resources can be improved, and the waste of the storage resources is avoided.
An embodiment of a shared memory controller based on dynamic address mapping is described below using a system with 32 compute nodes as an example.
As shown in fig. 6, the whole system includes 4 shared storage controllers, each shared storage controller is directly connected to 8 computing nodes and 1 hard disk, and each shared storage controller is connected to the remaining 3 shared storage controllers, and the 4 hard disks form a storage resource pool through the shared storage controllers, and are used by 32 computing nodes as needed.
Taking the example of the computing node 1 initiating a data request, the processing flow of the shared memory controller is shown in fig. 7.
Step 1, the computing node 1 sends a data request to the shared controller 1, and the shared controller 1 analyzes the data request to analyze information such as a command, an address, a length, data and the like of the address.
And step 2, the shared memory controller 1 performs table lookup according to the address in the request. If the table entry is searched in the address mapping table of the shared storage controller 1, the address mapping is performed according to the table entry. And then initiates access to the hard disk 1 according to the mapped physical address. And finally, forwarding the response of the hard disk 1 to the computing node 1.
And 3, if the table entry is not inquired in the address mapping table of the shared storage controller 1, sending the request to the shared storage controller 2. Then, in the shared memory controller 2, a table lookup is performed based on the address in the request.
And 4, if the address is hit in the address mapping table of the shared storage controller 2, performing address mapping according to the hit table entry, initiating access to the hard disk 2 by the shared storage controller 2 according to the mapped physical address, forwarding a response of the hard disk 2 to the shared storage controller 1, and finally returning the result to the computing node 1 by the shared storage controller 1.
And 5, if the address mapping table of the shared storage controller 2 is not hit, repeating the step 3 and the step 4 in the shared storage controller 3 and the shared storage controller 4 in sequence.
And 6, if the request is not hit in the address mapping tables of the 4 shared memory controllers, establishing a new DTE for the request in the shared memory controller 1. And completing address mapping according to the newly established DTE, and then initiating access to the hard disk 1 according to the mapped physical address. And finally, forwarding the response of the hard disk 1 to the computing node 1.
And 7, if the shared storage controller 1 does not have the allocable blocks, sequentially inquiring whether the allocable blocks exist in the shared storage controllers 2, 3 and 4, establishing a new DTE in the shared storage controller with the allocable blocks, completing address mapping, and initiating access to the corresponding hard disk. Then the corresponding shared storage controller returns the response of the hard disk to the shared controller 1, and finally the shared controller 1 returns the result to the computing node 1.
In the scheme, the shared storage controller based on dynamic address mapping autonomously establishes and maintains the address mapping relation table in the whole process, and only allocates the physical address space for the virtual address with real access, thereby avoiding the waste of storage resources.
As shown in fig. 8, a shared memory controller according to the present invention includes:
a first receiving unit, configured to receive a request for data from a computing node;
the analysis unit is used for analyzing the request to obtain a virtual address carried in the request;
the mapping unit is used for carrying out address mapping according to an address mapping relation table to obtain a physical address corresponding to the virtual address;
the access unit is used for initiating hard disk access according to the mapped physical address;
and the second receiving unit is used for receiving the response result of the hard disk and forwarding the response result to the computing node which initiates the request.
The apparatus of this embodiment may be configured to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
As shown in fig. 6, a processing system for sharing a memory controller according to the present invention includes:
at least one shared memory controller; the hard disk and the at least one computing node are respectively and directly connected with each shared storage controller;
the shared storage controller is used for receiving a request of a computing node for data; analyzing the request to obtain a virtual address carried in the request; performing address mapping according to the address mapping relation table to obtain a physical address corresponding to the virtual address; initiating hard disk access according to the mapped physical address; and receiving a response result of the hard disk, and forwarding the response result to the computing node which initiates the request.
As shown in fig. 9, the present invention further provides a processing apparatus for sharing a storage controller, including:
a memory;
and a processor coupled to the memory, the processor configured to perform the method based on instructions stored in the memory.
The present invention also provides a computer readable storage medium having stored thereon computer instructions for execution by a processor to perform the method.
It will be understood by those skilled in the art that all or part of the processes of the embodiments of the methods described above may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A method of processing a shared memory controller, comprising:
the shared storage controller receives a request of a computing node for data;
the shared storage controller analyzes the request to obtain a virtual address carried in the request;
the shared storage controller carries out address mapping according to an address mapping relation table to obtain a physical address corresponding to the virtual address;
the shared storage controller initiates hard disk access according to the mapped physical address;
and the shared storage controller receives a response result of the hard disk and forwards the response result to the computing node which initiates the request.
2. The method of claim 1, wherein the address mapping relationship table comprises a hard disk table entry DTE;
the data structure of the hard disk table entry DTE comprises:
PR, for marking the described hard disk table entry is effective or not, when bit is 1, said table entry is effective, and when bit is 0, said table entry is invalid;
s: when the bit is a shared zone bit, the virtual address is shared by multiple computing nodes when the bit is 1, and the virtual address is a private address when the bit is 0;
a compute node identification bit for identifying an identification of the compute node originating the request;
a virtual address bit, which is a bit that identifies a virtual address accessed by a compute node;
a physical address bit, which is a bit identifying a physical address mapped by the shared memory controller.
3. The method of claim 2, wherein the shared storage controller performs address mapping according to an address mapping relationship table, and acquiring the address of the physical address corresponding to the virtual address comprises:
when a first hard disk table entry is found in an address mapping relation table, if the identification of the computing node in the first hard disk table entry is consistent with the identification of the computing node initiating the request, and the virtual address in the hard disk table entry is the same as the virtual address in the request, converting the virtual address of the request address into the physical address recorded in the first hard disk table entry, and completing address mapping;
when the first hard disk table entry is not found in the address mapping relation table, a second hard disk table entry is newly established in the address mapping relation table; and the Req ID of the second hard disk table entry is a computing node of the request, the virtual address of the second hard disk table entry is a virtual address carried by the request, and the physical address of the second hard disk table entry is the head address of the next unallocated physical address block of the hard disk so as to complete address mapping.
4. The method of claim 1, wherein the step of the shared storage controller receiving a request from a compute node is preceded by the method further comprising:
taking a hard disk address accessed by each computing node as a virtual address, and taking an address mapped by the virtual address as a physical address; dividing the space of the virtual address and the space of the physical address by a unit of a block with a predetermined size;
and establishing an address mapping relation table in the shared storage controller, wherein the address mapping relation table is used for recording the mapping relation between the virtual address and the physical address in the local hard disk of the shared storage controller.
5. The method of claim 1,
the step of analyzing the request by the shared storage controller to obtain the virtual address carried in the request command includes: splitting the request into at least two sub-requests when the data requested by the compute node spans at least two blocks, each sub-request corresponding to an access of one block; respectively analyzing the virtual addresses carried in the sub-requests;
the shared storage controller receiving a response result of the hard disk and forwarding the response result to the address of the computing node that initiated the request includes: and the shared storage controller receives at least two response results of the hard disk, combines the responses returned by at least two times of hard disk access into one response, and returns the combined response to the computing node.
6. The method of claim 1,
before the step of receiving, by the shared storage controller, a request for data by a compute node, the method further comprises:
an address mapping relation table cache space is preset in the shared storage controller, and hard disk table entries are stored in the address mapping relation table cache space;
the shared storage controller performs address mapping according to the virtual address, and acquiring an address of a physical address corresponding to the virtual address further includes:
searching the first hard disk table entry in the address mapping relation table and the address mapping relation table cache space respectively;
and when the first hard disk table entry is found in the address mapping relation table, performing address mapping and stopping finding in the address mapping relation table.
7. The method of claim 1,
before the step of the shared storage controller receiving a request of a compute node, the method further comprises:
pre-configuring the initial address and the space size of a shared virtual address space;
the shared storage controller performs address mapping according to the address mapping relationship table, and acquiring the address of the physical address corresponding to the virtual address includes:
and when the virtual address in the second hard disk table entry is the same as the virtual address in the request and the S bit of the second hard disk table entry indicates that the virtual address is in the shared virtual address space range, converting the virtual address of the request address into the physical address recorded in the second hard disk table entry to complete address mapping.
8. The method of claim 1, wherein the step of the shared storage controller receiving a request for data from a compute node further comprises:
when the request is a write request and the virtual address of the request is in the range of the shared virtual address space, the shared storage controller judges whether the request is initiated by the main control computing node or not, and generates a judgment result;
if the judgment result is yes, executing the next step;
otherwise, the request is discarded.
9. A shared memory controller, comprising:
a first receiving unit, configured to receive a request for data from a computing node;
the analysis unit is used for analyzing the request to obtain a virtual address carried in the request;
the mapping unit is used for carrying out address mapping according to an address mapping relation table to obtain a physical address corresponding to the virtual address;
the access unit is used for initiating hard disk access according to the mapped physical address;
and the second receiving unit is used for receiving the response result of the hard disk and forwarding the response result to the computing node which initiates the request.
10. A processing system that shares a memory controller, comprising:
at least one shared memory controller; the hard disk and the at least one computing node are respectively and directly connected with each shared storage controller;
the shared storage controller is used for receiving a request of a computing node for data; analyzing the request to obtain a virtual address carried in the request; performing address mapping according to an address mapping relation table to obtain a physical address corresponding to the virtual address; initiating hard disk access according to the mapped physical address; and receiving a response result of the hard disk, and forwarding the response result to the computing node which initiates the request.
11. A processing device sharing a memory controller, comprising:
a memory;
and a processor coupled to the memory, the processor configured to perform the method of any of claims 1-8 based on instructions stored in the memory.
12. A computer readable storage medium, wherein the computer readable storage medium stores computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 8.
CN202011297443.3A 2020-11-18 2020-11-18 Processing method, device and system of shared storage controller and storage controller Active CN112395220B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011297443.3A CN112395220B (en) 2020-11-18 2020-11-18 Processing method, device and system of shared storage controller and storage controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011297443.3A CN112395220B (en) 2020-11-18 2020-11-18 Processing method, device and system of shared storage controller and storage controller

Publications (2)

Publication Number Publication Date
CN112395220A true CN112395220A (en) 2021-02-23
CN112395220B CN112395220B (en) 2023-02-28

Family

ID=74606673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011297443.3A Active CN112395220B (en) 2020-11-18 2020-11-18 Processing method, device and system of shared storage controller and storage controller

Country Status (1)

Country Link
CN (1) CN112395220B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710467A (en) * 2022-03-25 2022-07-05 阿里巴巴(中国)有限公司 IP address storage method, device and hardware gateway
WO2023066268A1 (en) * 2021-10-21 2023-04-27 华为技术有限公司 Request processing method, apparatus and system

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681239B1 (en) * 1996-12-23 2004-01-20 International Business Machines Corporation Computer system having shared address space among multiple virtual address spaces
US20040117588A1 (en) * 2002-12-12 2004-06-17 International Business Machines Corporation Access request for a data processing system having no system memory
CN1705269A (en) * 2004-05-25 2005-12-07 中国科学院计算技术研究所 Remote page access method for use in shared virtual memory system and network interface card
US20080086620A1 (en) * 2006-10-06 2008-04-10 Morris Robert P Method and system for using a distributable virtual address space
CN102110196A (en) * 2009-12-25 2011-06-29 中国长城计算机深圳股份有限公司 Method and system for safely transmitting data among parallel-running multiple user operating systems
CN102498478A (en) * 2009-07-24 2012-06-13 超威半导体公司 Iommu using two-level address translation for i/o and computation offload devices on a peripheral interconnect
CN103368848A (en) * 2012-03-30 2013-10-23 富士通株式会社 Information processing apparatus, arithmetic device, and information transferring method
CN104123228A (en) * 2014-07-21 2014-10-29 曙光信息产业(北京)有限公司 Data storage system and application method thereof
CN104133777A (en) * 2014-07-24 2014-11-05 曙光信息产业(北京)有限公司 Shared memory system and use method of shared memory system
CN104601711A (en) * 2015-01-27 2015-05-06 曙光云计算技术有限公司 FPGA-based data storage method and system used for cloud server
CN105793830A (en) * 2013-12-26 2016-07-20 英特尔公司 Sharing memory and I/O services between nodes
CN107729159A (en) * 2017-09-29 2018-02-23 华为技术有限公司 The address mapping method and device of a kind of shared drive
CN108139937A (en) * 2015-10-13 2018-06-08 华为技术有限公司 More I/O virtualization systems
CN108170544A (en) * 2017-12-29 2018-06-15 中国人民解放军国防科技大学 Shared data dynamic updating method for data conflict-free program
CN106105152B (en) * 2014-05-22 2018-07-13 华为技术有限公司 A kind of node interconnection device and server system
CN110392084A (en) * 2018-04-20 2019-10-29 伊姆西Ip控股有限责任公司 The method, equipment and computer program product of management address in a distributed system
CN110869913A (en) * 2017-07-14 2020-03-06 Arm有限公司 Memory system for data processing network

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681239B1 (en) * 1996-12-23 2004-01-20 International Business Machines Corporation Computer system having shared address space among multiple virtual address spaces
US20040117588A1 (en) * 2002-12-12 2004-06-17 International Business Machines Corporation Access request for a data processing system having no system memory
CN1705269A (en) * 2004-05-25 2005-12-07 中国科学院计算技术研究所 Remote page access method for use in shared virtual memory system and network interface card
US20080086620A1 (en) * 2006-10-06 2008-04-10 Morris Robert P Method and system for using a distributable virtual address space
CN102498478A (en) * 2009-07-24 2012-06-13 超威半导体公司 Iommu using two-level address translation for i/o and computation offload devices on a peripheral interconnect
CN102110196A (en) * 2009-12-25 2011-06-29 中国长城计算机深圳股份有限公司 Method and system for safely transmitting data among parallel-running multiple user operating systems
CN103368848A (en) * 2012-03-30 2013-10-23 富士通株式会社 Information processing apparatus, arithmetic device, and information transferring method
CN105793830A (en) * 2013-12-26 2016-07-20 英特尔公司 Sharing memory and I/O services between nodes
CN106105152B (en) * 2014-05-22 2018-07-13 华为技术有限公司 A kind of node interconnection device and server system
CN104123228A (en) * 2014-07-21 2014-10-29 曙光信息产业(北京)有限公司 Data storage system and application method thereof
CN104133777A (en) * 2014-07-24 2014-11-05 曙光信息产业(北京)有限公司 Shared memory system and use method of shared memory system
CN104601711A (en) * 2015-01-27 2015-05-06 曙光云计算技术有限公司 FPGA-based data storage method and system used for cloud server
CN108139937A (en) * 2015-10-13 2018-06-08 华为技术有限公司 More I/O virtualization systems
CN110869913A (en) * 2017-07-14 2020-03-06 Arm有限公司 Memory system for data processing network
CN107729159A (en) * 2017-09-29 2018-02-23 华为技术有限公司 The address mapping method and device of a kind of shared drive
CN108170544A (en) * 2017-12-29 2018-06-15 中国人民解放军国防科技大学 Shared data dynamic updating method for data conflict-free program
CN110392084A (en) * 2018-04-20 2019-10-29 伊姆西Ip控股有限责任公司 The method, equipment and computer program product of management address in a distributed system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
徐鸿明等: "基于高速缓存资源共享的TLB设计方法", 《浙江大学学报(工学版)》 *
曹非等: "片上多核处理器共享末级缓存动静结合地址映射机制", 《计算机科学》 *
陈小文等: "多核处理器中混合分布式共享存储空间的实时划分技术", 《计算机工程与科学》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023066268A1 (en) * 2021-10-21 2023-04-27 华为技术有限公司 Request processing method, apparatus and system
CN114710467A (en) * 2022-03-25 2022-07-05 阿里巴巴(中国)有限公司 IP address storage method, device and hardware gateway
CN114710467B (en) * 2022-03-25 2024-03-12 阿里巴巴(中国)有限公司 IP address storage method and device and hardware gateway

Also Published As

Publication number Publication date
CN112395220B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN107196982B (en) User request processing method and device
US9229751B2 (en) Apparatus and method for managing virtual memory
US20120110293A1 (en) Method and system for managing virtual machine storage space and physical host
US10235047B2 (en) Memory management method, apparatus, and system
EP2479677A1 (en) Method, system and physical host for virtual machine (vm) storage space management
WO2015067074A1 (en) Data reading method and apparatus
CN112395220B (en) Processing method, device and system of shared storage controller and storage controller
US10552089B2 (en) Data processing for managing local and distributed storage systems by scheduling information corresponding to data write requests
US20080172543A1 (en) Device, Method and Computer Program Product for Multi-Level Address Translation
CN112632069B (en) Hash table data storage management method, device, medium and electronic equipment
CN113760560A (en) Inter-process communication method and inter-process communication device
CN109597903B (en) Image file processing apparatus and method, file storage system, and storage medium
US9785551B2 (en) Memory access method, buffer scheduler and memory module
CN116431530B (en) CXL memory module, memory processing method and computer system
CN115576654B (en) Request processing method, device, equipment and storage medium
US20150324289A1 (en) Data Access System, Memory Sharing Device, and Data Reading Method
CN110706148B (en) Face image processing method, device, equipment and storage medium
US9772776B2 (en) Per-memory group swap device
CN113296886A (en) Virtual machine memory management method, device and system and physical machine
CN113010452A (en) Efficient virtual memory architecture supporting QoS
US10817432B2 (en) Memory address assignment method for virtual machine and apparatus
WO2016119618A1 (en) Remote memory allocation method, device and system
CN107515725B (en) Method and device for sharing disk by core network virtualization system and network management MANO system
CN115712581A (en) Data access method, storage system and storage node
WO2015161804A1 (en) Cache partitioning 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