CN107147590A - A kind of method and system based on rdma protocol message communicating - Google Patents

A kind of method and system based on rdma protocol message communicating Download PDF

Info

Publication number
CN107147590A
CN107147590A CN201710565927.3A CN201710565927A CN107147590A CN 107147590 A CN107147590 A CN 107147590A CN 201710565927 A CN201710565927 A CN 201710565927A CN 107147590 A CN107147590 A CN 107147590A
Authority
CN
China
Prior art keywords
memory block
predetermined number
communication data
byte length
memory
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.)
Pending
Application number
CN201710565927.3A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710565927.3A priority Critical patent/CN107147590A/en
Publication of CN107147590A publication Critical patent/CN107147590A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9005Buffering arrangements using dynamic buffer space allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

This application discloses a kind of method based on rdma protocol message communicating, methods described includes:Shared buffer memory is divided into the first predetermined number memory block, and registers the second predetermined number memory block;Judge whether the byte length of communication data is more than the byte length summation of memory block described in the second predetermined number;If so, then registering the 3rd predetermined number memory block;The communication data is stored into the memory block for completing registration;The communication data in the memory block is sent to receiving terminal;The efficiency for sending communication data is the method increase, system resource has effectively been saved;Disclosed herein as well is a kind of system based on rdma protocol message communicating, with above beneficial effect.

Description

A kind of method and system based on rdma protocol message communicating
Technical field
The present invention relates to storage management field, more particularly to a kind of method and system based on rdma protocol message communicating.
Background technology
RDMA (remote direct memory access) technology, is that one kind can store the directly incoming computer of data by network The technology in area, solves the problem of servers' data processing postpones in network transmission.Rdma protocol is generally mounted in On InfiniBand architecture, due to InfiniBand systems have low delay, high bandwidth characteristic, utilize the excellent of the two It is the communication means for comparing main flow at present that gesture, which carries out message communicating,.
There are following three kinds of message communicating modes in rdma protocol, refer to Fig. 1, Fig. 2 and Fig. 3, Fig. 1 is RDMA send/ Receive patterns carry out the schematic diagram of message communicating, and Fig. 2 is the schematic diagram that RDMA write patterns carry out message communicating, and Fig. 3 is RDMA read patterns carry out the schematic diagram of message communicating.In the prior art, it is main to use RDMA send/receive patterns Message communicating is carried out, when carrying out the operation of RDMA send/receive patterns, it is necessary to first by the content of required transmission from system Apply for that space is deposited, and is called and is again copied to transmission content in the shared buffer memory of transmitting terminal during transmission interface in internal memory, nothing Method plays the advantage of rdma protocol.
Therefore, copy step can be reduced in message communicating by how formulating a kind of information communication method, realize sending part The high efficiency of transmission divided, is the current technical issues that need to address of those skilled in the art.
The content of the invention
The purpose of the application is to provide a kind of method and system based on rdma protocol message communicating, can be in message communicating When reduce copy step, realize the high efficiency of transmission of transmitting portion.
In order to solve the above technical problems, the application provides a kind of method and system based on rdma protocol message communicating, should Method includes:
Shared buffer memory is divided into the first predetermined number memory block, and registers the second predetermined number memory block; Wherein, the second predetermined number is less than the first predetermined number;
Judge whether the byte length of communication data is more than the byte length summation of memory block described in the second predetermined number;
If so, then registering the 3rd predetermined number memory block;Wherein, the word of the 3rd predetermined number memory block Save the word that length summation is more than or equal to the communication data plus the byte length summation of the second predetermined number memory block Length is saved, and the 3rd predetermined number is less than or equal to the first predetermined number plus the second predetermined number;
The communication data is stored into the memory block for completing registration;
The communication data in the memory block is sent to receiving terminal.
Optionally, it is described shared buffer memory is divided into the first predetermined number memory block to include:
The shared buffer memory is divided into the memory block of the first predetermined number fixed byte length.
Optionally, the communication data is stored to the memory block for completing registration includes:
Judge whether the byte length of the communication data is more than the byte length of the memory block;
If so, then the communication data is stored into the 4th predetermined number memory block;Wherein, the 4th present count The byte length summation of the amount memory block is more than or equal to the byte length of the communication data, and the second predetermined number is added 3rd predetermined number is more than or equal to the 4th predetermined number;
If it is not, in any one memory block then stored the communication data into the memory block for completing registration.
Optionally, the communication data to the receiving terminal sent in the memory block includes:
Pass through the communication data in send/receive patterns and the RDMA read patterns transmission memory block to institute State receiving terminal.
Optionally, this method also includes:
After the communication data is all sent to the receiving terminal, the data in the memory block are deleted, and nullify the The three predetermined numbers memory block.
Present invention also provides a kind of system based on rdma protocol message communicating, the system includes:
Distribute module is cached, is preset for shared buffer memory to be divided into the first predetermined number memory block, and registers second The quantity memory block;Wherein, the second predetermined number is less than the first predetermined number;
Judge module, for judging whether the byte length of communication data is more than the word of memory block described in the second predetermined number Save length summation;
Registering modules, the byte length for being more than memory block described in the second predetermined number when the byte length of communication data During summation, registration the 3rd predetermined number memory block;Wherein, the byte length of the 3rd predetermined number memory block is total It is more than or equal to the byte length of the communication data with the byte length summation plus the second predetermined number memory block, and 3rd predetermined number is less than or equal to the first predetermined number plus the second predetermined number;
Memory module, for the communication data to be stored into the memory block for completing registration;
Sending module, for sending the communication data in the memory block to receiving terminal.
Optionally, the caching distribute module includes:
Division unit, the internal memory for the shared buffer memory to be divided into the first predetermined number fixed byte length Block.
Optionally, the memory module includes:
Length determining unit, for judging whether the byte length of the communication data is more than the byte long of the memory block Degree;
Merge memory cell, for when the communication data byte length be more than the memory block byte length when, The communication data is stored into the 4th predetermined number memory block;Wherein, the 4th predetermined number memory block Byte length summation be more than or equal to the communication data byte length, and the second predetermined number plus the 3rd predetermined number it is big In equal to the 4th predetermined number;
Single memory cell, for when the communication data byte length be less than the memory block byte length when, Then the communication data is stored in any one memory block into the memory block for completing registration.
Optionally, the sending module sends described specifically by send/receive patterns and RDMA read patterns The communication data in memory block to the receiving terminal module.
Optionally, the system also includes:
Recycling module, for after the communication data is all sent to the receiving terminal, deleting in the memory block Data, and nullify the 3rd predetermined number memory block.
The invention provides a kind of method based on rdma protocol message communicating, shared buffer memory is divided into the first present count Amount memory block, and register the second predetermined number memory block;Judge whether the byte length of communication data is more than second The byte length summation of memory block described in predetermined number;If so, then registering the 3rd predetermined number memory block;Will be described logical Letter data is stored into the memory block for completing registration;The communication data in the memory block is sent to receiving terminal.
Shared buffer memory is divided into multiple memory blocks by this method, and communication data is stored directly in memory block, is eliminated Communication data is stored in the intermediate steps of this in Installed System Memory, the efficiency for sending communication data is improved.Due to communication data Size it is limited, in most cases the character length of communication data is that the character that can be stored much smaller than shared buffer memory is long Degree, therefore, not all memory block is all used to store communication data in the method, but registers a part of memory block and use In memory communicating data.When the memory block for occurring have registered be not enough to storage communication data when, register again new memory block with The need for the data for meeting storage, the memory block login mechanism that this dynamic flexible in the reasonable scope increases is improving transmission While the efficiency of communication data, system resource has effectively been saved.The application additionally provides a kind of based on rdma protocol simultaneously The system of message communicating, with above-mentioned beneficial effect, will not be repeated here.
Brief description of the drawings
In order to illustrate more clearly of the embodiment of the present application, the required accompanying drawing used in embodiment will be done simply below Introduce, it should be apparent that, drawings in the following description are only some embodiments of the present application, for ordinary skill people For member, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic diagram that RDMA send/receive patterns carry out message communicating;
Fig. 2 is the schematic diagram that RDMA write patterns carry out message communicating;
Fig. 3 is the schematic diagram that RDMA read patterns carry out message communicating;
Fig. 4 is the hardware environment schematic diagram at a kind of method of access asynchronous logic provided herein;
A kind of flow chart for method based on rdma protocol message communicating that Fig. 5 is provided by the embodiment of the present application;
The flow chart for another method based on rdma protocol message communicating that Fig. 6 is provided by the embodiment of the present application;
Another system structure diagram based on rdma protocol message communicating that Fig. 7 provides for the application;
Another system structure diagram based on rdma protocol message communicating that Fig. 8 provides for the application.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of the application protection.
A kind of method and system based on rdma protocol message communicating provided herein, can apply to following hardware In scene:
Fig. 4 is refer to, Fig. 4 is the hardware loop at a kind of method of access asynchronous logic provided herein Border schematic diagram, including transmitting terminal 101, receiving terminal 102.
Wherein, transmitting terminal 101 is the device that communication data is sent to receiving terminal 102, and transmitting terminal 101 uses regular length Internal storage location mechanism, is used when allocated monoblock internal memory is divided into the memory block of some regular lengths for each message communicating. Transmitting terminal 101 can be any one widely used computer in big data, cloud computing, database, financial services industry, Specific limitation is not done to transmitting terminal 101 herein.Receiving terminal 102 is the device for receiving data, when receiving terminal 102 receives number It can be sent after to transmitting terminal 101 and confirm character, to represent message communicating success.Receiving terminal 102 can be in transmitting terminal 101 On same computer, it can also respectively be located in two computers in consolidated network, also receiving terminal 102 not done and had herein The restriction of body.
Fig. 5, a kind of method based on rdma protocol message communicating that Fig. 5 is provided by the embodiment of the present application are referred to below Flow chart.
Specific steps can include:
Step S201:Shared buffer memory is divided into the first predetermined number memory block, and registers the second predetermined number institute State memory block;Wherein the second predetermined number is less than the first predetermined number;
Wherein, the executive agent of this method is transmitting terminal.Shared buffer memory is the sky for storing communication data to be sent Between, sending communication data may be by multiple memory space, such as, in most cases communication data can be first in system Middle storage is deposited, then replicates and pastes in shared buffer memory, that is to say, that no matter communication data is pasted by duplication several times, all finally Store into shared buffer memory, so as to which communication data is sent to receiving terminal.This step is defined just for shared buffer memory, by altogether Enjoy caching and be divided into multiple memory blocks, specific restriction is not done to other memory spaces.
Because shared buffer memory is the space of an entirety, in general, the memory space of shared buffer memory is than communication The space that data are accounted for is much bigger, and the space meeting of whole shared buffer memory is enabled if as the memory space of sub-fraction to be used Cause the huge waste of resource.For above such case, this method uses memory block login mechanism, and whole memory space is drawn It is divided into the first predetermined number memory block, when carrying out communication data storage, a part of memory block can be only used, to save Resource.
For the division of shared buffer memory, there may be a variety of methods.For example, delimiting the size of memory block at random;By internal memory Block is divided into multiple grades, a kind of memory block of fixed space size of each grade correspondence;Shared buffer memory is big according to fixed space It is small to be divided into some memory blocks.For above-mentioned three kinds of division methods, it can be determined for different situations.Sent when transmitting terminal Have extremely long of the byte length of all communication datas and have it is extremely short when, the size of memory block can be delimited at random;Work as transmitting terminal When the byte length of all communication datas sent changes within the specific limits, memory block can be divided into multiple grades, it is each A kind of memory block of fixed space size of grade correspondence;When the byte length for all communication datas that transmitting terminal is sent all is substantially During regular length, shared buffer memory is divided into some memory blocks according to fixed space size.Simply shared buffer memory is carried out herein Divide, method, foundation not to division are defined.
The memory block of shared buffer memory is divided and carried out when transmitting terminal starts first, without weight after memory block has been divided It is new to divide, utilize ready-portioned memory block when starting first when sending communication data every time.Certainly, when the situation of transmission occurs During change, shared buffer memory can also be carried out to repartition memory block, other restrictions are done in the division not to shared buffer memory herein.
It is understood that being not that the memory block divided may serve to store communication data, only registered Memory block can just store communication data.Registered to host channel matching device (HCA, Host Channel Adapter) card The memory block of registration can be obtained completing.Because transmitting terminal process starts first, and do not need too many memory block logical to store Letter data, so all memory blocks are not all registered, need to only be registered on a small quantity.Because the memory block for completing registration is A part for shared buffer memory, so the second predetermined number is less than equal to the first predetermined number.Wherein, the first predetermined number and Two predetermined numbers as the case may be depending on, can also regard optionally change and change, therefore only need to the two ensure size pass It is constant, the concrete numerical value not to the first predetermined number and the second predetermined number is defined herein.
Step S202:Judge whether the byte length of communication data is more than the byte long of memory block described in the second predetermined number Summation is spent, if so, then entering step S203;If it is not, then entering S204.
Wherein, communication data is placed due to that can not determine whether the memory block for completing registration has a sufficiently large space, then Need to be compared the size of memory space and communication data.What this step compared is all internal memory block spaces for completing registration The summation of size and the size of communication data are compared.That is, on the premise of enough in space, communication data is can be with It is stored in multiple memory blocks for completing registration, the effect on message communicating does not produce influence.It is understood that comparing Completing the method for the summation of the memory block space size of registration and the size of communication data has many kinds, does not contrast larger herein Small method is defined.
Step S203:Register the 3rd predetermined number memory block;Wherein, the 3rd predetermined number memory block Byte length summation is more than or equal to the communication data plus the byte length summation of the second predetermined number memory block Byte length, and the 3rd predetermined number is less than or equal to the first predetermined number plus the second predetermined number;
Wherein, when the byte length summation that the byte length of communication data is more than memory block described in the second predetermined number needs New memory block is registered again, that is to say, that when actual pressure communication is more than the pressure that the second predetermined number memory block can bear The memory block of new completion registration is needed to share pressure communication during power.Register the method and note of the 3rd predetermined number memory block The method of the second predetermined number memory block of volume is consistent, and here is omitted.
Because the purpose for the 3rd predetermined number memory block registered again is that the second predetermined number memory block of storage is deposited The communication data do not put, therefore the space size for the 3rd predetermined number memory block registered again will meet all completion notes The byte length of the memory block of volume is greater than the byte length of communication data.Further, since the 3rd predetermined number registered again Individual memory block is a part for shared buffer memory, therefore the 3rd predetermined number is less than or equal to the first present count plus the second predetermined number Amount.
Step S204:The communication data is stored into the memory block for completing registration;
Wherein, memory block is a part for shared buffer memory, and communication data is stored into memory block, that is, by the number that communicates According to storing into memory block.Because the memory block for completing registration has a lot, so the selection of the storage of communication data has a lot, both Communication data can be stored into multiple memory blocks, communication data can also be stored into single memory block.Certainly, it is best Communication data storage is carried out according to the premise economized on resources, i.e. when the byte-sized of communication data is completed less than or equal to some During the memory block of registration, the communication data is stored can be in the memory block of separate storage data to this;When one piece of memory block When sufficiently large space storage communication data can not be provided, it can select to be stored using the memory block that polylith completes registration.
The communication data is directly stored into the memory block for completing registration in this step, not via in system Forwarding is deposited, the copy step successively of transmission content is reduced.Certainly, the memory block of communication data, it may be possible to registration for the first time Memory block, it is also possible to be the memory block of second of registration, it is contemplated that having cancellation part the after message communicating is carried out The situation of secondary memory block, so storing communication data in the memory block of first time registration as far as possible.
Step S205:The communication data in the memory block is sent to receiving terminal.
Wherein, this step is that the communication data that will be stored in memory block is sent to receiving terminal, because the present embodiment is logical Cross rdma protocol and carry out message communicating, can be communicated using send/receive patterns, write patterns, read patterns The transmission of data, is not defined to the specific transfer approach of communication data herein.
Fig. 6, another side based on rdma protocol message communicating that Fig. 6 is provided by the embodiment of the present application are referred to below The flow chart of method.
This embodiment is on the basis of above-described embodiment, to the method for the byte length and storage communication data of memory block Carry out definitions relevant.
Specific steps can include:
Step S301:The shared buffer memory is divided into the memory block of the first predetermined number fixed byte length, And register the second predetermined number memory block;Wherein the second predetermined number is less than the first predetermined number;
Wherein, the division of shared buffer memory and the storage of communication data for convenience, this step is by the byte of all memory blocks Length is unified, that is to say, that when there is a memory block to store communication data, then other memory blocks equally may be used To store this communication data, the operation for searching the memory block that can store communication data is also just eliminated.This step other The S201 appearances of operation and specific above step are substantially uniform, and here is omitted.
Step S302:Judge whether the byte length of communication data is more than the byte long of memory block described in the second predetermined number Spend summation;If so, then entering step S303;If it is not, then entering step S304
Step S303:Register the 3rd predetermined number memory block;Wherein, the 3rd predetermined number memory block Byte length summation is more than or equal to the communication data plus the byte length summation of the second predetermined number memory block Byte length, and the 3rd predetermined number is less than or equal to the first predetermined number plus the second predetermined number;
Step S304:Judge whether the byte length of the communication data is more than the byte length of the memory block;If so, Then enter step S305;If it is not, then entering step S306.
Wherein, this step is can to accommodate lower communication data to how many memory blocks to analyze, and the result of analysis has two Kind, one is to need to use multiple memory blocks to store communication data, and two be to only need to that using a memory block communication can be stored Data.Due to, the byte length of each memory block is identical, therefore only need to take out any one piece of memory block carry out with Communication data is compared.
Step S305:The communication data is stored into the 4th predetermined number memory block;Wherein, the 4th preset The byte length summation of the quantity memory block is more than or equal to the byte length of the communication data, and the second predetermined number adds Upper 3rd predetermined number is more than or equal to the 4th predetermined number;Into step S307.
Wherein, this step is can not to deposit the situation of communication data for one piece of memory block, now needs multiple memory blocks Common cooperation completes the storage of communication data.The number of the memory block needed to use is at least communication data character length and internal memory The ratio of block character length, but be due to that the number of memory block is all positive integer, most connect with above-mentioned ratio so at least choosing Positive integer memory block near and not less than the ratio.It is of course also possible to choose more memory blocks, but it is in order at saving The angle of resource, chooses a suitable memory block number as far as possible.
It is understood that the 4th predetermined number memory block is determined according to the character length of communication data, therefore 4th predetermined number is a uncertain value.But it is due to long to the character of the memory block of completion registration before this step The character length of degree summation and communication data is compared, and the memory block lacked is registered again, so completing The memory headroom of the memory block of registration is enough to store communication data.It is understood that for storing in communication data Counterfoil must be part or all of in the memory block for complete registration, therefore the 4th predetermined number is less than or equal to second certainly Predetermined number adds the 3rd predetermined number.
Step S306:The communication data is stored into any one memory block into the memory block for completing registration In.
Wherein, when the character length of communication data is less than the character length of memory block, being also can be by the number that communicates According to storing into multiple memory blocks, it is preferred that communication data is stored into any one into the memory block for completing registration In individual memory block, to economize on resources, efficiency is improved.
Step S307:Send described logical in the memory block by send/receive patterns and RDMA read patterns Letter data is to the receiving terminal.
Wherein, combined using send/receive patterns and RDMA read patterns and carry out information receiving and transmitting, can effectively improved The efficiency of message communicating.
Step S308:After the communication data is all sent to the receiving terminal, the data in the memory block are deleted, And nullify the 3rd predetermined number memory block.
Wherein, after the completion of communication data transfer, the communication data being stored in memory block just loses use value, is Save space and facilitate the transmission of other communication datas, delete the data that are sent completely to carry out data biography next time Send.It is possible that the memory block newly increased, after communication data has been sent, cancellation is newly increased in communication data storing process Memory block, to save resource.It is understood that this step is not defined to specifically nullifying that a part of memory block, Only the number for nullifying memory block is defined, so that after the cancellation of partial memory block, the number for registering the memory block completed is protected Hold as the second predetermined number.Certainly, if the character length of communication data is increasing, it can suitably reduce and nullify memory block Number.If the memory block without new registration, without nullifying;The 3rd predetermined number nullified in this step is 0.
Because the embodiment of components of system as directed and the embodiment of method part are mutually corresponding, therefore the embodiment of components of system as directed please Referring to the description of the embodiment of method part, it wouldn't repeat here.
Fig. 7, a kind of system architecture signal based on rdma protocol message communicating that Fig. 7 provides for the application are referred to below Figure, the system can include:
Distribute module 100 is cached, for shared buffer memory to be divided into the first predetermined number memory block, and it is pre- to register second If the quantity memory block;Wherein, the second predetermined number is less than the first predetermined number;
Judge module 200, for judging whether the byte length of communication data is more than memory block described in the second predetermined number Byte length summation;
Registering modules 300, the byte for being more than memory block described in the second predetermined number when the byte length of communication data During length summation, registration the 3rd predetermined number memory block;Wherein, the byte long of the 3rd predetermined number memory block Spend the byte long that summation is more than or equal to the communication data plus the byte length summation of the second predetermined number memory block Degree, and the 3rd predetermined number is less than or equal to the first predetermined number plus the second predetermined number;
Memory module 400, for the communication data to be stored into the memory block for completing registration;
Sending module 500, for sending the communication data in the memory block to receiving terminal.
Referring to Fig. 8, another system architecture signal based on rdma protocol message communicating that Fig. 8 provides for the application Figure.
The present embodiment is further, and the caching distribute module 100 includes:
Division unit 110, for the shared buffer memory to be divided into described in the first predetermined number fixed byte length Memory block.
Further, the memory module 400 includes:
Length determining unit 410, for judging whether the byte length of the communication data is more than the word of the memory block Save length;
Merge memory cell 420, the byte length for being more than the memory block when the byte length of the communication data When, the communication data is stored into the 4th predetermined number memory block;Wherein, the 4th predetermined number internal memory The byte length summation of block is more than or equal to the byte length of the communication data, and the second predetermined number adds the 3rd predetermined number More than or equal to the 4th predetermined number;
Single memory cell 430, the byte length for being less than the memory block when the byte length of the communication data When, then the communication data is stored in any one memory block into the memory block for completing registration.
Further, the sending module 500 is sent specifically by send/receive patterns and RDMA read patterns The communication data in the memory block to the receiving terminal module.
Further, the system also includes:
Recycling module 600, for after the communication data is all sent to the receiving terminal, deleting in the memory block Data, and nullify the 3rd predetermined number memory block.
Detailed Jie has been carried out to a kind of method and system based on rdma protocol message communicating provided herein above Continue.The embodiment of each in specification is described by the way of progressive, and what each embodiment was stressed is and other embodiment Difference, between each embodiment identical similar portion mutually referring to.For system disclosed in embodiment, by Corresponded to the method disclosed in Example in it, so description is fairly simple, related part is referring to method part illustration. It should be pointed out that for those skilled in the art, can also be right on the premise of the application principle is not departed from The application carries out some improvement and modification, and these are improved and modification is also fallen into the application scope of the claims.
It should also be noted that, in this manual, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between there is any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering including for nonexcludability, so that process, method, article or equipment including a series of key elements not only include that A little key elements, but also other key elements including being not expressly set out, or also include be this process, method, article or The intrinsic key element of equipment.Under the situation of not more limitations, the key element limited by sentence "including a ..." is not arranged Except also there is other identical element in the process including the key element, method, article or equipment.

Claims (10)

1. a kind of method based on rdma protocol message communicating, it is characterised in that including:
Shared buffer memory is divided into the first predetermined number memory block, and registers the second predetermined number memory block;Wherein, Second predetermined number is less than the first predetermined number;
Judge whether the byte length of communication data is more than the byte length summation of memory block described in the second predetermined number;
If so, then registering the 3rd predetermined number memory block;Wherein, the byte long of the 3rd predetermined number memory block Spend the byte long that summation is more than or equal to the communication data plus the byte length summation of the second predetermined number memory block Degree, and the 3rd predetermined number is less than or equal to the first predetermined number plus the second predetermined number;
The communication data is stored into the memory block for completing registration;
The communication data in the memory block is sent to receiving terminal.
2. method according to claim 1, it is characterised in that described that shared buffer memory is divided into the first predetermined number internal memory Block includes:
The shared buffer memory is divided into the memory block of the first predetermined number fixed byte length.
3. method according to claim 2, it is characterised in that store the communication data to the internal memory for completing registration Block includes:
Judge whether the byte length of the communication data is more than the byte length of the memory block;
If so, then the communication data is stored into the 4th predetermined number memory block;Wherein, the 4th predetermined number The byte length summation of the memory block is more than or equal to the byte length of the communication data, and the second predetermined number adds the 3rd Predetermined number is more than or equal to the 4th predetermined number;
If it is not, in any one memory block then stored the communication data into the memory block for completing registration.
4. according to any one of claim 1-3 methods described, it is characterised in that send the communication data in the memory block Include to receiving terminal:
The communication data in the memory block is sent by send/receive patterns and RDMA read patterns to connect to described Receiving end.
5. method according to claim 4, it is characterised in that also include:
After the communication data is all sent to the receiving terminal, the data in the memory block are deleted, and it is pre- to nullify the 3rd If the quantity memory block.
6. a kind of system based on rdma protocol message communicating, it is characterised in that including:
Distribute module is cached, for shared buffer memory to be divided into the first predetermined number memory block, and the second predetermined number is registered The individual memory block;Wherein, the second predetermined number is less than the first predetermined number;
Judge module, for judging whether the byte length of communication data is more than the byte long of memory block described in the second predetermined number Spend summation;
Registering modules, the byte length summation for being more than memory block described in the second predetermined number when the byte length of communication data When, registration the 3rd predetermined number memory block;Wherein, the byte length summation of the 3rd predetermined number memory block adds The byte length summation of the upper second predetermined number memory block is more than or equal to the byte length of the communication data, and the 3rd Predetermined number is less than or equal to the first predetermined number plus the second predetermined number;
Memory module, for the communication data to be stored into the memory block for completing registration;
Sending module, for sending the communication data in the memory block to receiving terminal.
7. system according to claim 6, it is characterised in that the caching distribute module includes:
Division unit, the memory block for the shared buffer memory to be divided into the first predetermined number fixed byte length.
8. system according to claim 7, it is characterised in that the memory module includes:
Length determining unit, for judging whether the byte length of the communication data is more than the byte length of the memory block;
Merge memory cell, for when the byte length of the communication data is more than the byte length of the memory block, by institute Communication data is stated to store into the 4th predetermined number memory block;Wherein, the word of the 4th predetermined number memory block Save the byte length that length summation is more than or equal to the communication data, and the second predetermined number is more than etc. plus the 3rd predetermined number In the 4th predetermined number;
Single memory cell, for when the byte length of the communication data is less than the byte length of the memory block, then will The communication data is stored in any one memory block into the memory block for completing registration.
9. according to any one of the claim 6-8 systems, it is characterised in that the sending module is specifically by send/ Receive patterns and RDMA read patterns send the communication data in the memory block to the module of the receiving terminal.
10. system according to claim 9, it is characterised in that also include:
Recycling module, for after the communication data is all sent to the receiving terminal, deleting the data in the memory block, And nullify the 3rd predetermined number memory block.
CN201710565927.3A 2017-07-12 2017-07-12 A kind of method and system based on rdma protocol message communicating Pending CN107147590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710565927.3A CN107147590A (en) 2017-07-12 2017-07-12 A kind of method and system based on rdma protocol message communicating

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710565927.3A CN107147590A (en) 2017-07-12 2017-07-12 A kind of method and system based on rdma protocol message communicating

Publications (1)

Publication Number Publication Date
CN107147590A true CN107147590A (en) 2017-09-08

Family

ID=59776495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710565927.3A Pending CN107147590A (en) 2017-07-12 2017-07-12 A kind of method and system based on rdma protocol message communicating

Country Status (1)

Country Link
CN (1) CN107147590A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908474A (en) * 2017-10-27 2018-04-13 郑州云海信息技术有限公司 A kind of Memory Allocation application method and system based on rdma protocol
CN109194721A (en) * 2018-08-15 2019-01-11 无锡江南计算技术研究所 A kind of asynchronous RDMA communication dynamic memory management method and system
CN109669788A (en) * 2018-12-10 2019-04-23 西安微电子技术研究所 The MPI implementation method of multi core chip towards direct memory access interconnection communication
CN110191194A (en) * 2019-06-13 2019-08-30 华中科技大学 A kind of Distributed File System Data transmission method and system based on RDMA network
CN110321220A (en) * 2019-06-18 2019-10-11 上海交通大学 A kind of MAC layer memory pool and its division methods for DRC
CN112954068A (en) * 2021-03-09 2021-06-11 西安奥卡云数据科技有限公司 RDMA (remote direct memory Access) -based data transmission method and device
WO2022002020A1 (en) * 2020-06-29 2022-01-06 北京一流科技有限公司 Data transmission system and method in static network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853238A (en) * 2010-06-01 2010-10-06 华为技术有限公司 Message communication method and system between communication processors
CN102571925A (en) * 2011-12-19 2012-07-11 华中科技大学 RDMA (Remote Direct Memory Access)-based data access method in fiber channel environment
CN106844041A (en) * 2016-12-29 2017-06-13 华为技术有限公司 The method and internal storage management system of memory management

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853238A (en) * 2010-06-01 2010-10-06 华为技术有限公司 Message communication method and system between communication processors
CN102571925A (en) * 2011-12-19 2012-07-11 华中科技大学 RDMA (Remote Direct Memory Access)-based data access method in fiber channel environment
CN106844041A (en) * 2016-12-29 2017-06-13 华为技术有限公司 The method and internal storage management system of memory management

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908474A (en) * 2017-10-27 2018-04-13 郑州云海信息技术有限公司 A kind of Memory Allocation application method and system based on rdma protocol
CN109194721A (en) * 2018-08-15 2019-01-11 无锡江南计算技术研究所 A kind of asynchronous RDMA communication dynamic memory management method and system
CN109669788A (en) * 2018-12-10 2019-04-23 西安微电子技术研究所 The MPI implementation method of multi core chip towards direct memory access interconnection communication
CN110191194A (en) * 2019-06-13 2019-08-30 华中科技大学 A kind of Distributed File System Data transmission method and system based on RDMA network
CN110321220A (en) * 2019-06-18 2019-10-11 上海交通大学 A kind of MAC layer memory pool and its division methods for DRC
CN110321220B (en) * 2019-06-18 2023-06-27 上海交通大学 MAC layer memory pool aiming at DRC and dividing method thereof
WO2022002020A1 (en) * 2020-06-29 2022-01-06 北京一流科技有限公司 Data transmission system and method in static network
CN112954068A (en) * 2021-03-09 2021-06-11 西安奥卡云数据科技有限公司 RDMA (remote direct memory Access) -based data transmission method and device

Similar Documents

Publication Publication Date Title
CN107147590A (en) A kind of method and system based on rdma protocol message communicating
US11522673B2 (en) Method and device for blockchain full sharding based on a P2P storage network and a multi-layer architecture
US20150127649A1 (en) Efficient implementations for mapreduce systems
CN104158757B (en) A kind of gps data enters library processing method and system
CN102724035B (en) Encryption and decryption method for encrypt card
CN105677597A (en) Data writing method and device
CN105993148B (en) Network interface
CN104615684A (en) Mass data communication concurrent processing method and system
CN109086879B (en) Method for realizing dense connection neural network based on FPGA
CN103986585A (en) Message preprocessing method and device
CN110851474A (en) Data query method, database middleware, data query device and storage medium
CN110336677B (en) Block packing and broadcasting method and system, equipment and storage medium
CN107579929A (en) A kind of method to set up, system and relevant apparatus for being reliably connected communication queue pair
CN103258389B (en) The method of self-aided terminal upload file, system and self-aided terminal
CN106254270A (en) A kind of queue management method and device
CN109446126A (en) DSP and FPGA high-speed communication system and method based on EMIF bus
CN110659143B (en) Communication method and device between containers and electronic equipment
CN108833200A (en) A kind of adaptive unidirectional transmission method of large data files and device
CN115982091B (en) RDMA engine-based data processing method and system, medium and equipment
CN103701865A (en) Data transmission method and system
CN101753580A (en) Packet processing chip and data storage and forwarding method thereof
CN103442091A (en) Data transmission method and device
CN103488597A (en) First-in first-out buffer and data reading-writing method thereof
CN107436848B (en) Method and device for realizing conversion between user data and compressed data
CN106407307A (en) Interaction method and interaction device for node data of distributed database

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170908