CN103853676A - PCIe (Peripheral Component Interface express) bus based channel allocating, releasing, data transmitting method and system - Google Patents

PCIe (Peripheral Component Interface express) bus based channel allocating, releasing, data transmitting method and system Download PDF

Info

Publication number
CN103853676A
CN103853676A CN201410123672.1A CN201410123672A CN103853676A CN 103853676 A CN103853676 A CN 103853676A CN 201410123672 A CN201410123672 A CN 201410123672A CN 103853676 A CN103853676 A CN 103853676A
Authority
CN
China
Prior art keywords
channel
free area
descriptor
area
bitmap
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
CN201410123672.1A
Other languages
Chinese (zh)
Other versions
CN103853676B (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.)
Suzhou Keda Technology Co Ltd
Original Assignee
Suzhou Keda 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 Suzhou Keda Technology Co Ltd filed Critical Suzhou Keda Technology Co Ltd
Priority to CN201410123672.1A priority Critical patent/CN103853676B/en
Publication of CN103853676A publication Critical patent/CN103853676A/en
Application granted granted Critical
Publication of CN103853676B publication Critical patent/CN103853676B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides PCIe (Peripheral Component Interface express) bus based channel allocating, releasing, data transmitting method and system. The PCIe bus based channel allocating method comprises the following steps: dividing a management area from PCIe space, finding an idle area adapted to channel allocating application through an idle area chain table stored in the management area and marking off a channel for connecting a sending end with a receiving end, wherein the PCIe space represents a window of RC (Root Complex) accessing an EP (End Point) storage area, the RC is capable of obtaining the channel allocating application first time and identifying the channel allocating application in the management area; both the management area and a resource pool are located in the PCIe space to ensure that the management area is capable of finding the idle area adapted to the channel allocating application through the idle area chain table stored in the management area first time and marking off the channel for connecting a sending end with a receiving end from the resource pool. Therefore, the PCIe bus based channel allocating, releasing, data transmitting method and system, provided by the invention, are capable of effectively managing the resource pool.

Description

Channel allocation, release, data transmission method and system based on PCIe bus
Technical field
The present invention relates to a kind of channel allocation, release, data transmission method and system.Relate in particular to a kind of channel allocation, release, data transmission method and system based on PCIe bus.
Background technology
PCIe is as a kind of local bus, and current most processors have all comprised PCIe controller and connected external unit, is used for carrying out the data transmission between peripheral hardware and processor.Many concepts in internet have all appeared in PCIe bus now, as exchange, and route etc., PCIe bus is also made up of some levels, is mainly divided into transaction layer, data link layer and Physical layer, it quite has similar with network protocol stack.PCIe link, as a kind of " data mode end to end ", has comprised transmission logic and receive logic, and it can be made up of many Lane, namely the X1 on ordinary meaning, X2, X8, X16 etc.PCIe bus specification is experiencing V1.0, V1.0a, and V1.1, after V2.0 and V2.1, has upgraded to present V3.0 at present, and the peak bandwidth of its single Lane has reached 8GT/s.
Along with the arriving of multimedia era and the continuous requirement of user's experience, large data transmission constantly meets with unprecedented challenge, especially need to transfer to while carrying out information processing on different processors when network data or image data, the mode that how to design a kind of internuclear communication becomes particularly important.Mainly adopt in the industry now a kind of fairly simple serial data transmission mode, mainly that processor moving data is informed opposite end behind PCIe space again, this method can satisfy the demands when data volume is little, but along with constantly support the lifting at full speed of multitask and data volume along with operating system, traditional method can not meet the demand of industry member gradually.
Notification number is CN103353861A, and denomination of invention is for " to realize method and the device of distributed I/O resource pool, by main control root node, to manage all I/O nodes in its place computing node; By I/O dummy unit, virtual its corresponding physical I/O node, makes it possess the ability of being shared by multiple root nodes simultaneously; By I/O Resource Broker unit, act on behalf of the I/O resource in the I/O node that resides in this locality or the connection of remote computation node, realize the mapping of I/O resource from a PCIe territory to another PCIe territory, make to have formed the transparent communication across PCIe territory between root node and I/O resource.But this patent documentation is just by the virtual many sharing modes of I/O, also thereby I/O resource is carried out to virtual formation a kind of " resource pool ", make different processors can share various data messages, but do not provide the effective way to manage to " resource pool ", cause in data handling process lowly to the total line use ratio of PCIe, the processor occupancy of transmitting terminal and receiving end is too high.
Summary of the invention
For this reason, technical matters to be solved by this invention is that prior art lacks the effective way to manage to resource pool, cause in data handling process low to the total line use ratio of PCIe, the processor occupancy of transmitting terminal and receiving end is too high, thereby proposes a kind of channel allocation based on PCIe bus, release, data transmission method and the system that can carry out to resource pool effectively management.
For solving the problems of the technologies described above, technical scheme of the present invention is as follows:
The invention provides a kind of method for channel allocation based on PCIe bus, comprise the steps:
S1: go out directorial area and resource pool in PCIe spatial division, comprise some free areas that can be used for setting up channel in described resource pool;
S2: store the free area chained list corresponding with free area in described directorial area, record position and the space size of each piece free area in the chained list of described free area;
S3: receive channel distributes application, finds the free area adapting with described channel allocation application on the chained list of free area;
S4: divide the channel that connects transmitting terminal and receiving end in the free area adapting.
Method for channel allocation based on PCIe bus of the present invention, described step S2 comprises the steps:
S21: the position of the free area in resource pool and space size are described with corresponding free area descriptor;
S22: by corresponding bitmap mark for the descriptor of free area, deposit the free area descriptor of bitmap and its sensing in array, obtain free area chained list;
S23: deposit free area chained list in directorial area with data mode.
Method for channel allocation based on PCIe bus of the present invention, described step S3 comprises the steps:
S31: receive channel distributes application;
S32: the bitmap in traversal free area chained list, finds free area that space is greater than or equal to the channel that will distribute as the free area adapting by free area chained list;
S33: the corresponding bitmap in free area that deletion adapts on the chained list of free area and the free area descriptor of its sensing.
Method for channel allocation based on PCIe bus of the present invention, described step S4 comprises the steps:
S41: using the free area descriptor adapting as channel descriptor, and by corresponding bitmap mark for this channel descriptor, deposit the channel descriptor of this bitmap and its sensing in channel descriptor array;
S42: the afterbody that channel descriptor array is deposited in to directorial area;
S43: directorial area is divided the channel that connects transmitting terminal and receiving end according to described channel descriptor array.
Method for channel allocation based on PCIe bus of the present invention, also comprises the steps:
S5: whether remain in addition free area after the free area that judgement adapts marks off channel, if, the position of this residue free area and size are described with corresponding free area descriptor, and by corresponding bitmap mark for this free area descriptor, afterwards the free area descriptor of this bitmap and its sensing is joined to the afterbody of free area chained list.
The present invention also provides a kind of channel method for releasing based on PCIe bus, comprises the steps:
A1: go out directorial area and resource pool in PCIe spatial division, comprise the channel of some connection transmitting terminals and receiving end in described resource pool;
A2: judged whether that channel stops data writing, if enter steps A 3, otherwise repeated this step;
A3: judge whether to force to discharge the request of this channel, if nothing enters steps A 4, if having, enter steps A 5;
A4: judge in this channel whether also have data, if nothing enters steps A 5, if having, repeat this step;
A5: discharge this channel.
Channel method for releasing based on PCIe bus of the present invention, described steps A 5 comprises the steps:
A51: traversal is with the bitmap of the adjacent free area of this channel;
A52: if this channel has follow-up free area, this follow-up free area is incorporated to this channel, and the position of the channel obtaining after merging and size are described with corresponding channel descriptor, afterwards by corresponding bitmap mark for this channel descriptor, and in the chained list of free area, delete free area descriptor corresponding to follow-up free area, whether cyclic query has follow-up free area, until do not have to enter steps A 53 behind follow-up free area;
A53: if this channel has precursor free area, channel descriptor corresponding this channel is directly incorporated into free area descriptor corresponding to precursor free area, whether cyclic query has precursor free area, until do not have to enter steps A 54 behind precursor free area;
A54: if this channel does not have adjacent free area, by corresponding bitmap mark for its corresponding channel descriptor, and the channel descriptor of this bitmap and its sensing is directly put into the afterbody of free area chained list.
The present invention also provides a kind of data transmission method based on PCIe bus, comprises the steps:
M1: the size of the data to be written such as obtaining;
M2: the size of the clear area in queried channel;
M3: the relatively clear area size and the size of waiting for data writing in channel;
M4: in the time that the clear area in channel such as is greater than or equal at data to be written big or small, by etc. data to be written write channel.
The present invention also provides a kind of channel assigning system based on PCIe bus, comprising:
Divide module, for going out directorial area and resource pool in PCIe spatial division, and in described resource pool, comprise some free areas that can be used for setting up channel;
The first memory module, is positioned at described directorial area, for storing the free area chained list corresponding with free area, and in the chained list of described free area, records position and the space size of each piece free area;
The first adaptation module, is positioned at described directorial area, distributes application, and on the chained list of free area, find the free area adapting with described channel allocation application for receive channel;
Channel assignment module, is positioned at described directorial area, divides the channel that connects transmitting terminal and receiving end for the free area adapting.
Channel assigning system based on PCIe bus of the present invention, described the first memory module further comprises:
Description unit, for describing the position of the free area of resource pool and space size with corresponding free area descriptor;
The first generation unit, for by corresponding bitmap mark for the descriptor of free area, deposits the free area descriptor of bitmap and its sensing in array, obtains free area chained list;
The first storage unit, for storing the free area chained list corresponding with free area.
Channel assigning system based on PCIe bus of the present invention, described the first adaptation module further comprises:
Receiving element, distributes application for receive channel;
Adaptation unit, for traveling through the bitmap of free area chained list, finds free area that space is greater than or equal to the channel that will distribute as the free area adapting by free area chained list;
Delete cells, for deleting the free area descriptor of the corresponding bitmap in free area that adapts and its sensing on the chained list of free area.
Channel assigning system based on PCIe bus of the present invention, described channel assignment module further comprises:
The second generation unit, for using the free area descriptor adapting as channel descriptor, and by corresponding bitmap mark for this channel descriptor, deposits the channel descriptor of this bitmap and its sensing in channel descriptor array;
The second storage unit, is positioned at the afterbody of described directorial area, for memory channel descriptor array;
Allocation units, for dividing the channel that connects transmitting terminal and receiving end according to described channel descriptor array.
Channel assigning system based on PCIe bus of the present invention, also comprises:
Merge module, be positioned at directorial area, for judging after the free area adapting marks off channel whether remain in addition free area, if, the position of this residue free area and size are described with corresponding free area descriptor, and by corresponding bitmap mark for this free area descriptor, afterwards the free area descriptor of this bitmap and its sensing is joined to the afterbody of free area chained list.
The present invention also provides a kind of channel delivery system based on PCIe bus, comprises division module, the first judge module, the second judge module, the 3rd judge module and release module;
Described division module, for going out directorial area and resource pool in PCIe spatial division, comprises the channel of some connection transmitting terminals and receiving end in described resource pool;
Described the first judge module, is positioned at directorial area, for judging whether channel stops data writing, if so, starts described the second judge module, otherwise repeats to judge whether channel stops reading data;
Described the second judge module, is positioned at directorial area, for judging whether to force to discharge the request of this channel, if nothing starts described the 3rd judge module, if having, starts described release module;
Described the 3rd judge module, is positioned at directorial area, and whether the channel that stops reading data for judging also has data, if nothing starts described release module, if having, repeats whether also have data in channel that judgement stops reading data;
Described release module, is positioned at directorial area, for discharging this channel.
Channel delivery system based on PCIe bus of the present invention, described release module further comprises:
Traversal unit, for traveling through the bitmap of the free area adjacent with this channel;
Follow-up unit, for in the time that this channel has follow-up free area, this follow-up free area is incorporated to this channel, and the position of the channel obtaining after merging and size are described with corresponding channel descriptor, afterwards by corresponding bitmap mark for this channel descriptor, and in the chained list of free area, delete free area descriptor corresponding to follow-up free area, whether cyclic query has follow-up free area, until do not have to enter precursor unit behind follow-up free area;
Precursor unit, in the time that this channel has precursor free area, is directly incorporated into free area descriptor corresponding to precursor free area by channel descriptor corresponding this channel, and whether cyclic query has precursor free area, until do not have to enter and directly put unit behind precursor control zone;
Directly put unit, in the time that this channel does not have adjacent free area, by corresponding bitmap mark for its corresponding channel descriptor, and the channel descriptor of this bitmap and its sensing is directly put into the afterbody of free area chained list.
The present invention also provides a kind of data transmission system based on PCIe bus, comprising:
Size of data acquisition module, for the size of data to be written such as obtaining;
Enquiry module, for the size of the clear area of queried channel;
Comparison module, relatively the clear area in channel with etc. the size of data to be written;
Writing module, when the clear area in channel be more than or equal to by etc. data to be written write channel.
Technique scheme of the present invention has the following advantages compared to existing technology:
(1) method for channel allocation and the system based on PCIe bus of the present invention, directly mark off directorial area in PCIe space, and find by the free area chained list being stored in directorial area the free area adapting with channel allocation application, therefrom mark off the channel that connects transmitting terminal and receiving end, no matter be that RC is as receiving end, or EP is as receiving end, directorial area can be obtained channel allocation application the very first time, and directorial area and resource pool are all positioned at PCIe space, make directorial area to find the free area adapting with channel allocation application by the free area chained list very first time being stored in wherein, and in resource pool, be organized in this free area adapting and mark off the channel that connects transmitting terminal and receiving end.Therefore, the invention provides a kind of method for channel allocation based on PCIe bus and the system that can carry out to resource pool effectively management, improved the utilization factor of PCIe bus.And method for channel allocation and the system based on PCIe bus of the present invention, is to have set up a kind of model that can effectively improve PCIe bus data transfer rate on software view, therefore high with the multiple task operating system degree of coupling, be convenient to promote.
(2) method for channel allocation and the system based on PCIe bus of the present invention, the position of the free area in resource pool and size are described with corresponding free area descriptor, and used corresponding bitmap mark, deposit the free area descriptor of bitmap and its sensing in array afterwards, obtain free area chained list, and deposit free area chained list in directorial area.In data transmission procedure, by traversal bitmap, can obtain the information of the free area descriptor of its sensing, and then choose the free area adapting by free area descriptor, because bitmap is a guide, shared space is very little, compared to free area descriptor, only need very short time can complete traversal, therefore, method for channel allocation and system based on PCIe bus of the present invention, greatly having shortened from receive channel distributes application to complete the required time to channel allocation, improve the efficiency of management of resource pool, be conducive to improve the speed of data transmission.
(3) method for channel allocation and the system based on PCIe bus of the present invention, receive after channel allocation application, bitmap in the chained list of traversal free area, find free area that space is greater than or equal to the channel that will distribute as the free area adapting by free area chained list, can guarantee to mark off from this free area adapting the channel that space is enough to meet channel allocation application, and, behind the selected free area adapting, will on the chained list of free area, delete the free area descriptor that its corresponding bitmap and this bitmap point to, therefore, have again after new channel allocation application, will choose the free area adapting from other free area and divide channel, data transmission can not be influenced each other, be equivalent to form a mimo system based on PCIe bus, promote transfer rate, improve communication quality.
(4) method for channel allocation and the system based on PCIe bus of the present invention, using the free area descriptor adapting as channel descriptor, and by corresponding bitmap mark for this channel descriptor, deposit this bitmap and its corresponding channel descriptor in channel descriptor array afterwards, afterwards this channel descriptor array is deposited in to the afterbody of directorial area, in this way, directorial area can be obtained the information of channel allocation the very first time, mark off the channel that connects transmitting terminal and receiving end according to channel descriptor array, improved transfer rate.And, because free area chained list is stored in the head of directorial area, the channel descriptor array producing in channel allocation is deposited in to the afterbody of directorial area, the usage space in Compression manager district to greatest extent, discharge more free area and be used for participating in channel allocation, improved the handling capacity of information.
(5) method for channel allocation and the system based on PCIe bus of the present invention, also can judge after the free area adapting marks off channel and whether remain in addition free area, if have, the position of this residue free area and size will be described with corresponding free area descriptor, and by this free area descriptor bitmap mark, the afterbody that afterwards the free area descriptor of this bitmap and its sensing is joined to free area chained list, participates in new channel allocation.Therefore, method for channel allocation and the system based on PCIe bus of the present invention, releasing idling district to greatest extent, provides larger information throughput.
(6) channel method for releasing and the system based on PCIe bus of the present invention, go out directorial area and resource pool in PCIe spatial division, therefore, whether directorial area can judge in resource pool within the shortest time has channel to stop data writing, in the case of not forcing to discharge the request of this channel, in the time there is no data in channel, just can discharge this channel, make the space that this channel discharges again participate in new channel allocation, larger information throughput is provided, data transmission is more smooth and easy, and can judge whether that pressure discharges the request of this channel, if have, even if still there are data in channel, also can discharge this channel, more humane, can meet client's specific demand.
(7) channel method for releasing and the system based on PCIe bus of the present invention, in the process discharging at channel, can travel through the bitmap of the free area adjacent with channel, the free area of follow-up with it this channel or precursor is merged, participate in new channel allocation, Free up Memory to greatest extent, has promoted handling capacity and the efficiency of information.In channel dispose procedure, whether channel can first be inquired about follow-up free area, if had, just follow-up free area is incorporated to channel, if do not had, just whether inquiry has precursor free area, if had, channel is just incorporated to precursor free area, whether inquiry has precursor free area again, if had, just be incorporated to new precursor free area always, until do not have behind precursor free area, just by channel bitmap mark, and the channel descriptor of this bitmap and its sensing is directly put into the afterbody of free area chained list, participate in new channel allocation, in this way, reduce the generation of descriptor, therefore greatly shortened the time that channel discharges.
(8) data transmission method and the system based on PCIe bus of the present invention, the size of data to be written such as first obtain, the size of the clear area in afterwards can continuous poll channel, in the time that the clear area in channel such as is greater than or equal at data to be written big or small, by etc. data to be written write channel.In this way, even if the data of transmitting in channel also do not have complete receiving end to read in, as long as the clear area in channel is greater than or equal to the data of waiting in line to write, these will be written to data writes channel and transmits, without etc. complete just beginning of previous data receiver write, realize the seamless transmission of data, greatly shortened the times to be written such as data queue, improved the efficiency of transmission.
Brief description of the drawings
For content of the present invention is more likely to be clearly understood, below according to a particular embodiment of the invention and by reference to the accompanying drawings, the present invention is further detailed explanation, wherein
Fig. 1 is the process flow diagram of the method for channel allocation based on PCIe bus of the present invention;
Fig. 2 is the process flow diagram of the channel method for releasing based on PCIe bus of the present invention;
Fig. 3 is the process flow diagram of the data transmission method based on PCIe bus of the present invention;
Fig. 4 is the structured flowchart of the channel assigning system based on PCIe bus of the present invention;
Fig. 5 is the structured flowchart of the channel delivery system based on PCIe bus of the present invention;
Fig. 6 is the structured flowchart of the data transmission system based on PCIe bus of the present invention;
Fig. 7 is the corresponding relation figure of bitmap, free area descriptor and the free area based on PCIe bus of the present invention;
Fig. 8 is the schematic diagram of the channel allocation based on PCIe bus of the present invention;
Fig. 9 is the schematic diagram that the channel based on PCIe bus of the present invention discharges;
Figure 10 is the schematic diagram of the data transmission based on PCIe bus of the present invention;
Figure 11 is the state machine diagram of the channel allocation based on PCIe bus of the present invention;
Figure 12 is the state machine diagram that the channel based on PCIe bus of the present invention discharges.
In figure, Reference numeral is expressed as: 1-divides module, 2-the first memory module, 3-the first adaptation module, 4-channel assignment module, 5-merges module, 21-description unit, 22-the first generation unit, 23-the first storage unit, 31-receiving element, 32-adaptation unit, 33-delete cells, 41-the second generation unit, 42-the second storage unit, 43-allocation units, 1a-division module, 2a-the first judge module, 3a-the second judge module, 4a-the 3rd judge module, 5a-release module, 51a-travels through unit, the follow-up unit of 52a-, 53a-precursor unit, 54a-is directly put unit, 1m-size of data acquisition module, 2m-enquiry module, 3m-comparison module, 4m-writing module.
Embodiment
Embodiment 1
The present embodiment provides a kind of method for channel allocation based on PCIe bus, as shown in Figure 1, comprises the steps:
S1: go out directorial area and resource pool in PCIe spatial division, comprise some free areas that can be used for setting up channel in described resource pool.
S2: store the free area chained list corresponding with free area in described directorial area, record position and the space size of each piece free area in the chained list of described free area.
S3: receive channel distributes application, finds the free area adapting with described channel allocation application on the chained list of free area.
S4: divide the channel that connects transmitting terminal and receiving end in the free area adapting.
In the general framework based on PCIe bus, RC (root complex) connects an EP (end point) as a master control, or connects multiple EP by PCIe bridge chip.RC shines upon by Inbound, visit the address space of EP memory domain through PCIe space, EP shines upon the address space that can access equally RC or other EP memory domains by Outbound, so just form descending and transmission upstream data, wherein descendingly refer to that RC is to EP, and uply refer to that EP is to RC or EP to EP.
The method for channel allocation based on PCIe bus described in the present embodiment, directly mark off directorial area in PCIe space, and find by the free area chained list being stored in directorial area the free area adapting with channel allocation application, therefrom mark off the channel that connects transmitting terminal and receiving end, because PCIe space is the space that RC and EP are shared, therefore, no matter be that RC is as receiving end, or EP is as receiving end, directorial area can be obtained channel allocation application the very first time, and directorial area and resource pool are all positioned at PCIe space, make directorial area to find the free area adapting with channel allocation application by the free area chained list very first time being stored in wherein, and in resource pool, be organized in this free area adapting and mark off the channel that connects transmitting terminal and receiving end.Therefore, the present embodiment provides a kind of method for channel allocation based on PCIe bus and the system that can carry out to resource pool effectively management, has improved the utilization factor of PCIe bus.And the method for channel allocation based on PCIe bus and system described in the present embodiment, be to have set up a kind of model that can effectively improve PCIe bus data transfer rate on software view, therefore system, coupled degree is high, is convenient to promote.
As one preferred embodiment, the method for channel allocation based on PCIe bus described in the present embodiment, described step S2 comprises the steps:
S21: the position of the free area in resource pool and space size are described with corresponding free area descriptor.
S22: by corresponding bitmap mark for the descriptor of free area, deposit the free area descriptor of bitmap and its sensing in array, obtain free area chained list.
S23: deposit free area chained list in directorial area with data mode.
The method for channel allocation based on PCIe bus described in the present embodiment, its bitmap, free area describe meet free area corresponding relation as shown in Figure 7, the position of the free area in resource pool and size are described with corresponding free area descriptor, and used corresponding bitmap mark, deposit the free area descriptor of bitmap and its sensing in array afterwards, obtain free area chained list, and deposit free area chained list in directorial area.In data transmission procedure, by traversal bitmap, can obtain the information of the free area descriptor of its sensing, and then choose the free area adapting by free area descriptor, because bitmap is a guide, shared space is very little, compared to free area descriptor, only need very short time can complete traversal, therefore, the method for channel allocation based on PCIe bus described in the present embodiment, has greatly shortened from receive channel and has distributed application to complete the required time to channel allocation, improve the efficiency of management of resource pool, be conducive to improve the speed of data transmission.The in the situation that of enough large in free area, can carry out the data transmission of many group channels, transmitting terminal and receiving end can carry out data transmit-receive by multiple tasks, thereby have formed a kind of multi-input multi-output system simultaneously.In the time that an opposite end is sent out data to multiple opposite end, this kind of way to manage is applicable to the data transmission scheme of multicast channel in addition.
As one preferred embodiment, the method for channel allocation based on PCIe bus described in the present embodiment, described step S3 comprises the steps:
S31: receive channel distributes application.
S32: the bitmap in traversal free area chained list, finds free area that space is greater than or equal to the channel that will distribute as the free area adapting by free area chained list.
S33: the corresponding bitmap in free area that deletion adapts on the chained list of free area and the free area descriptor of its sensing.
The method for channel allocation based on PCIe bus described in the present embodiment, such as up channel (EP to RC), now, to design a waiting list at RC and process the channel allocation application from each core, EP informs the communication mode of RC, as the optional embodiment of one, can send out MSI and inform the application of RC channel allocation, as the optional embodiment of another kind, can allow RC produce the application of the up channel of the next continuous poll EP of a thread, the informing mode of down channel is close therewith, and this does not repeat.
The method for channel allocation based on PCIe bus described in the present embodiment, the principle of channel allocation as shown in Figure 8, receive after channel allocation application, bitmap in the chained list of traversal free area, find free area that space is greater than or equal to the channel that will distribute as the free area adapting by free area chained list, can guarantee to mark off from this free area adapting the channel that space is enough to meet channel allocation application, and, behind the selected free area adapting, will on the chained list of free area, delete the free area descriptor that its corresponding bitmap and this bitmap point to, therefore, have again after new channel allocation application, will choose the free area adapting from other free area and divide channel, data transmission can not be influenced each other, be equivalent to form a mimo system based on PCIe bus, promote transfer rate, improve communication quality.
As one preferred embodiment, the method for channel allocation based on PCIe bus described in the present embodiment, described step S4 comprises the steps:
S41: using the free area descriptor adapting as channel descriptor, and by corresponding bitmap mark for this channel descriptor, deposit the channel descriptor of this bitmap and its sensing in channel descriptor array.
S42: the afterbody that channel descriptor array is deposited in to directorial area.
S43: directorial area is divided the channel that connects transmitting terminal and receiving end according to described channel descriptor array.
The method for channel allocation based on PCIe bus described in the present embodiment, the principle of channel allocation as shown in Figure 8, using the free area descriptor adapting as channel descriptor, and by corresponding bitmap mark for this channel descriptor, deposit this bitmap and its corresponding channel descriptor in channel descriptor array afterwards, afterwards this channel descriptor array is deposited in to the afterbody of directorial area, in this way, directorial area can be obtained the information of channel allocation the very first time, mark off the channel that connects transmitting terminal and receiving end according to channel descriptor array, improved transfer rate.And, because free area chained list is stored in the head of directorial area, the channel descriptor array producing in channel allocation is deposited in to the afterbody of directorial area, the usage space in Compression manager district to greatest extent, discharge more free area and be used for participating in channel allocation, improved the handling capacity of information.
As one preferred embodiment, the method for channel allocation based on PCIe bus described in the present embodiment, also comprises the steps:
S5: whether remain in addition free area after the free area that judgement adapts marks off channel, if, the position of this residue free area and size are described with corresponding free area descriptor, and by corresponding bitmap mark for this free area descriptor, afterwards the free area descriptor of this bitmap and its sensing is joined to the afterbody of free area chained list.
The method for channel allocation based on PCIe bus described in the present embodiment, the principle of channel allocation as shown in Figure 8, whether the free area adapting by judgement remains free area after marking off channel in addition, if have, the position of this residue free area and size will be described with corresponding free area descriptor, and by this free area descriptor bitmap mark, afterwards the free area descriptor of this bitmap and its sensing is joined to the afterbody of free area chained list, participate in new channel allocation.Therefore, the method for channel allocation based on PCIe bus described in the present embodiment, releasing idling district to greatest extent, provides larger information throughput.
Embodiment 2
The present embodiment provides a kind of channel method for releasing based on PCIe bus, as shown in Figure 2, comprises the steps:
A1: go out directorial area and resource pool in PCIe spatial division, comprise the channel of some connection transmitting terminals and receiving end in described resource pool.
A2: judged whether that channel stops data writing, if enter steps A 3, otherwise repeated this step.
A3: judge whether to force to discharge the request of this channel, if nothing enters steps A 4, if having, enter steps A 5.
A4: judge in this channel whether also have data, if nothing enters steps A 5, if having, repeat this step.
A5: discharge this channel.
The channel method for releasing based on PCIe bus described in the present embodiment, after transmitting terminal no longer includes new data and sends, channel stops reading data, but data in channel also can continue to receiving end transmission.The dispose procedure of channel is divided into be forced and optional two kinds of patterns, and pressure is the in the situation that of having data in channel, to force to discharge, and optional mode is to discharge after data receiving end receives again.
The channel method for releasing based on PCIe bus described in the present embodiment, go out directorial area and resource pool in PCIe spatial division, therefore, whether directorial area can judge in resource pool within the shortest time has channel to stop reading data, in the case of not forcing to discharge the request of this channel, in the time there is no data in channel, just can discharge this channel, make the space that this channel discharges again participate in new channel allocation, larger information throughput is provided, data transmission is more smooth and easy, and can judge whether that pressure discharges the request of this channel, if have, even if still there are data in channel, also can discharge this channel, more humane, can meet client's specific demand.
As one preferred embodiment, the channel method for releasing based on PCIe bus described in the present embodiment, described steps A 5 comprises the steps:
A51: traversal is with the bitmap of the adjacent free area of this channel.
A52: if this channel has follow-up free area, this follow-up free area is incorporated to this channel, and the position of the channel obtaining after merging and size are described with corresponding channel descriptor, afterwards by corresponding bitmap mark for this channel descriptor, and in the chained list of free area, delete free area descriptor corresponding to follow-up free area, whether cyclic query has follow-up free area, until do not have to enter steps A 53 behind follow-up free area.
A53: if this channel has precursor free area, channel descriptor corresponding this channel is directly incorporated into free area descriptor corresponding to precursor free area, whether cyclic query has precursor free area, until do not have to enter steps A 54 behind precursor free area.
A54: if this channel does not have adjacent free area, by corresponding bitmap mark for its corresponding channel descriptor, and the channel descriptor of this bitmap and its sensing is directly put into the afterbody of free area chained list.
The channel method for releasing based on PCIe bus described in the present embodiment, described follow-up free area refers to adjacent with channel and is positioned at the free area after channel, such as the frequency of channel is 5-10, the free area that frequency is 11-15 is the follow-up free area of this channel; Described precursor free area refers to adjacent with channel and is positioned at channel free area before, and such as the frequency of channel is 5-10, the free area that frequency is 0-4 is the precursor free area of this channel.In concrete enforcement, the principle that channel discharges as shown in Figure 9, because corresponding free area, precursor free area descriptor was located in free area chained list originally, therefore channel descriptor corresponding this channel is directly incorporated into free area descriptor corresponding to this precursor free area, for follow-up free area, because the descriptor of this channel is well rear deleted in channel allocation, therefore, need to be by corresponding bitmap mark for channel descriptor, and could participate in new channel allocation after the channel descriptor of this bitmap and its sensing being put into the afterbody of free area chained list.In channel dispose procedure, whether channel can first be inquired about follow-up free area, if had, just follow-up free area is incorporated to channel, if do not had, just whether inquiry has precursor free area, if had, channel is just incorporated to precursor free area, whether inquiry has precursor free area again, if had, just be incorporated to new precursor free area always, until do not have behind precursor free area, just by channel bitmap mark, and the channel descriptor of this bitmap and its sensing is directly put into the afterbody of free area chained list, participate in new channel allocation, in this way, reduce the generation of descriptor, therefore greatly shortened the time that channel discharges.
The channel method for releasing based on PCIe bus described in the present embodiment, in the process discharging at channel, can travel through the bitmap of the free area adjacent with channel, the free area of follow-up with it this channel or precursor is merged, participate in new channel allocation, Free up Memory to greatest extent, has promoted handling capacity and the efficiency of information.
Embodiment 3
On the basis of embodiment 1 and embodiment 2, the design of channel status machine is to realize a step more crucial in channel allocation and dispose procedure, it is an indispensable part, initiate to create the beginning of channel at transmitting terminal, sense the channel of this new establishment and inform transmitting terminal up to receiving end, all be unable to do without state machine, comprise the release to channel under pressure and optional pattern, all need state machine to coordinate receiving-transmitting sides, informing mode can be MSI, also can pass through thread poll.Wherein as shown in figure 11, the state machine diagram in channel dispose procedure as shown in figure 12 for the state machine diagram in channel allocation.
The present embodiment also provides the design proposal of a kind of channel status machine in concrete application, as described below:
Channel status comprises following several:
CHANNEL_FREE,
CHANNEL_ALLOCATED,
CHANNEL_IDLE,
CHANNEL_BUSY,
CHANNEL_CONNECT,
CHANNEL_DISCONNECT,
CHANNEL_PACKET,
CHANNEL_NOPACKET,
CHANNEL_RUNNING,
CHANNEL_DEAD,
CHANNEL_ACK
Taking up channel process of establishing as example, the evolution process of channel status is described, after channel allocation success, the state of channel is set to CHANNEL_ALLOCATED, and next channel is carried out to initialization juxtaposition channel is CHANNEL_BUSY to originating end, and waits for.Wherein on each core, there is a thread constantly to go number and the status information of sense channel, certainly also can inform with MSI here, but shortcoming is to waste outbound window, when having, the thread of receiving end detects that the state of channel is CHANNEL_BUSY, receiving end goes to obtain the reference position as channel, the channel informations such as size, the state of juxtaposition channel is CHANNEL_CONNECT.Once it is CHANNEL_CONNECT that transmitting terminal is found channel status in waiting process, putting channel status is CHANNEL_NOPACKET, next send data, once it is CHANNEL_PACKET state that data writing is put channel, receiving end receives data, and can again to put channel be CHANNEL_NOPACKET state.
The dispose procedure of channel is divided into be forced and optional two kinds of patterns, pressure is the in the situation that of having data in channel, to force to discharge, optional mode is after transmitting terminal is put CHANNEL_DEAD and will be waited for that channel is CHANNEL_ACK, after the data receiving end in channel receives, discharges again.Transmitting terminal is first put CHANNEL_IDLE and is waited for, after receiving end perceives, carry out channel and destroy juxtaposition CHANNEL_DISCONNECT, transmitting terminal stops waiting for after experiencing CHANNEL_DISCONNECT, enters the channel destruction of transmitting terminal, and the most rearmounted channel status is CHANNEL_FREE.
Embodiment 4
The present embodiment provides a kind of data transmission method based on PCIe bus, as shown in Figure 3, comprises the steps:
M1: the size of the data to be written such as obtaining.
M2: the size of the clear area in queried channel.
M3: the relatively clear area size and the size of waiting for data writing in channel.
M4: in the time that the clear area in channel such as is greater than or equal at data to be written big or small, by etc. data to be written write channel.
The data transmission method based on PCIe bus described in the present embodiment, in concrete enforcement, because transmitting terminal and receiving end can Access Management Access districts, because the Status Flag above the descriptor of packet all needs transmitting terminal and reception to bring in amendment, must design a synchronization policy and avoid receiving and dispatching the chaotic problem that rhythm causes.
In channel, the transmitting-receiving process of data is to utilize this circulation of channel buffer by the mode of read pointer and write pointer, before writing, all to first check the previous packet descriptor of write pointer at every turn, find that it does not have data, judge that current channel is as sky, if the data that write are less than channel size, the data of writing direct, if there are data in its previous descriptor region pointed, go ahead traversal until descriptor is dummy section, inquire about the size of dummy section, now there will be two kinds of situations, a kind of is that the centre of channel has data, but both sides do not have data, if the enough store data in region now below, data are write to region below, if region is below less than the size of wanting data writing bag, go to check that can dummy section above write, another situation is that the both sides of channel have data, and zone line is empty, the size of direct-detection area of space, if suitable, data writing, after data writing, will after write pointer, move again.Receiving end constantly receives data according to write pointer, needs packet descriptor to carry out mark active data area here and whether has data, when data writing, mark is carried out to set, clear mark when sense data.
The data transmission method based on PCIe bus described in the present embodiment, the size of data to be written such as first obtain, the size of the clear area in afterwards can continuous poll channel, in the time that the clear area in channel such as is greater than or equal at data to be written big or small, by etc. data to be written write channel.In this way, even if the data of transmitting in channel also do not have complete receiving end to read in, as long as the clear area in channel is greater than or equal to the data of waiting in line to write, these will be written to data writes channel and transmits, without etc. complete just beginning of previous data receiver write, realize the seamless transmission of data, greatly shortened the times to be written such as data queue, improved the efficiency of transmission.
Embodiment 5
The present embodiment provides a kind of channel assigning system based on PCIe bus, as shown in Figure 4, comprising:
Divide module 1, for going out directorial area and resource pool in PCIe spatial division, and in described resource pool, comprise some free areas that can be used for setting up channel.
The first memory module 2, is positioned at described directorial area, for storing the free area chained list corresponding with free area, and in the chained list of described free area, records position and the space size of each piece free area.
The first adaptation module 3, is positioned at described directorial area, distributes application, and on the chained list of free area, find the free area adapting with described channel allocation application for receive channel.
Channel assignment module 4, is positioned at described directorial area, divides the channel that connects transmitting terminal and receiving end for the free area adapting.
The channel assigning system based on PCIe bus described in the present embodiment, directly mark off directorial area by dividing module 1 in PCIe space, the first adaptation module 3 is receiving after channel allocation application, find by the free area chained list being stored in the first memory module 2 free area adapting with channel allocation application, and therefrom mark off the channel that connects transmitting terminal and receiving end by channel assignment module 4, because PCIe space is the space that RC and EP are shared, therefore, no matter be that RC is as receiving end, or EP is as receiving end, directorial area can be obtained channel allocation application the very first time, and directorial area and resource pool are all positioned at PCIe space, make directorial area to find the free area adapting with channel allocation application by the free area chained list very first time being stored in wherein, and in resource pool, be organized in this free area adapting and mark off the channel that connects transmitting terminal and receiving end.Therefore, the present embodiment provides a kind of can carry out the effectively channel assigning system based on PCIe bus of management to resource pool, has improved the utilization factor of PCIe bus.And the channel assigning system based on PCIe bus described in the present embodiment, is to have set up a kind of model that can effectively improve PCIe bus data transfer rate on software view, therefore system, coupled degree is high, is convenient to promote.
As one preferred embodiment, the channel assigning system based on PCIe bus described in the present embodiment, described the first memory module 2 further comprises:
Description unit 21, for describing the position of the free area of resource pool and space size with corresponding free area descriptor.
The first generation unit 22, for by corresponding bitmap mark for the descriptor of free area, deposits the free area descriptor of bitmap and its sensing in array, obtains free area chained list.
The first storage unit 23, for storing the free area chained list corresponding with free area.
The channel assigning system based on PCIe bus described in the present embodiment, by description unit 21, the position of the free area in resource pool and size are described with corresponding free area descriptor, afterwards by bitmap mark corresponding to the first generation unit 22 use, deposit the free area descriptor of bitmap and its sensing in array afterwards, obtain free area chained list, and deposit free area chained list in first storage unit 23.In data transmission procedure, by traversal bitmap, can obtain the information of the free area descriptor of its sensing, and then choose the free area adapting by free area descriptor, because bitmap is a guide, shared space is very little, compared to free area descriptor, only need very short time can complete traversal, therefore, the channel assigning system based on PCIe bus described in the present embodiment, has greatly shortened from receive channel and has distributed application to complete the required time to channel allocation, improve the efficiency of management of resource pool, be conducive to improve the speed of data transmission.
As one preferred embodiment, the channel assigning system based on PCIe bus described in the present embodiment, described the first adaptation module 3 further comprises:
Receiving element 31, distributes application for receive channel.
Adaptation unit 32, for traveling through the bitmap of free area chained list, finds free area that space is greater than or equal to the channel that will distribute as the free area adapting by free area chained list.
Delete cells 33, for deleting the free area descriptor of the corresponding bitmap in free area that adapts and its sensing on the chained list of free area.
The channel assigning system based on PCIe bus described in the present embodiment, receive after channel allocation application by receiving element 31, travel through the bitmap in the chained list of free area by adaptation unit 32, and then find free area that space is greater than or equal to the channel that will distribute as the free area adapting by free area chained list, can guarantee to mark off from this free area adapting the channel that space is enough to meet channel allocation application, and, behind the selected free area adapting, will on the chained list of free area, delete by delete cells 33 the free area descriptor that its corresponding bitmap and this bitmap point to, therefore, have again after new channel allocation application, will choose the free area adapting from other free area and divide channel, data transmission can not be influenced each other, be equivalent to form a mimo system based on PCIe bus, promote transfer rate, improve communication quality.
As one preferred embodiment, the channel assigning system based on PCIe bus described in the present embodiment, described channel assignment module 4 further comprises:
The second generation unit 41, for using the free area descriptor adapting as channel descriptor, and by corresponding bitmap mark for this channel descriptor, deposits the channel descriptor of this bitmap and its sensing in channel descriptor array.
The second storage unit 42, is positioned at the afterbody of described directorial area, for memory channel descriptor array.
Allocation units 43, for dividing the channel that connects transmitting terminal and receiving end according to described channel descriptor array.
The channel assigning system based on PCIe bus described in the present embodiment, by the second generation unit 41 using the free area descriptor adapting as channel descriptor, and by corresponding bitmap mark for this channel descriptor, deposit this bitmap and its corresponding channel descriptor in channel descriptor array afterwards, and deposited in the second storage unit 42, in this way, allocation units 43 can obtain the information of channel allocation the very first time, mark off the channel that connects transmitting terminal and receiving end according to channel descriptor array, improved transfer rate.
As one preferred embodiment, the channel assigning system based on PCIe bus described in the present embodiment, also comprises:
Merge module 5, be positioned at directorial area, for judging after the free area adapting marks off channel whether remain in addition free area, if, the position of this residue free area and size are described with corresponding free area descriptor, and by corresponding bitmap mark for this free area descriptor, afterwards the free area descriptor of this bitmap and its sensing is joined to the afterbody of free area chained list.
The channel assigning system based on PCIe bus described in the present embodiment, judge after the free area adapting marks off channel whether remain in addition free area by merging module 5, if have, the position of this residue free area and size will be described with corresponding free area descriptor, and by this free area descriptor bitmap mark, the afterbody that afterwards the free area descriptor of this bitmap and its sensing is joined to free area chained list, participates in new channel allocation.Therefore, the method for channel allocation based on PCIe bus and system described in the present embodiment, releasing idling district to greatest extent, provides larger information throughput.
Embodiment 6
The present embodiment provides a kind of channel delivery system based on PCIe bus, as shown in Figure 5, comprises division module 1a, the first judge module 2a, the second judge module 3a, the 3rd judge module 4a and release module 5a.
Described division module 1a, for going out directorial area and resource pool in PCIe spatial division, comprises the channel of some connection transmitting terminals and receiving end in described resource pool.
Described the first judge module 2a, is positioned at directorial area, for judging whether channel stops data writing, if so, starts described the second judge module 3a, otherwise repeats to judge whether channel stops reading data.
Described the second judge module 3a, is positioned at directorial area, for judging whether to force to discharge the request of this channel, if nothing starts described the 3rd judge module 4a, if having, starts described release module 5a.
Described the 3rd judge module 4a, is positioned at directorial area, and whether the channel that stops reading data for judging also has data, if nothing starts described release module 5a, if having, repeats whether also have data in channel that judgement stops reading data.
Described release module 5a, is positioned at directorial area, for discharging this channel.
The channel delivery system based on PCIe bus described in the present embodiment, go out directorial area and resource pool by division module 1a in PCIe spatial division, therefore, whether directorial area can judge in resource pool within the shortest time has channel to stop reading data, in the case of not forcing to discharge the request of this channel, in the time there is no data in channel, just can discharge this channel, make the space that this channel discharges again participate in new channel allocation, larger information throughput is provided, data transmission is more smooth and easy, and can judge whether that pressure discharges the request of this channel by the second judge module 3a, if have, even if still there are data in channel, also can discharge this channel by release module 5a, more humane, can meet client's specific demand.
As one preferred embodiment, the channel delivery system based on PCIe bus described in the present embodiment, described release module 5a further comprises:
Traversal unit 51a, for traveling through the bitmap of the free area adjacent with this channel.
Follow-up unit 52a, for in the time that this channel has follow-up free area, this follow-up free area is incorporated to this channel, and the position of the channel obtaining after merging and size are described with corresponding channel descriptor, afterwards by corresponding bitmap mark for this channel descriptor, and in the chained list of free area, delete free area descriptor corresponding to follow-up free area, whether cyclic query has follow-up free area, until do not have to enter precursor unit 53a behind follow-up free area.
Precursor unit 53a, for in the time that this channel has precursor free area, channel descriptor corresponding this channel is directly incorporated into free area descriptor corresponding to precursor free area, and whether cyclic query has precursor free area, until do not have to enter and directly put unit 54a behind precursor control zone.
Directly put unit 54a, in the time that this channel does not have adjacent free area, by corresponding bitmap mark for its corresponding channel descriptor, and the channel descriptor of this bitmap and its sensing is directly put into the afterbody of free area chained list.
The channel delivery system based on PCIe bus described in the present embodiment, in the process discharging at channel, can follow by traversal unit 51a traversal the bitmap of the free area that channel is adjacent, and by follow-up unit 52a and precursor unit 53a, the free area of follow-up with it this channel or precursor is merged, participate in new channel allocation, Free up Memory to greatest extent, has promoted handling capacity and the efficiency of information.
Embodiment 7
The present embodiment provides a kind of data transmission system based on PCIe bus, as shown in Figure 6, comprising:
Size of data acquisition module 1m, for the size of data to be written such as obtaining.
Enquiry module 2m, for the size of the clear area of queried channel.
Comparison module 3m, relatively the clear area in channel with etc. the size of data to be written.
Writing module 4m, when the clear area in channel be more than or equal to by etc. data to be written write channel.
The data transmission system based on PCIe bus described in the present embodiment, first obtain etc. the size of data to be written by size of data acquisition module 1m, afterwards can be by the size of the clear area in the continuous poll channel of enquiry module 2m, and by comparison module 3m relatively the clear area in channel with etc. the size of data to be written, in the time that the clear area in channel such as is greater than or equal at data to be written big or small, by writing module 4m by etc. data to be written write channel.In this way, even if the data of transmitting in channel also do not have complete receiving end to read in, as long as the clear area in channel is greater than or equal to the data of waiting in line to write, these will be written to data writes channel and transmits, without etc. complete just beginning of previous data receiver write, realize the seamless transmission of data, greatly shortened the times to be written such as data queue, improved the efficiency of transmission.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the present invention can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) that wherein include computer usable program code.
The present invention is with reference to describing according to process flow diagram and/or the block scheme of the method for the embodiment of the present invention, equipment (system) and computer program.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction that makes to carry out by the processor of computing machine or other programmable data processing device produces the device for realizing the function of specifying at flow process of process flow diagram or multiple flow process and/or square frame of block scheme or multiple square frame.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of specifying in flow process of process flow diagram or multiple flow process and/or square frame of block scheme or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computing machine or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of specifying in flow process of process flow diagram or multiple flow process and/or square frame of block scheme or multiple square frame on computing machine or other programmable devices.
Although described the preferred embodiments of the present invention, once those skilled in the art obtain the basic creative concept of cicada, can make other change and amendment to these embodiment.So claims are intended to be interpreted as comprising preferred embodiment and fall into all changes and the amendment of the scope of the invention.

Claims (16)

1. the method for channel allocation based on PCIe bus, is characterized in that, comprises the steps:
S1: go out directorial area and resource pool in PCIe spatial division, comprise some free areas that can be used for setting up channel in described resource pool;
S2: store the free area chained list corresponding with free area in described directorial area, record position and the space size of each piece free area in the chained list of described free area;
S3: receive channel distributes application, finds the free area adapting with described channel allocation application on the chained list of free area;
S4: divide the channel that connects transmitting terminal and receiving end in the free area adapting.
2. the method for channel allocation based on PCIe bus according to claim 1, is characterized in that, described step S2 comprises the steps:
S21: the position of the free area in resource pool and space size are described with corresponding free area descriptor;
S22: by corresponding bitmap mark for the descriptor of free area, deposit the free area descriptor of bitmap and its sensing in array, obtain free area chained list;
S23: deposit free area chained list in directorial area with data mode.
3. the method for channel allocation based on PCIe bus according to claim 1 and 2, is characterized in that, described step S3 comprises the steps:
S31: receive channel distributes application;
S32: the bitmap in traversal free area chained list, finds free area that space is greater than or equal to the channel that will distribute as the free area adapting by free area chained list;
S33: the corresponding bitmap in free area that deletion adapts on the chained list of free area and the free area descriptor of its sensing.
4. according to the arbitrary described method for channel allocation based on PCIe bus of claim 1-3, it is characterized in that, described step S4 comprises the steps:
S41: using the free area descriptor adapting as channel descriptor, and by corresponding bitmap mark for this channel descriptor, deposit the channel descriptor of this bitmap and its sensing in channel descriptor array;
S42: the afterbody that channel descriptor array is deposited in to directorial area;
S43: directorial area is divided the channel that connects transmitting terminal and receiving end according to described channel descriptor array.
5. according to the arbitrary described method for channel allocation based on PCIe bus of claim 1-4, it is characterized in that, also comprise the steps:
S5: whether remain in addition free area after the free area that judgement adapts marks off channel, if, the position of this residue free area and size are described with corresponding free area descriptor, and by corresponding bitmap mark for this free area descriptor, afterwards the free area descriptor of this bitmap and its sensing is joined to the afterbody of free area chained list.
6. the channel method for releasing based on PCIe bus, is characterized in that, comprises the steps:
A1: go out directorial area and resource pool in PCIe spatial division, comprise the channel of some connection transmitting terminals and receiving end in described resource pool;
A2: judged whether that channel stops data writing, if enter steps A 3, otherwise repeated this step;
A3: judge whether to force to discharge the request of this channel, if nothing enters steps A 4, if having, enter steps A 5;
A4: judge in this channel whether also have data, if nothing enters steps A 5, if having, repeat this step;
A5: discharge this channel.
7. the channel method for releasing based on PCIe bus according to claim 6, is characterized in that, described steps A 5 comprises the steps:
A51: traversal is with the bitmap of the adjacent free area of this channel;
A52: if this channel has follow-up free area, this follow-up free area is incorporated to this channel, and the position of the channel obtaining after merging and size are described with corresponding channel descriptor, afterwards by corresponding bitmap mark for this channel descriptor, and in the chained list of free area, delete free area descriptor corresponding to follow-up free area, whether cyclic query has follow-up free area, until do not have to enter steps A 53 behind follow-up free area;
A53: if this channel has precursor free area, channel descriptor corresponding this channel is directly incorporated into free area descriptor corresponding to precursor free area, whether cyclic query has precursor free area, until do not have to enter steps A 54 behind precursor free area;
A54: if this channel does not have adjacent free area, by corresponding bitmap mark for its corresponding channel descriptor, and the channel descriptor of this bitmap and its sensing is directly put into the afterbody of free area chained list.
8. the data transmission method based on PCIe bus, is characterized in that, comprises the steps:
M1: the size of the data to be written such as obtaining;
M2: the size of the clear area in queried channel;
M3: the relatively clear area size and the size of waiting for data writing in channel;
M4: in the time that the clear area in channel such as is greater than or equal at data to be written big or small, by etc. data to be written write channel.
9. the channel assigning system based on PCIe bus, is characterized in that, comprising:
Divide module (1), for going out directorial area and resource pool in PCIe spatial division, and in described resource pool, comprise some free areas that can be used for setting up channel;
The first memory module (2), is positioned at described directorial area, for storing the free area chained list corresponding with free area, and in the chained list of described free area, records position and the space size of each piece free area;
The first adaptation module (3), is positioned at described directorial area, distributes application, and on the chained list of free area, find the free area adapting with described channel allocation application for receive channel;
Channel assignment module (4), is positioned at described directorial area, divides the channel that connects transmitting terminal and receiving end for the free area adapting.
10. the channel assigning system based on PCIe bus according to claim 9, is characterized in that, described the first memory module (2) further comprises:
Description unit (21), for describing the position of the free area of resource pool and space size with corresponding free area descriptor;
The first generation unit (22), for by corresponding bitmap mark for the descriptor of free area, deposits the free area descriptor of bitmap and its sensing in array, obtains free area chained list;
The first storage unit (23), for storing the free area chained list corresponding with free area.
11. according to the channel assigning system based on PCIe bus described in claim 9 or 10, it is characterized in that, described the first adaptation module (3) further comprises:
Receiving element (31), distributes application for receive channel;
Adaptation unit (32), for traveling through the bitmap of free area chained list, finds free area that space is greater than or equal to the channel that will distribute as the free area adapting by free area chained list;
Delete cells (33), for deleting the free area descriptor of the corresponding bitmap in free area that adapts and its sensing on the chained list of free area.
12. according to the arbitrary described channel assigning system based on PCIe bus of claim 9-11, it is characterized in that, described channel assignment module (4) further comprises:
The second generation unit (41), for using the free area descriptor adapting as channel descriptor, and by corresponding bitmap mark for this channel descriptor, deposits the channel descriptor of this bitmap and its sensing in channel descriptor array;
The second storage unit (42), is positioned at the afterbody of described directorial area, for memory channel descriptor array;
Allocation units (43), for dividing the channel that connects transmitting terminal and receiving end according to described channel descriptor array.
13. according to the arbitrary described channel assigning system based on PCIe bus of claim 9-12, it is characterized in that, also comprises:
Merge module (5), be positioned at directorial area, for judging after the free area adapting marks off channel whether remain in addition free area, if, the position of this residue free area and size are described with corresponding free area descriptor, and by corresponding bitmap mark for this free area descriptor, afterwards the free area descriptor of this bitmap and its sensing is joined to the afterbody of free area chained list.
14. 1 kinds of channel delivery systems based on PCIe bus, is characterized in that, comprise division module (1a), the first judge module (2a), the second judge module (3a), the 3rd judge module (4a) and release module (5a);
Described division module (1a), for going out directorial area and resource pool in PCIe spatial division, comprises the channel of some connection transmitting terminals and receiving end in described resource pool;
Described the first judge module (2a), is positioned at directorial area, for judging whether channel stops data writing, if so, starts described the second judge module (3a), otherwise repeats to judge whether channel stops reading data;
Described the second judge module (3a), is positioned at directorial area, for judging whether to force to discharge the request of this channel, if nothing starts described the 3rd judge module (4a), if having, starts described release module (5a);
Described the 3rd judge module (4a), is positioned at directorial area, and whether the channel that stops reading data for judging also has data, if nothing starts described release module (5a), if having, repeats whether also have data in channel that judgement stops reading data;
Described release module (5a), is positioned at directorial area, for discharging this channel.
The 15. channel delivery systems based on PCIe bus according to claim 14, is characterized in that, described release module (5a) further comprises:
Traversal unit (51a), for traveling through the bitmap of the free area adjacent with this channel;
Follow-up unit (52a), for in the time that this channel has follow-up free area, this follow-up free area is incorporated to this channel, and the position of the channel obtaining after merging and size are described with corresponding channel descriptor, afterwards by corresponding bitmap mark for this channel descriptor, and in the chained list of free area, delete free area descriptor corresponding to follow-up free area, whether cyclic query has follow-up free area, until do not have to enter precursor unit (53a) behind follow-up free area;
Precursor unit (53a), for in the time that this channel has precursor free area, channel descriptor corresponding this channel is directly incorporated into free area descriptor corresponding to precursor free area, and whether cyclic query has precursor free area, until do not have to enter and directly put unit (54a) behind precursor control zone;
Directly put unit (54a), in the time that this channel does not have adjacent free area, by corresponding bitmap mark for its corresponding channel descriptor, and the channel descriptor of this bitmap and its sensing is directly put into the afterbody of free area chained list.
16. 1 kinds of data transmission systems based on PCIe bus, is characterized in that, comprising:
Size of data acquisition module (1m), for the size of data to be written such as obtaining;
Enquiry module (2m), for the size of the clear area of queried channel;
Comparison module (3m), relatively the clear area in channel with etc. the size of data to be written;
Writing module (4m), when the clear area in channel be more than or equal to by etc. data to be written write channel.
CN201410123672.1A 2014-03-28 2014-03-28 Channel distribution, release, data transmission method and the system of Based PC Ie bus Active CN103853676B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410123672.1A CN103853676B (en) 2014-03-28 2014-03-28 Channel distribution, release, data transmission method and the system of Based PC Ie bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410123672.1A CN103853676B (en) 2014-03-28 2014-03-28 Channel distribution, release, data transmission method and the system of Based PC Ie bus

Publications (2)

Publication Number Publication Date
CN103853676A true CN103853676A (en) 2014-06-11
CN103853676B CN103853676B (en) 2016-08-17

Family

ID=50861352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410123672.1A Active CN103853676B (en) 2014-03-28 2014-03-28 Channel distribution, release, data transmission method and the system of Based PC Ie bus

Country Status (1)

Country Link
CN (1) CN103853676B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099932A (en) * 2015-06-30 2015-11-25 华为技术有限公司 Scheduling method and device based on cut-through technology
WO2016095535A1 (en) * 2014-12-15 2016-06-23 中兴通讯股份有限公司 Resource allocation method and apparatus, and server
CN109446147A (en) * 2018-11-09 2019-03-08 郑州云海信息技术有限公司 A kind of data interactive method of network storage equipment and pcie equipment
CN111045817A (en) * 2019-11-08 2020-04-21 福州瑞芯微电子股份有限公司 PCIe transmission management method, system and device
WO2023126812A1 (en) * 2021-12-30 2023-07-06 Ati Technologies Ulc Allocating peripheral component interface express (pcie) streams in a configurable multiport pcie controller

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8141092B2 (en) * 2007-11-15 2012-03-20 International Business Machines Corporation Management of an IOV adapter through a virtual intermediary in a hypervisor with functional management in an IOV management partition
CN101448069A (en) * 2007-11-27 2009-06-03 青岛海信电器股份有限公司 System and method for copying setup information of TV
CN102693198B (en) * 2012-05-12 2015-03-25 北京忆恒创源科技有限公司 DMA (direct memory access) transmission method and system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016095535A1 (en) * 2014-12-15 2016-06-23 中兴通讯股份有限公司 Resource allocation method and apparatus, and server
CN105763485A (en) * 2014-12-15 2016-07-13 中兴通讯股份有限公司 Resource distribution method, device and server
CN105099932A (en) * 2015-06-30 2015-11-25 华为技术有限公司 Scheduling method and device based on cut-through technology
CN105099932B (en) * 2015-06-30 2018-06-05 华为技术有限公司 Dispatching method and device based on straight-through retransmission technique
CN109446147A (en) * 2018-11-09 2019-03-08 郑州云海信息技术有限公司 A kind of data interactive method of network storage equipment and pcie equipment
CN109446147B (en) * 2018-11-09 2022-02-18 郑州云海信息技术有限公司 Data interaction method of network storage device and pcie device
CN111045817A (en) * 2019-11-08 2020-04-21 福州瑞芯微电子股份有限公司 PCIe transmission management method, system and device
CN111045817B (en) * 2019-11-08 2023-09-26 瑞芯微电子股份有限公司 PCIe transmission management method, system and device
WO2023126812A1 (en) * 2021-12-30 2023-07-06 Ati Technologies Ulc Allocating peripheral component interface express (pcie) streams in a configurable multiport pcie controller

Also Published As

Publication number Publication date
CN103853676B (en) 2016-08-17

Similar Documents

Publication Publication Date Title
CN109983449B (en) Data processing method and storage system
CN103853676A (en) PCIe (Peripheral Component Interface express) bus based channel allocating, releasing, data transmitting method and system
CN104090847B (en) Address distribution method of solid-state storage device
CN103440202B (en) A kind of communication means based on RDMA, system and communication equipment
CN102594660B (en) A kind of virtual interface exchange method, Apparatus and system
CN103425538A (en) Process communication method and process communication system
CN109376123A (en) Manage method, distributed memory system and the management node of file
US10951741B2 (en) Computer device and method for reading or writing data by computer device
CN104102693A (en) Object processing method and device
CN108319496A (en) resource access method, service server, distributed system and storage medium
CN109388590A (en) Promote the dynamic buffering block management method and device of multi-channel DMA access performance
CN101452430B (en) Communication method between multi-processors and communication device comprising multi-processors
CN103324599A (en) Inter-processor communication method and system on chip
CN102314400A (en) Method and device for dispersing converged DMA (Direct Memory Access)
CN101303685A (en) Method for improving read-write data speed of all-purpose sequence bus storage equipment
CN104571934B (en) A kind of method, apparatus and system of internal storage access
CN113127139A (en) Memory allocation method and device based on data plane development kit DPDK
CN102291298B (en) Efficient computer network communication method oriented to long message
CN103019975A (en) Universal serial bus (USB) transmission control method and host equipment
CN101169766A (en) Method and system for dynamically establishing direct memory access passage
CN104899105A (en) Interprocess communication method
CN115883022B (en) DMA transmission control method, apparatus, electronic device and readable storage medium
CN105765542B (en) Access method, distributed memory system and the memory node of file
WO2014101502A1 (en) Memory access processing method based on memory chip interconnection, memory chip, and system
WO2023030178A1 (en) Communication method based on user-mode protocol stack, and corresponding apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant