[go: up one dir, main page]

CN103853676B - Channel distribution, release, data transmission method and the system of Based PC Ie bus - Google Patents

Channel distribution, release, data transmission method and the system of Based PC Ie bus Download PDF

Info

Publication number
CN103853676B
CN103853676B CN201410123672.1A CN201410123672A CN103853676B CN 103853676 B CN103853676 B CN 103853676B CN 201410123672 A CN201410123672 A CN 201410123672A CN 103853676 B CN103853676 B CN 103853676B
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.)
Active
Application number
CN201410123672.1A
Other languages
Chinese (zh)
Other versions
CN103853676A (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

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides the channel distribution of a kind of Based PC Ie bus, release, data transmission method and system, the wherein method for channel allocation of Based PC Ie bus, directorial area is marked off at PCIe space, the free area adapted with channel distribution application by being stored in the free area chained list of directorial area to find, therefrom mark off the channel connecting transmitting terminal with receiving terminal, PCIe space represents RC and accesses the window of EP memory area, RC can obtain channel distribution application the very first time and be identified in directorial area, directorial area and resource pool are respectively positioned on PCIe space, make directorial area can find, by being stored in the free area therein chained list very first time, the free area adapted with channel distribution application, and in resource pool, mark off the channel connecting transmitting terminal with receiving terminal.Therefore, the invention provides channel distribution, release, data transmission method and the system of a kind of Based PC Ie bus that resource pool effectively can be managed.

Description

Channel distribution, release, data transmission method and the system of Based PC Ie bus
Technical field
The present invention relates to a kind of channel distribution, release, data transmission method and system.Specifically Say channel distribution, release, data transmission method and the system relating to a kind of Based PC Ie bus.
Background technology
PCIe contains PCIe control as a kind of local bus, the most most processors Device processed connects external equipment, is used for the data transmission carrying out between peripheral hardware and processor.Mutually Many concepts in networking have appeared in PCIe bus now, as exchanged, and route etc., PCIe bus is also made up of some levels, is broadly divided into transaction layer, data link layer and physics Layer, it quite has similar with network protocol stack.PCIe link is as a kind of " data end to end Load mode ", contain transmission logic and receive logic, it can be made up of a plurality of Lane, Namely X1, X2, X8, X16 etc. on ordinary meaning.PCIe bus specification experienced by After V1.0, V1.0a, V1.1, V2.0 and V2.1, upgrade to present V3.0, The peak bandwidth of its single Lane has reached 8GT/s.
Along with arriving and the continuous requirement of Consumer's Experience of multimedia era, big data are transmitted not The unprecedented challenge of disconnected experience, especially needs to transfer to when network data or collection data When carrying out information processing on different processors, the mode how designing a kind of intercore communication becomes Particularly important.A kind of fairly simple serial data transmission mode of main employing, main If processor moving data informs opposite end after PCIe space again, this method is in data volume Can meet demand when of little, but be as constantly supporting along with operating system multitask and The lifting at full speed of data volume, traditional method can not meet the demand of industrial quarters the most.
Notification number is CN103353861A, invention entitled " realizes distributed I/O resource pool Method and device, by main control root node, manage that its place calculates in node is all I/O node;By I/O dummy unit, virtualize the physics I/O node of its correspondence so that it is Possesses the ability simultaneously shared by multiple root nodes;By I/O Resource Broker unit, agency stays Stay and locally or remotely calculate the I/O resource in the I/O node that node connects, it is achieved I/O Resource is from the mapping in a PCIe territory to another PCIe territory so that root node and I/O resource Between define the transparent communication across PCIe territory.But this patent documentation virtualizes simply by I/O Many sharing modes, namely I/O resource is virtualized thus form one " resource pool ", Make different processors can share various data message, but do not provide " resource pool " Effective way to manage, cause in data handling process low to PCIe bus utilization, send The processor occupancy of end and receiving terminal is too high.
Summary of the invention
To this end, the technical problem to be solved is that prior art lacks resource pool Effectively way to manage, causes in data handling process low to PCIe bus utilization, transmitting terminal Too high with the processor occupancy of receiving terminal, thus propose one and resource pool can be carried out effectively Channel distribution, release, data transmission method and the system of the Based PC Ie bus of management.
For solving above-mentioned technical problem, technical scheme is as follows:
The invention provides the method for channel allocation of a kind of Based PC Ie bus, including walking as follows Rapid:
S1: marking off directorial area and resource pool at PCIe space, including in described resource pool can For setting up some pieces of free areas of channel;
S2: store the free area chained list corresponding with free area, described free time in described directorial area The position of each piece of free area described in district's chained list and space size;
S3: receive channel distribution application, find on the chained list of free area and distribute Shen with described channel The free area that please adapt;
S4: divide the channel connecting transmitting terminal with receiving terminal in the free area adapted.
The method for channel allocation of Based PC Ie bus of the present invention, described step S2 includes Following steps:
S21: position and the space size of the free area in resource pool are retouched with corresponding free area State symbol to describe;
S22: the bitmap labelling corresponding by free area descriptor, by bitmap and its sky pointed to Not busy district descriptor is stored in array, obtains free area chained list;
S23: free area chained list is stored in directorial area with data mode.
The method for channel allocation of Based PC Ie bus of the present invention, described step S3 includes Following steps:
S31: receive channel distribution application;
S32: the bitmap in the chained list of traversal free area, finds space to be more than by free area chained list Or it is equal to the free area of channel to be dispensed as the free area adapted;
S33: delete the bitmap corresponding to the free area adapted on the chained list of free area and it refers to To free area descriptor.
The method for channel allocation of Based PC Ie bus of the present invention, described step S4 includes Following steps:
S41: using the free area descriptor that adapts as channel descriptor, and this channel is retouched State the bitmap labelling that symbol is corresponding, this bitmap and its channel descriptor pointed to are stored in channel and retouch State symbol array;
S42: channel descriptor array is stored in the afterbody of directorial area;
S43: directorial area divides according to described channel descriptor array and connects transmitting terminal and receiving terminal Channel.
The method for channel allocation of Based PC Ie bus of the present invention, also comprises the steps:
S5: judge that the free area adapted the most also remains free area after marking off channel, if It is then position and the size corresponding free area descriptor of this residue free area to be described, and By bitmap labelling corresponding for this free area descriptor, afterwards by this bitmap and its free time pointed to District's descriptor joins the afterbody of free area chained list.
Present invention also offers the channel method for releasing of a kind of Based PC Ie bus, including as follows Step:
A1: mark off directorial area and resource pool at PCIe space, if including in described resource pool Involvement sending and receiving sending end and the channel of receiving terminal;
A2: determine whether that channel stops write data, if then entering step A3, otherwise Repeat this step;
A3: determine whether the request of this channel of forcible aborting, if nothing, then enters step A4, If having, then enter step A5;
A4: judge whether also have data in this channel, if nothing, then enters step A5, if having, Then repeat this step;
A5: discharge this channel.
The channel method for releasing of Based PC Ie bus of the present invention, described step A5 includes Following steps:
A51: travel through with the bitmap of the adjacent free area of this channel;
A52: if this channel has follow-up free area, then this follow-up free area is incorporated to this channel, And the position of the channel obtained after merging and size describe with corresponding channel descriptor, afterwards The bitmap labelling corresponding by this channel descriptor, and delete the follow-up free time in the chained list of free area The free area descriptor that district is corresponding, whether cyclic query has follow-up free area, until the most follow-up Step A53 is entered behind free area;
A53: if this channel has precursor free area, then by straight for channel descriptor corresponding for this channel Connecing and be incorporated to the free area descriptor that precursor free area is corresponding, whether cyclic query has precursor free area, Until entering step A54 after there is no precursor free area;
A54: if this channel does not has adjacent free area, then to be used by the channel descriptor of its correspondence Corresponding bitmap labelling, and this bitmap and its channel descriptor pointed to are directly placed into free area The afterbody of chained list.
Present invention also offers the data transmission method of a kind of Based PC Ie bus, including as follows Step:
The size of the data that M1: acquisition etc. are to be written;
M2: the size of the clear area in queried channel;
M3: compare clear area size in channel with etc. the size of data to be written;
M4: when the size of the data to be written such as the clear area in channel is more than or equal to, By etc. data write channel to be written.
Present invention also offers the channel assigning system of a kind of Based PC Ie bus, including:
Divide module, for marking off directorial area and resource pool, and described money at PCIe space The some pieces of free areas that can be used for setting up channel are included in pond, source;
First memory module, is positioned at described directorial area, for the free time that storage is corresponding with free area District's chained list, and the position of each piece of free area described in the chained list of described free area and space size;
First adaptation module, is positioned at described directorial area, is used for receiving channel distribution and applies for, and The free area adapted with the distribution application of described channel is found on the chained list of free area;
Channel assignment module, is positioned at described directorial area, for dividing even in the free area adapted Sending and receiving sending end and the channel of receiving terminal.
The channel assigning system of Based PC Ie bus of the present invention, described first storage mould Block farther includes:
Unit is described, for using corresponding by the position of the free area in resource pool and space size Free area descriptor describes;
First signal generating unit, for the bitmap labelling that free area descriptor is corresponding, by bitmap It is stored in array with its free area descriptor pointed to, obtains free area chained list;
First memory element, for the free area chained list that storage is corresponding with free area.
The channel assigning system of Based PC Ie bus of the present invention, the described first adaptive mould Block farther includes:
Receive unit, be used for receiving channel distribution application;
Adaptation unit, for traveling through the bitmap in the chained list of free area, is found by free area chained list Space is more than or equal to the free area of channel to be dispensed as the free area adapted;
Delete unit, for deleting the position corresponding to the free area adapted on the chained list of free area Figure and its free area descriptor pointed to.
The channel assigning system of Based PC Ie bus of the present invention, described channel distribution mould Block farther includes:
Second signal generating unit, for will the free area descriptor that adapt as channel descriptor, And by bitmap labelling corresponding for this channel descriptor, this bitmap and its channel pointed to are described Symbol is stored in channel descriptor array;
Second memory element, is positioned at the afterbody of described directorial area, is used for storing channel descriptor number Group;
Allocation unit, connects transmitting terminal and reception for dividing according to described channel descriptor array The channel of end.
The channel assigning system of Based PC Ie bus of the present invention, also includes:
Merge module, be positioned at directorial area, after judging that the free area adapted marks off channel The most also remain free area, the most then position and the size of this residue free area are used corresponding Free area descriptor describe, and by the bitmap labelling of this free area descriptor correspondence, afterwards This bitmap and its free area descriptor pointed to are joined the afterbody of free area chained list.
Present invention also offers the channel release system of a kind of Based PC Ie bus, including subregion Module, the first judge module, the second judge module, the 3rd judge module and release module;
Described division module, for marking off directorial area and resource pool at PCIe space, described Some connection transmitting terminals and the channel of receiving terminal is included in resource pool;
Described first judge module, is positioned at directorial area, is used for judging whether channel stops writing number According to, the most then start described second judge module, otherwise repeat to judge whether channel stops reading Enter data;
Described second judge module, is positioned at directorial area, is used for determining whether this letter of forcible aborting The request in road, if nothing, then starting described 3rd judge module, if having, then starting described release Module;
Described 3rd judge module, is positioned at directorial area, for judging the channel stopping reading in data In whether also have data, if nothing, then start described release module, if having, then repeat judgement and stop Only read in the channel of data and whether also have data;
Described release module, is positioned at directorial area, is used for discharging this channel.
The channel release system of Based PC Ie bus of the present invention, described release module is entered One step includes:
Traversal Unit, for traversal with the bitmap of the adjacent free area of this channel;
Predecessor cell, for when this channel has follow-up free area, is incorporated to this follow-up free area This channel, and the position of channel and the size that will obtain after merging retouch with corresponding channel descriptor State, afterwards by the bitmap labelling that this channel descriptor is corresponding, and delete in the chained list of free area The free area descriptor that follow-up free area is corresponding, whether cyclic query has follow-up free area, until Precursor unit is entered after there is no follow-up free area;
Precursor unit, for when this channel has precursor free area, by channel corresponding for this channel Descriptor is directly incorporated into the free area descriptor that precursor free area is corresponding, before whether cyclic query has Become free area, directly puts unit until entering after not having precursor control zone;
Directly put unit, for when this channel does not has adjacent free area, by the channel of its correspondence The bitmap labelling that descriptor is corresponding, and this bitmap and its channel descriptor pointed to directly are put Enter the afterbody of free area chained list.
Present invention also offers the data transmission system of a kind of Based PC Ie bus, including:
Size of data acquisition module, for the size of the data to be written such as acquisition;
Enquiry module, the size of the clear area in queried channel;
Comparison module, compare clear area in channel with etc. the size of data to be written;
Writing module, when the clear area in channel more than or equal to by etc. data to be written write Enter channel.
The technique scheme of the present invention has the advantage that compared to existing technology
(1) method for channel allocation of Based PC Ie bus of the present invention and system, PCIe space directly marks off directorial area, and by the free area chained list being stored in directorial area Find the free area adapted with channel distribution application, therefrom mark off connection transmitting terminal and reception The channel of end, either RC is as receiving terminal, or EP may be used as receiving terminal, directorial area Obtain channel distribution application with the very first time, and directorial area and resource pool are respectively positioned on PCIe sky Between so that directorial area can by be stored in the free area therein chained list very first time find with The free area that channel distribution application adapts, and in resource pool, it is organized in this free time adapted Zoning separates the channel connecting transmitting terminal with receiving terminal.Therefore, the invention provides one can The method for channel allocation of the Based PC Ie bus effectively managed resource pool and system, carry The high utilization rate of PCIe bus.Further, the channel of Based PC Ie bus of the present invention Distribution method and system, be to establish one on software view can be effectively improved PCIe total The model of line message transmission rate is therefore high with the multiple task operating system degree of coupling, it is simple to promote.
(2) method for channel allocation of Based PC Ie bus of the present invention and system, will money Position and the size corresponding free area descriptor of the free area in pond, source describe, and are used Corresponding bitmap labelling, is stored in array by bitmap and its free area descriptor pointed to afterwards, To free area chained list, and free area chained list is stored in directorial area.In data transmission procedure, logical Cross traversal bitmap, the information of its free area descriptor pointed to can be obtained, and then by the free time District's descriptor chooses the free area adapted, because bitmap is a guide, and shared sky Between the least, compared to free area descriptor, only need very short time can complete traversal, therefore, The method for channel allocation of Based PC Ie bus of the present invention and system, substantially reduce from Receive channel distribution application and be assigned the required time to channel, improve the management of resource pool Efficiency, is conducive to improving the speed of data transmission.
(3) method for channel allocation of Based PC Ie bus of the present invention and system, receive After channel distribution application, the bitmap in the chained list of traversal free area, finds sky by free area chained list Between more than or equal to the free area of channel to be dispensed as the free area adapted, permissible Guarantee to mark off space from this free area adapted and be sufficient for channel distribution application Channel, and, behind the selected free area adapted, its institute will be deleted on the chained list of free area The free area descriptor that corresponding bitmap and this bitmap point to, therefore, then has new channel to distribute After application, the free area adapted will be chosen from other free area to divide channel so that number Will not influence each other according to transmission, be equivalent to constitute the mimo system of a Based PC Ie bus, Improve transfer rate, improve communication quality.
(4) method for channel allocation of Based PC Ie bus of the present invention and system, by phase The free area descriptor adapted to is as channel descriptor, and by the position of this channel descriptor correspondence Figure labelling, is stored in channel descriptor array by the channel descriptor of this bitmap He its correspondence afterwards, Afterwards this channel descriptor array is stored in the afterbody of directorial area, in this way, directorial area The information of channel distribution can be obtained the very first time, mark off connection according to channel descriptor array Transmitting terminal and the channel of receiving terminal, improve transfer rate.Further, because free area chained list stores up It is stored in the head of directorial area, the channel descriptor array produced in channel allocation is stored in pipe The afterbody in reason district, can the use space in Compression manager district to greatest extent, discharge more Free area is used for participating in channel distribution, improves the handling capacity of information.
(5) method for channel allocation of Based PC Ie bus of the present invention and system, also can Judge that the free area adapted the most also remains free area after marking off channel, if having, will Position and the size corresponding free area descriptor of this residue free area are described, and by this sky Not busy district descriptor bitmap labelling, adds this bitmap and its free area descriptor pointed to afterwards To the afterbody of free area chained list, participate in new channel allocation.Therefore, of the present invention The method for channel allocation of Based PC Ie bus and system, it is possible to releasing idling to greatest extent District, it is provided that bigger information throughput.
(6) the channel method for releasing of Based PC Ie bus of the present invention and system, PCIe space marks off directorial area and resource pool, and therefore, directorial area can be within the shortest time Judge whether resource pool has channel stop write data, there is no asking of this channel of forcible aborting In the case of asking, when channel does not has data, it is possible to discharge this channel, this channel is made to release The space released participates in new channel distribution again, it is provided that bigger information throughput, number More smoothly according to transmission, and also determine whether the request of this channel of forcible aborting, if having, Even if channel still has data, this channel also can be discharged, more humane, it is possible to meet visitor The specific demand at family.
(7) the channel method for releasing of Based PC Ie bus of the present invention and system, at letter During road release, can travel through with the bitmap of the adjacent free area of channel, by this channel and its Follow-up or precursor free area merges, and participates in new channel distribution, it is possible to release to greatest extent Between emptying, improve handling capacity and the efficiency of information.During channel discharges, channel can be first Whether inquiry has follow-up free area, if it has, just follow-up free area is incorporated to channel, if do not had Having, just whether inquiry has precursor free area, if it has, channel is just incorporated to precursor free area, then Whether inquiry has precursor free area, if it has, be incorporated to new precursor free area the most always, until After there is no precursor free area, just channel is used bitmap labelling, and by this bitmap and its letter pointed to Road descriptor is directly placed into the afterbody of free area chained list, participates in new channel distribution, by this Mode, decreases the generation of descriptor, therefore substantially reduces the time of channel release.
(8) data transmission method of Based PC Ie bus of the present invention and system, first obtain The size of data to be written such as take, afterwards can the size of clear area in continuous polling channel, When the size of the data to be written such as the clear area in channel is more than or equal to, will wait The data write channel of write.In this way, even if in channel also there there is no the data of transmission Receiving end completely is read in, as long as the clear area in channel is more than or equal to waiting in line to write The data entered, will be transmitted such data write channel that is written to, it is not necessary to wait previous Individual data receiver is complete just starts write, it is achieved that the seamless transit of data, substantially reduces data Wait in line the time of write, improve the efficiency of transmission.
Accompanying drawing explanation
In order to make present disclosure be more likely to be clearly understood, below according to the tool of the present invention Body embodiment also combines accompanying drawing, and the present invention is further detailed explanation, wherein
Fig. 1 is the flow chart of the method for channel allocation of Based PC Ie bus of the present invention;
Fig. 2 is the flow chart of the channel method for releasing of Based PC Ie bus of the present invention;
Fig. 3 is the flow chart of the data transmission method of Based PC Ie bus of the present invention;
Fig. 4 is the structured flowchart of the channel assigning system of Based PC Ie bus of the present invention;
Fig. 5 is the structured flowchart of the channel release system of Based PC Ie bus of the present invention;
Fig. 6 is the structured flowchart of the data transmission system of Based PC Ie bus of the present invention;
Fig. 7 is bitmap, free area descriptor and the free area of Based PC Ie bus of the present invention Corresponding relation figure;
Fig. 8 is the schematic diagram of the channel distribution of Based PC Ie bus of the present invention;
Fig. 9 is the schematic diagram of the channel release of Based PC Ie bus of the present invention;
Figure 10 is the schematic diagram of the data transmission of Based PC Ie bus of the present invention;
Figure 11 is the state machine diagram of the channel distribution of Based PC Ie bus of the present invention;
Figure 12 is the state machine diagram of the channel release of Based PC Ie bus of the present invention.
In figure, reference is expressed as: 1-divides module, 2-the first memory module, and 3-first fits Joining module, 4-channel assignment module, 5-merges module, and 21-describes unit, and 22-first generates Unit, 23-the first memory element, 31-receives unit, 32-adaptation unit, and 33-deletes unit, 41-the second signal generating unit, 42-the second memory element, 43-allocation unit, 1a-division module, 2a-the first judge module, 3a-the second judge module, 4a-the 3rd judge module, 5a-discharges mould Block, 51a-Traversal Unit, 52a-predecessor cell, 53a-precursor unit, 54a-directly puts unit, 1m-size of data acquisition module, 2m-enquiry module, 3m-comparison module, 4m-writing module.
Detailed description of the invention
Embodiment 1
Present embodiments provide the method for channel allocation of a kind of Based PC Ie bus, such as Fig. 1 institute Show, comprise the steps:
S1: marking off directorial area and resource pool at PCIe space, including in described resource pool can For setting up some pieces of free areas of channel.
S2: store the free area chained list corresponding with free area, described free time in described directorial area The position of each piece of free area described in district's chained list and space size.
S3: receive channel distribution application, find on the chained list of free area and distribute Shen with described channel The free area that please adapt.
S4: divide the channel connecting transmitting terminal with receiving terminal in the free area adapted.
In the framework of general Based PC Ie bus, RC (root complex) is as one Master control connects an EP (end point), or connects multiple by PCIe bridge chip EP.RC is mapped by Inbound, accesses the ground of EP memory domain through PCIe space Space, location, EP is mapped by Outbound and equally accesses RC or other EP memorizeies The address space in territory, constitutes the transmission of downlink and uplink data, the most descending refers to RC to EP, and up refer to EP to RC or EP to EP.
The method for channel allocation of the Based PC Ie bus described in the present embodiment is straight at PCIe space Connect and mark off directorial area, and found by the free area chained list being stored in directorial area and divide with channel Join the free area that application adapts, therefrom mark off the channel connecting transmitting terminal with receiving terminal, because of Being the space that RC and EP shares for PCIe space, therefore, either RC is as receiving terminal, Or EP is as receiving terminal, directorial area can obtain channel distribution application the very first time, and And directorial area and resource pool are respectively positioned on PCIe space so that directorial area can be by being stored in it In the free area chained list very first time find and the free area that adapts of channel distribution application, and In resource pool, it is organized in this free area adapted marks off connection transmitting terminal and receiving terminal Channel.Therefore, present embodiments provide a kind of resource pool effectively can be managed based on The method for channel allocation of PCIe bus and system, improve the utilization rate of PCIe bus.Further, The method for channel allocation of the Based PC Ie bus described in the present embodiment and system, be at software layer A kind of model that can be effectively improved PCIe bus data transfer speed is established, therefore on face The system degree of coupling is high, it is simple to promote.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Channel allocation method, described step S2 comprises the steps:
S21: position and the space size of the free area in resource pool are retouched with corresponding free area State symbol to describe.
S22: the bitmap labelling corresponding by free area descriptor, by bitmap and its sky pointed to Not busy district descriptor is stored in array, obtains free area chained list.
S23: free area chained list is stored in directorial area with data mode.
The method for channel allocation of the Based PC Ie bus described in the present embodiment, its bitmap, free time District describes and meets the corresponding relation of free area as it is shown in fig. 7, by the position of the free area in resource pool Put and describe with size corresponding free area descriptor, and used the bitmap labelling of correspondence, it After bitmap and its free area descriptor pointed to are stored in array, obtain free area chained list, and will Free area chained list is stored in directorial area.In data transmission procedure, by traversal bitmap, can obtain Take its information of free area descriptor pointed to, and then chosen by free area descriptor and fit mutually The free area answered, because bitmap is a guide, shared space is the least, compared to the free time District's descriptor, only need very short time can complete traversal, therefore, described in the present embodiment based on The method for channel allocation of PCIe bus, substantially reduces from receiving channel distribution application to channel It is assigned the required time, improves the efficiency of management of resource pool, be conducive to improving data and pass Defeated speed.In the case of free area is sufficiently large, it is possible to carry out organizing the data of channel more simultaneously Transmission, transmitting terminal and receiving terminal can carry out data transmit-receive by multiple tasks, thus be formed A kind of multi-input multi-output system.Additionally when data are sent out to multiple opposite end in an opposite end, this Plant way to manage and be applicable to the data transmission scheme of multicast channel.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Channel allocation method, described step S3 comprises the steps:
S31: receive channel distribution application.
S32: the bitmap in the chained list of traversal free area, finds space to be more than by free area chained list Or it is equal to the free area of channel to be dispensed as the free area adapted.
S33: delete the bitmap corresponding to the free area adapted on the chained list of free area and it refers to To free area descriptor.
The method for channel allocation of the Based PC Ie bus described in the present embodiment, such as up channel (EP to RC), now, will process from each core at RC one waiting list of design Channel distribution application, EP informs the communication mode of RC, as the optional embodiment of one, MSI can be sent out and inform the distribution application of RC channel, as the optional embodiment of another kind, can To allow RC produce the application that a thread carrys out the up channel of continuous poll EP, down channel Informing mode is close with this, and this does not repeats.
The method for channel allocation of the Based PC Ie bus described in the present embodiment, it is former that channel distributes Reason as shown in Figure 8, after receiving channel distribution application, travels through the bitmap in the chained list of free area, logical Crossing free area chained list finds space to be more than or equal to the free area conduct of channel to be dispensed The free area adapted, it can be ensured that space can be marked off from this free area adapted and be enough to Meet the channel of channel distribution application, and, behind the selected free area adapted, will be at sky Its corresponding bitmap is deleted and free area descriptor that this bitmap points on not busy district chained list, therefore, After having new channel distribution application again, the free area adapted will be chosen from other free area and come Divide channel so that data transmission will not influence each other, and is equivalent to constitute a Based PC Ie The mimo system of bus, improves transfer rate, improves communication quality.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Channel allocation method, described step S4 comprises the steps:
S41: using the free area descriptor that adapts as channel descriptor, and this channel is retouched State the bitmap labelling that symbol is corresponding, this bitmap and its channel descriptor pointed to are stored in channel and retouch State symbol array.
S42: channel descriptor array is stored in the afterbody of directorial area.
S43: directorial area divides according to described channel descriptor array and connects transmitting terminal and receiving terminal Channel.
The method for channel allocation of the Based PC Ie bus described in the present embodiment, it is former that channel distributes Reason as shown in Figure 8, using the free area descriptor that adapts as channel descriptor, and by this letter The bitmap labelling that road descriptor is corresponding, deposits the channel descriptor of this bitmap He its correspondence afterwards Enter channel descriptor array, afterwards this channel descriptor array is stored in the afterbody of directorial area, logical Crossing this mode, directorial area can obtain the information of channel distribution the very first time, retouches according to channel State symbol array and mark off the channel connecting transmitting terminal with receiving terminal, improve transfer rate.Further, Because free area chained list is stored in the head of directorial area, the channel that will produce in channel allocation Descriptor array is stored in the afterbody of directorial area, can the use in Compression manager district to greatest extent empty Between, discharge more free area and distribute for participating in channel, improve the handling capacity of information.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Channel allocation method, also comprises the steps:
S5: judge that the free area adapted the most also remains free area after marking off channel, if It is then position and the size corresponding free area descriptor of this residue free area to be described, and By bitmap labelling corresponding for this free area descriptor, afterwards by this bitmap and its free time pointed to District's descriptor joins the afterbody of free area chained list.
The method for channel allocation of the Based PC Ie bus described in the present embodiment, it is former that channel distributes As shown in Figure 8, whether the free area adapted by judgement also has residue after marking off channel to reason Free area, if having, will retouch the position of this residue free area and size with corresponding free area State symbol to describe, and by this free area descriptor bitmap labelling, afterwards by this bitmap and its sensing Free area descriptor join the afterbody of free area chained list, participate in new channel allocation. Therefore, the method for channel allocation of the Based PC Ie bus described in the present embodiment, it is possible to maximum limit The releasing idling district of degree, it is provided that bigger information throughput.
Embodiment 2
Present embodiments provide the channel method for releasing of a kind of Based PC Ie bus, such as Fig. 2 institute Show, comprise the steps:
A1: mark off directorial area and resource pool at PCIe space, if including in described resource pool Involvement sending and receiving sending end and the channel of receiving terminal.
A2: determine whether that channel stops write data, if then entering step A3, otherwise Repeat this step.
A3: determine whether the request of this channel of forcible aborting, if nothing, then enters step A4, If having, then enter step A5.
A4: judge whether also have data in this channel, if nothing, then enters step A5, if having, Then repeat this step.
A5: discharge this channel.
The channel method for releasing of the Based PC Ie bus described in the present embodiment, when transmitting terminal no longer After having new data to send, channel i.e. stops reading in data, but the data in channel also may proceed to To receiving terminal transmission.The release process of channel is divided into pressure and optional both of which, and pressure is Carrying out forcible aborting in the case of having data in the channel, optional mode is to be received in data Termination discharges after harvesting again.
The channel method for releasing of the Based PC Ie bus described in the present embodiment, draws at PCIe space Separating directorial area and resource pool, therefore, directorial area can judge in resource pool within the shortest time Channel whether is had to stop reading in data, in the case of the request not having this channel of forcible aborting, When channel does not has data, it is possible to discharge this channel, make the space weight that this channel discharges Newly participate in new channel distribution, it is provided that bigger information throughput, data transmission is the most suitable Freely, and also determine whether the request of this channel of forcible aborting, if having, even if in channel Still there are data, also can discharge this channel, more humane, it is possible to meet the special need of client Ask.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Road method for releasing, described step A5 comprises the steps:
A51: travel through with the bitmap of the adjacent free area of this channel.
A52: if this channel has follow-up free area, then this follow-up free area is incorporated to this channel, And the position of the channel obtained after merging and size describe with corresponding channel descriptor, afterwards The bitmap labelling corresponding by this channel descriptor, and delete the follow-up free time in the chained list of free area The free area descriptor that district is corresponding, whether cyclic query has follow-up free area, until the most follow-up Step A53 is entered behind free area.
A53: if this channel has precursor free area, then by straight for channel descriptor corresponding for this channel Connecing and be incorporated to the free area descriptor that precursor free area is corresponding, whether cyclic query has precursor free area, Until entering step A54 after there is no precursor free area.
A54: if this channel does not has adjacent free area, then to be used by the channel descriptor of its correspondence Corresponding bitmap labelling, and this bitmap and its channel descriptor pointed to are directly placed into free area The afterbody of chained list.
The channel method for releasing of the Based PC Ie bus described in the present embodiment, the described follow-up free time District refers to frequency that is adjacent with channel and that be positioned at the free area after channel, such as channel 5-10, then frequency is the follow-up free area that the free area of 11-15 is this channel;Described precursor Free area refers to frequency that is adjacent with channel and that be positioned at the free area before channel, such as channel For 5-10, then frequency is the precursor free area that the free area of 0-4 is this channel.Specifically In enforcement, the principle of channel release is as it is shown in figure 9, because free time corresponding to precursor free area District's descriptor is natively positioned at free area chained list, therefore by straight for channel descriptor corresponding for this channel Connect and be incorporated to the free area descriptor that this precursor free area is corresponding, for follow-up free area, because of Descriptor for this channel is deleted after channel distributes, accordingly, it would be desirable to by channel The bitmap labelling that descriptor is corresponding, and this bitmap and its channel descriptor pointed to are put into sky New channel distribution could be participated in after the afterbody of not busy district chained list.During channel discharges, channel Can first inquire about and whether have follow-up free area, if it has, just follow-up free area is incorporated to channel, as Fruit does not has, and just whether inquiry has precursor free area, if it has, channel is just incorporated to precursor free area, Inquire about again and whether have precursor free area, if it has, be incorporated to new precursor free area, directly the most always After there is no precursor free area, just channel is used bitmap labelling, and by this bitmap and its sensing Channel descriptor is directly placed into the afterbody of free area chained list, participates in new channel distribution, by this The mode of kind, decreases the generation of descriptor, therefore substantially reduces the time of channel release.
The channel method for releasing of the Based PC Ie bus described in the present embodiment, in channel release During, can travel through with the bitmap of the adjacent free area of channel, by follow-up with it for this channel or The free area of precursor merges, and participates in new channel distribution, it is possible to Free up Memory to greatest extent, Improve 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 channel A step the most crucial during distribution and release, is an indispensable part, at transmitting terminal Initiate to create the beginning of channel, until receiving terminal senses this newly created channel and informs Transmitting terminal, all be unable to do without state machine, including forcing and release to channel under optional pattern, Being required to state machine to coordinate receiving-transmitting sides, informing mode can be MSI, it is also possible to logical Cross thread poll.Wherein the state machine diagram in channel allocation as shown in figure 11, release by channel State machine diagram during putting is as shown in figure 12.
The present embodiment additionally provides a kind of channel status machine design in a particular application, as Lower described:
Channel status includes following several:
CHANNEL_FREE,
CHANNEL_ALLOCATED,
CHANNEL_IDLE,
CHANNEL_BUSY,
CHANNEL_CONNECT,
CHANNEL_DISCONNECT,
CHANNEL_PACKET,
CHANNEL_NOPACKET,
CHANNEL_RUNNING,
CHANNEL_DEAD,
CHANNEL_ACK
Setting up as a example by process by up channel, the evolution process of channel status is described, channel divides After being made into merit, the state of channel is set to CHANNEL_ALLOCATED, and following originating end is to channel Carrying out initializing juxtaposition channel is CHANNEL_BUSY, and waits.On the most each core There is a thread constantly to go number and the status information of sense channel, the most here can also Inform with MSI, but shortcoming is to waste outbound window, when receiving terminal Thread has state channel being detected to be CHANNEL_BUSY, and receiving terminal goes to obtain such as channel Original position, the channel information such as size, the state of juxtaposition channel is CHANNEL_CONNECT. Transmitting terminal once finds that in waiting process channel status is CHANNEL_CONNECT, then confidence Road state is CHANNEL_NOPACKET, followed by sending data, once writes data Confidence road is CHANNEL_PACKET state, and receiving terminal has received data and can again confidence road be CHANNEL_NOPACKET state.
The release process of channel is divided into pressure and optional both of which, and pressure is to have in the channel Carrying out forcible aborting in the case of data, optional mode is that transmitting terminal puts CHANNEL_DEAD After channel to be waited is CHANNEL_ACK, the data receiving end in channel has received the most again Discharge.Transmitting terminal is first put CHANNEL_IDLE and waits, receiving terminal is carried out after perceiving Channel destroys juxtaposition CHANNEL_DISCONNECT, and transmitting terminal is experienced Stopping after CHANNEL_DISCONNECT waiting, the channel entering transmitting terminal is destroyed, the most rearmounted Channel status is CHANNEL_FREE.
Embodiment 4
Present embodiments provide the data transmission method of a kind of Based PC Ie bus, such as Fig. 3 institute Show, comprise the steps:
The size of the data that M1: acquisition etc. are to be written.
M2: the size of the clear area in queried channel.
M3: compare clear area size in channel with etc. the size of data to be written.
M4: when the size of the data to be written such as the clear area in channel is more than or equal to, By etc. data write channel to be written.
The data transmission method of the Based PC Ie bus described in the present embodiment, in being embodied as, Because transmitting terminal and receiving terminal can Access Management Access district because above the descriptor of packet Status Flag is required for transmitting terminal and receiving terminal is revised, it is necessary to designs a synchronization policy and keeps away Exempt from and send out the chaotic problem that rhythm causes.
In channel, the transmitting-receiving process of data is to utilize channel by the mode of read pointer and write pointer This circulates buffer, will first check that the previous packet of write pointer is retouched before writing every time State symbol, find that it does not has data, then judge present channel as sky, if data to be write are little In channel size, then data of writing direct;If its region pointed by previous descriptor has Data, then the traversal that goes ahead is dummy section until descriptor, inquires about the size of dummy section, Now there will be two kinds of situations, and a kind of is that the centre of channel has data, but both sides do not have data, If data are enough deposited in region the most below, then write data into region below, if Region below less than the size of packet to be write, then is gone to check that can dummy section above be write Entering, another situation is that the both sides of channel have data, and zone line is empty, the most directly examines Survey the size of area of space, the most then write data, again by after write pointer after write data Move.Receiving terminal constantly receives data according to write pointer, needs exist for Packet Descriptor Whether labelling active data area has data, the when of write data, labelling is carried out set, reads Go out clear labelling when of data.
The data transmission method of the Based PC Ie bus described in the present embodiment, first acquisition etc. are to be written The size of the data entered, afterwards can the size of clear area in continuous polling channel, work as channel In clear area when the size of data to be written such as being more than or equal to, by etc. to be written Data write channel.In this way, even if the data of transmission also do not have quilt the most completely in channel Receiving terminal reads in, as long as the clear area in channel is more than or equal to the number waiting in line write According to, such data write channel that is written to will be transmitted, it is not necessary to wait previous data Receive and just started write, it is achieved that the seamless transit of data, substantially reduced data queue etc. Time to be written, improve the efficiency of transmission.
Embodiment 5
Present embodiments provide the channel assigning system of a kind of Based PC Ie bus, such as Fig. 4 institute Show, including:
Divide module 1, for marking off directorial area and resource pool at PCIe space and described The some pieces of free areas that can be used for setting up channel are included in resource pool.
First memory module 2, is positioned at described directorial area, for the sky that storage is corresponding with free area Not busy district chained list, and the position of each piece of free area described in the chained list of described free area and space size.
First adaptation module 3, is positioned at described directorial area, is used for receiving channel distribution application, and Free area chained list finds the free area adapted with the distribution application of described channel.
Channel assignment module 4, is positioned at described directorial area, for dividing in the free area adapted Connect the channel of transmitting terminal and receiving terminal.
The channel assigning system of the Based PC Ie bus described in the present embodiment, by dividing module 1 directly marks off directorial area at PCIe space, and the first adaptation module 3 is divided receiving channel After joining application, found by the free area chained list being stored in the first memory module 2 and divide with channel Join the free area that application adapts, and therefrom marked off connection transmission by channel assignment module 4 End and the channel of receiving terminal, because PCIe space is the space that RC and EP shares, therefore, Either RC is as receiving terminal, or EP is as receiving terminal, and directorial area can the very first time Obtain channel distribution application, and directorial area and resource pool are respectively positioned on PCIe space so that pipe Reason district can find and channel distribution by being stored in the free area therein chained list very first time The free area that adapts of application, and in resource pool, be organized in this free area adapted mark off Connect the channel of transmitting terminal and receiving terminal.Therefore, present embodiments providing one can be to resource The channel assigning system of the Based PC Ie bus that pond effectively manages, improves PCIe bus Utilization rate.Further, the channel assigning system of the Based PC Ie bus described in the present embodiment, Software view establishes and a kind of can be effectively improved PCIe bus data transfer speed Model, therefore the system degree of coupling is high, it is simple to promote.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Road distribution system, described first memory module 2 farther includes:
Unit 21 is described, for by the position of the free area in resource pool and space size phase The free area descriptor answered describes.
First signal generating unit 22, for the bitmap labelling that free area descriptor is corresponding, will Bitmap and its free area descriptor pointed to are stored in array, obtain free area chained list.
First memory element 23, for the free area chained list that storage is corresponding with free area.
The channel assigning system of the Based PC Ie bus described in the present embodiment, by describing unit Position and the size corresponding free area descriptor of the free area in resource pool are described by 21, Afterwards by bitmap labelling corresponding to the first signal generating unit 22, afterwards by bitmap and its The free area descriptor pointed to is stored in array, obtains free area chained list, and is deposited by free area chained list Enter the first memory element 23.In data transmission procedure, by traversal bitmap, can obtain Its information of free area descriptor pointed to, and then chosen by free area descriptor and adapt Free area because bitmap is a guide, shared space is the least, compared to free area Descriptor, only need very short time can complete traversal, therefore, described in the present embodiment based on The channel assigning system of PCIe bus, substantially reduces from receiving channel distribution application to channel It is assigned the required time, improves the efficiency of management of resource pool, be conducive to improving data and pass Defeated speed.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Road distribution system, described first adaptation module 3 farther includes:
Receive unit 31, be used for receiving channel distribution application.
Adaptation unit 32, for traveling through the bitmap in the chained list of free area, by free area chained list Space is found to be more than or equal to the free area of channel to be dispensed as the free time adapted District.
Delete unit 33, for deleting corresponding to the free area adapted on the chained list of free area Bitmap and its point to free area descriptor.
The channel assigning system of the Based PC Ie bus described in the present embodiment, by receiving unit After 31 receive channel distribution application, travel through the bitmap in the chained list of free area by adaptation unit 32, And then find space to be more than or equal to the free time of channel to be dispensed by free area chained list District is as the free area adapted, it can be ensured that can mark off sky from this free area adapted Between be sufficient for the channel of channel distribution application, and, behind the selected free area adapted, just Its corresponding bitmap can be deleted on the chained list of free area by deleting unit 33 and this bitmap refers to To free area descriptor, therefore, then after having the distribution application of new channel, will be empty from other Not busy district chooses the free area adapted to divide channel so that data transmission will not influence each other, Be equivalent to constitute the mimo system of a Based PC Ie bus, improve transfer rate, change It is apt to communication quality.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Road distribution system, described channel assignment module 4 farther includes:
Second signal generating unit 41, describes as channel for the free area descriptor that will adapt Symbol, and by bitmap labelling corresponding for this channel descriptor, by this bitmap and its channel pointed to Descriptor is stored in channel descriptor array.
Second memory element 42, is positioned at the afterbody of described directorial area, is used for storing channel and describes Symbol array.
Allocation unit 43, for according to described channel descriptor array divide connect transmitting terminal with The channel of receiving terminal.
The channel assigning system of the Based PC Ie bus described in the present embodiment, generates by second This channel as channel descriptor, and is described by unit 41 by the free area descriptor that adapts The bitmap labelling that symbol is corresponding, is stored in channel by the channel descriptor of this bitmap He its correspondence afterwards Descriptor array, and it is deposited into the second memory element 42, in this way, distribution is single Unit 43 can obtain the information of channel distribution the very first time, divides according to channel descriptor array Go out to connect the channel of transmitting terminal and receiving terminal, improve transfer rate.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Road distribution system, also includes:
Merge module 5, be positioned at directorial area, for judging that the free area adapted marks off channel After the most also remain free area, the most then by position and the size phase of this residue free area The free area descriptor answered describes, and by bitmap labelling corresponding for this free area descriptor, it After this bitmap and its free area descriptor pointed to are joined the afterbody of free area chained list.
The channel assigning system of the Based PC Ie bus described in the present embodiment, by merging module 5 judge that the free area adapted the most also remains free area, if having, just after marking off channel The position of this residue free area and size corresponding free area descriptor can be described, and should Free area descriptor bitmap labelling, adds this bitmap and its free area descriptor pointed to afterwards Enter the afterbody to free area chained list, participate in new channel allocation.Therefore, the present embodiment The method for channel allocation of described Based PC Ie bus and system, it is possible to discharge to greatest extent Free area, it is provided that bigger information throughput.
Embodiment 6
Present embodiments provide the channel release system of a kind of Based PC Ie bus, such as Fig. 5 institute Show, including division module 1a, the first judge module 2a, the second judge module 3a, the 3rd sentence Disconnected module 4a and release module 5a.
Described division module 1a, for marking off directorial area and resource pool, institute at PCIe space Some connection transmitting terminals and the channel of receiving terminal is included in stating resource pool.
Described first judge module 2a, is positioned at directorial area, is used for judging whether channel stops write Data, the most then start described second judge module 3a, otherwise repeat whether judge channel Stop reading in data.
Described second judge module 3a, is positioned at directorial area, is used for determining whether that forcible aborting should The request of channel, if nothing, then starting described 3rd judge module 4a, if having, then starting institute State release module 5a.
Described 3rd judge module 4a, is positioned at directorial area, for judging the letter stopping reading in data Whether road also has data, if nothing, then starting described release module 5a, if having, then repeating Judge whether the channel stopping reading in data also has data.
Described release module 5a, is positioned at directorial area, is used for discharging this channel.
The channel release system of the Based PC Ie bus described in the present embodiment, passes through division module 1a marks off directorial area and resource pool at PCIe space, and therefore, directorial area can be the most in short-term In judge whether resource pool has channel to stop reading data, there is no this channel of forcible aborting Request in the case of, when channel does not has data, it is possible to discharge this channel, make this letter The space that road discharges participates in new channel distribution again, it is provided that bigger information throughput, Data transmission is more smoothly, and also can determine whether forcible aborting by the second judge module 3a The request of this channel, if having, even if still there being data in channel, also can pass through release module 5a discharges this channel, more humane, it is possible to meet the specific demand of client.
As one preferred embodiment, the letter of the Based PC Ie bus described in the present embodiment Road release system, described release module 5a farther includes:
Traversal Unit 51a, for traversal with the bitmap of the adjacent free area of this channel.
Predecessor cell 52a, for when this channel has follow-up free area, by this follow-up free area It is incorporated to this channel, and the position of the channel that will obtain after merging and size describe with corresponding channel Symbol describes, afterwards by the bitmap labelling that this channel descriptor is corresponding, and in the chained list of free area Deleting the free area descriptor that follow-up free area is corresponding, whether cyclic query has follow-up free area, Until entering precursor unit 53a after there is no follow-up free area.
Precursor unit 53a, for when this channel has precursor free area, by corresponding for this channel Channel descriptor is directly incorporated into the free area descriptor that precursor free area is corresponding, and whether cyclic query There is precursor free area, directly putting unit 54a until entering after there is no precursor control zone.
Directly put unit 54a, for when this channel does not has adjacent free area, by its correspondence The bitmap labelling that channel descriptor is corresponding, and by straight to this bitmap and its channel descriptor pointed to Connect the afterbody putting into free area chained list.
The channel release system of the Based PC Ie bus described in the present embodiment, in channel release During, by Traversal Unit 51a traversal with the bitmap of the adjacent free area of channel, and can lead to Cross predecessor cell 52a and precursor unit 53a by follow-up with it for this channel or the free area of precursor Merge, participate in new channel distribution, it is possible to Free up Memory to greatest extent, improve information Handling capacity and efficiency.
Embodiment 7
Present embodiments provide the data transmission system of a kind of Based PC Ie bus, such as Fig. 6 institute Show, including:
Size of data acquisition module 1m, for the size of the data to be written such as acquisition.
Enquiry module 2m, the size of the clear area in queried channel.
Comparison module 3m, compare clear area in channel with etc. the size of data to be written.
Writing module 4m, when the clear area in channel more than or equal to by etc. number to be written According to write channel.
The data transmission system of the Based PC Ie bus described in the present embodiment, passes through size of data The size of the data to be written such as acquisition module 1m first acquisition, can pass through enquiry module 2m afterwards The constantly size of the clear area in polling channel, and compared in channel by comparison module 3m Clear area with etc. the size of data to be written, when the clear area in channel more than or When the size of data to be written such as being equal to, by writing module 4m by etc. data to be written Write channel.In this way, even if the data of transmission are not also received completely in channel End reads in, as long as the clear area in channel is more than or equal to the data waiting in line write, Such data write channel that is written to will be transmitted, it is not necessary to wait previous data receiver Complete just start write, it is achieved that the seamless transit of data, substantially reduce data queue etc. to be written The time entered, improve the efficiency of transmission.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, be System or computer program.Therefore, the present invention can use complete hardware embodiment, completely Software implementation or the form of the embodiment in terms of combining software and hardware.And, the present invention Can use and can use at one or more computers wherein including computer usable program code Storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) is upper real The form of the computer program executed.
The present invention is with reference to method according to embodiments of the present invention, equipment (system) and to calculate The flow chart of machine program product and/or block diagram describe.It should be understood that can be by computer program Instruct each flow process in flowchart and/or block diagram and/or square frame and flow chart And/or the flow process in block diagram and/or the combination of square frame.These computer programs can be provided to refer to Order processes to general purpose computer, special-purpose computer, Embedded Processor or other programmable datas The processor of equipment is to produce a machine so that at computer or other programmable datas The instruction that the processor of reason equipment performs produces for realizing in one flow process or multiple of flow chart The device of the function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide computer or other numbers able to programme According in the computer-readable memory that processing equipment works in a specific way so that be stored in this meter Instruction in calculation machine readable memory produces the manufacture including command device, and this command device is real Now one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame The middle function specified.
These computer program instructions also can be loaded into computer or other programmable datas process On equipment so that perform sequence of operations step on computer or other programmable devices to produce Raw computer implemented process, thus the instruction performed on computer or other programmable devices There is provided for realizing at one flow process of flow chart or multiple flow process and/or one square frame of block diagram Or the step of the function specified in multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once Know basic creative concept, then these embodiments can be made other change and amendment. So, claims are intended to be construed to include preferred embodiment and fall into the scope of the invention All changes and amendment.

Claims (14)

1. the method for channel allocation of a Based PC Ie bus, it is characterised in that include as Lower step:
S1: mark off directorial area and resource pool at PCIe space, include in described resource pool Can be used for setting up some pieces of free areas of channel;
S2: store the free area chained list corresponding with free area, described sky in described directorial area The position of each piece of free area described in not busy district chained list and space size;
S3: receive channel distribution application, find on the chained list of free area and distribute with described channel The free area that application adapts;
S4: divide the channel connecting transmitting terminal with receiving terminal in the free area adapted.
The method for channel allocation of Based PC Ie bus the most according to claim 1, its Being characterised by, described step S2 comprises the steps:
S21: position and the space size of the free area in resource pool are used corresponding free area Descriptor describes;
S22: the bitmap labelling corresponding by free area descriptor, by bitmap and its sensing Free area descriptor is stored in array, obtains free area chained list;
S23: free area chained list is stored in directorial area with data mode.
The method for channel allocation of Based PC Ie bus the most according to claim 1, its Being characterised by, described step S3 comprises the steps:
S31: receive channel distribution application;
S32: the bitmap in the chained list of traversal free area, finds space big by free area chained list In or equal to the free area of channel to be dispensed as the free area adapted;
S33: delete on the chained list of free area the bitmap corresponding to the free area adapted and its The free area descriptor pointed to.
4. distribute according to the channel of the Based PC Ie bus described in any one of claim 1-3 Method, it is characterised in that described step S4 comprises the steps:
S41: using the free area descriptor that adapts as channel descriptor, and by this channel The bitmap labelling that descriptor is corresponding, is stored in letter by this bitmap and its channel descriptor pointed to Road descriptor array;
S42: channel descriptor array is stored in the afterbody of directorial area;
S43: directorial area divides according to described channel descriptor array and connects transmitting terminal and reception The channel of end.
5. distribute according to the channel of the Based PC Ie bus described in any one of claim 1-3 Method, it is characterised in that also comprise the steps:
S5: judge that the free area adapted the most also remains free area after marking off channel, The most then position and the size corresponding free area descriptor of this residue free area are described, And by bitmap labelling corresponding for this free area descriptor, afterwards by this bitmap and its sensing Free area descriptor joins the afterbody of free area chained list.
6. the channel method for releasing of a Based PC Ie bus, it is characterised in that include as Lower step:
A1: mark off directorial area and resource pool at PCIe space, include in described resource pool Some connection transmitting terminals and the channel of receiving terminal;
A2: determine whether that channel stops write data, if then entering step A3, otherwise Repeat this step;
A3: determine whether the request of this channel of forcible aborting, if nothing, then enters step A4, If having, then enter step A5;
A4: judge whether also have data in this channel, if nothing, then enters step A5, if having, Then repeat this step;
A5: discharge this channel.
The channel method for releasing of Based PC Ie bus the most according to claim 6, its Being characterised by, described step A5 comprises the steps:
A51: travel through with the bitmap of the adjacent free area of this channel;
A52: if this channel has follow-up free area, then this follow-up free area is incorporated to this channel, And the position of the channel obtained after merging and size describe with corresponding channel descriptor, it After by bitmap labelling corresponding for this channel descriptor, and delete follow-up in the chained list of free area The free area descriptor that free area is corresponding, whether cyclic query has follow-up free area, until not having Step A53 is entered after having follow-up free area;
A53: if this channel has precursor free area, then by channel descriptor corresponding for this channel Being directly incorporated into the free area descriptor that precursor free area is corresponding, whether cyclic query has precursor empty Not busy district, until entering step A54 after there is no precursor free area;
A54: if this channel does not has adjacent free area, then by the channel descriptor of its correspondence With corresponding bitmap labelling, and this bitmap and its channel descriptor pointed to are directly placed into sky The afterbody of not busy district chained list.
8. the channel assigning system of a Based PC Ie bus, it is characterised in that including:
Divide module (1), for marking off directorial area and resource pool at PCIe space, and The some pieces of free areas that can be used for setting up channel are included in described resource pool;
First memory module (2), is positioned at described directorial area, corresponding with free area for storage Free area chained list, and the position of each piece of free area described in the chained list of described free area and sky Between size;
First adaptation module (3), is positioned at described directorial area, is used for receiving channel distribution application, And on the chained list of free area, find the free area adapted with the distribution application of described channel;
Channel assignment module (4), is positioned at described directorial area, in the free area adapted Divide the channel connecting transmitting terminal with receiving terminal.
The channel assigning system of Based PC Ie bus the most according to claim 8, its Being characterised by, described first memory module (2) farther includes:
Unit (21) is described, for by the position of the free area in resource pool and space size Describe with corresponding free area descriptor;
First signal generating unit (22), for the bitmap labelling that free area descriptor is corresponding, Bitmap and its free area descriptor pointed to are stored in array, obtain free area chained list;
First memory element (23), for the free area chained list that storage is corresponding with free area.
The channel assigning system of Based PC Ie bus the most according to claim 8, its Being characterised by, described first adaptation module (3) farther includes:
Receive unit (31), be used for receiving channel distribution application;
Adaptation unit (32), for traveling through the bitmap in the chained list of free area, passes through free area Chained list finds space to be more than or equal to the free area of channel to be dispensed as adapting Free area;
Delete unit (33), for deleting the free area institute adapted on the chained list of free area Corresponding bitmap and its free area descriptor pointed to.
The channel of 11. Based PC Ie buses described in-10 any one according to Claim 8 divides Match system, it is characterised in that described channel assignment module (4) farther includes:
Second signal generating unit (41), the free area descriptor being used for adapting is as channel Descriptor, and by bitmap labelling corresponding for this channel descriptor, by this bitmap and its sensing Channel descriptor be stored in channel descriptor array;
Second memory element (42), is positioned at the afterbody of described directorial area, is used for storing channel Descriptor array;
Allocation unit (43), sends for dividing to connect according to described channel descriptor array End and the channel of receiving terminal.
The channel of 12. Based PC Ie buses described in-10 any one according to Claim 8 divides Match system, it is characterised in that also include:
Merge module (5), be positioned at directorial area, for judging that the free area adapted marks off Free area is the most also remained, the most then by the position of this residue free area with big after channel Little describe with corresponding free area descriptor, and by the bitmap of this free area descriptor correspondence Labelling, joins free area chained list by this bitmap and its free area descriptor pointed to afterwards Afterbody.
The channel release system of 13. 1 kinds of Based PC Ie buses, it is characterised in that include point District's module (1a), the first judge module (2a), the second judge module (3a), the 3rd sentence Disconnected module (4a) and release module (5a);
Described division module (1a), for marking off directorial area and resource pool at PCIe space, Some connection transmitting terminals and the channel of receiving terminal is included in described resource pool;
Described first judge module (2a), is positioned at directorial area, is used for judging whether channel stops Write data, the most then start described second judge module (3a), otherwise repeats to judge Whether channel stops reading in data;
Described second judge module (3a), is positioned at directorial area, is used for determining whether that pressure is released Put the request of this channel, if nothing, then start described 3rd judge module (4a), if having, Then start described release module (5a);
Described 3rd judge module (4a), is positioned at directorial area, is used for judging to stop reading in data Channel in whether also have data, if nothing, then start described release module (5a), if having, Then repeat whether the channel judging to stop reading in data also has data;
Described release module (5a), is positioned at directorial area, is used for discharging this channel.
The channel release system of 14. Based PC Ie buses according to claim 13, It is characterized in that, described release module (5a) farther includes:
Traversal Unit (51a), for traversal with the bitmap of the adjacent free area of this channel;
Predecessor cell (52a), for when this channel has follow-up free area, by this follow-up sky Not busy district is incorporated to this channel, and the position of the channel that will obtain after merging and size are believed with corresponding Road descriptor describes, afterwards by the bitmap labelling that this channel descriptor is corresponding, and in the free time District's chained list is deleted the free area descriptor that follow-up free area is corresponding, after whether cyclic query has Continue free area, until entering precursor unit (53a) after there is no follow-up free area;
Precursor unit (53a), for when this channel has precursor free area, by this channel pair The channel descriptor answered is directly incorporated into the free area descriptor that precursor free area is corresponding, and circulation is looked into Asking and whether have precursor free area, directly putting unit (54a) until entering after there is no precursor control zone;
Directly put unit (54a), for when this channel does not has adjacent free area, it is right The bitmap labelling that the channel descriptor answered is corresponding, and this bitmap and its channel pointed to are retouched State symbol and be directly placed into the afterbody of free area chained list.
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 CN103853676A (en) 2014-06-11
CN103853676B true 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)

Families Citing this family (5)

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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436165A (en) * 2007-11-15 2009-05-20 国际商业机器公司 System and method for management of an IOV adapter
CN101448069A (en) * 2007-11-27 2009-06-03 青岛海信电器股份有限公司 System and method for copying setup information of TV
CN102693198A (en) * 2012-05-12 2012-09-26 北京忆恒创源科技有限公司 DMA (direct memory access) transmission method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436165A (en) * 2007-11-15 2009-05-20 国际商业机器公司 System and method for management of an IOV adapter
CN101448069A (en) * 2007-11-27 2009-06-03 青岛海信电器股份有限公司 System and method for copying setup information of TV
CN102693198A (en) * 2012-05-12 2012-09-26 北京忆恒创源科技有限公司 DMA (direct memory access) transmission method and system

Also Published As

Publication number Publication date
CN103853676A (en) 2014-06-11

Similar Documents

Publication Publication Date Title
CN103853676B (en) Channel distribution, release, data transmission method and the system of Based PC Ie bus
US10325343B1 (en) Topology aware grouping and provisioning of GPU resources in GPU-as-a-Service platform
CN105408879B (en) The resource management in quick peripheral parts interconnected domain
CN103647807B (en) A kind of method for caching information, device and communication equipment
CN102648455B (en) Server and stream control routine
CN109426647A (en) For coordinating the technology of the accelerator installation resource of depolymerization
CN101616083B (en) Message forwarding method and device
CN107734558A (en) A kind of control of mobile edge calculations and resource regulating method based on multiserver
CN101652750B (en) Data processing device, distributed processing system and data processing method
CN103440202B (en) A kind of communication means based on RDMA, system and communication equipment
CN105391648B (en) For making the method for network flow registration process resource, calculating equipment and network controller
CN102497322A (en) High-speed packet filtering device and method realized based on shunting network card and multi-core CPU (Central Processing Unit)
CN109076029A (en) Technology for network I/O access
CN103530182A (en) Working scheduling method and device
CN105450618A (en) Operation method and operation system of big data process through API (Application Programming Interface) server
CN104901989A (en) Field service providing system and method
WO2017185285A1 (en) Method and device for assigning graphics processing unit task
CN104468390B (en) The method of multi-controller load balancing based on distribution centralized architecture model in software defined network
CN108111337B (en) Method and equipment for arbitrating main nodes in distributed system
WO2021213365A1 (en) Data processing method based on base station group, and base station, base station system, and computer-readable medium
CN109818810A (en) An access server connection optimization method, access server and communication system
CN106662895A (en) Computer device and data read-write method for computer device
CN106776014A (en) Parallel acceleration method and system in Heterogeneous Computing
CN107562669A (en) A kind of NVMe protocol commands processing method, apparatus and system
CN111309488A (en) Method and system for sharing computing resources of unmanned aerial vehicle cluster and computer storage medium

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