CN109491948A - A kind of data processing method and device for solid state hard disk dual-port - Google Patents
A kind of data processing method and device for solid state hard disk dual-port Download PDFInfo
- Publication number
- CN109491948A CN109491948A CN201811377521.3A CN201811377521A CN109491948A CN 109491948 A CN109491948 A CN 109491948A CN 201811377521 A CN201811377521 A CN 201811377521A CN 109491948 A CN109491948 A CN 109491948A
- Authority
- CN
- China
- Prior art keywords
- queue
- serial number
- intended recipient
- message
- port
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the present application discloses a kind of data processing method and device for solid state hard disk dual-port, obtain the first message that intended recipient queue receives, if determining that intended recipient queue is first kind receiving queue according to object queue serial number, judge whether object queue serial number is equal to target port serial number, if then illustrating the first message that processing is sent to target port serial number corresponding ports, need to judge whether the resource in data management module meets preset condition, if not, then indicate inadequate resource in data management module, then keep the value of target port serial number constant, shield intended recipient queue, again abovementioned steps are executed for next intended recipient queue.As it can be seen that this programme does not handle first message in the case where inadequate resource, just first message is handled when resource is enough, it avoids the problem that resource is fought between two ports under out-of-resource condition, is rationally two port assignment resources, guarantees that the performance of two ports is consistent.
Description
Technical field
This application involves data processing fields, more particularly to a kind of data processing method for solid state hard disk dual-port
And device.
Background technique
With the rapid development of solid state hard disk (Solid State Disk, abbreviation SSD) technology, dual port technology is in enterprise
Application in grade storage system also becomes inevitable, due to its advantage in high reliability, has it naturally more wide
Wealthy prospect and market.
Dual-port can serve the same host, can also serve different hosts, and host can pass through dual-port
Concurrent access SSD, in the existing data processing method for SSD dual-port, the central processing unit (Central of SSD
Processing Unit, abbreviation CPU) message from dual-port can generally be handled according to reception sequence.
But this data processing method will appear the problem of resource is fought between two ports, in the field of inadequate resource
Especially prominent under scape, resource is fought for so that the CPU of SSD only handles the message from some port whithin a period of time, next
The section time only handles the message from another port, and resource allocation is uneven, and then the performance of two ports is caused to be shaken.
Summary of the invention
In order to solve the above-mentioned technical problem, this application provides a kind of data processing methods for solid state hard disk dual-port
And device, avoid the problem that resource is fought between two ports in the case where inadequate resource, to rationally be two port assignments
Resource guarantees that the performance of two ports is consistent.
The embodiment of the present application discloses following technical solution:
In a first aspect, the embodiment of the present application provides a kind of data processing method for solid state hard disk dual-port, it is described
The port of solid state hard disk includes two ports, which comprises
For intended recipient queue, the first message that the intended recipient queue receives, the intended recipient team are obtained
Column are determined according to object queue serial number;The object queue serial number identify the intended recipient queue classification and the mesh
Mark sequence of the queue in all receiving queues identical with its classification;
If determining that the intended recipient queue is first kind receiving queue according to the object queue serial number, the mesh is judged
Whether mark queue serial number is equal to target port serial number;The first kind receiving queue is corresponding to the port of the solid state hard disk
Receiving queue;The target port serial number identifies the affiliated port of first kind receiving queue of this poll priority processing;
If so, judging whether the resource in the data management module meets preset condition;
If judging, the resource in the data management module is unsatisfactory for preset condition, keeps the value of the target port serial number
It is constant, the intended recipient queue is shielded, and the object queue serial number is increased by 1, re-executed described for intended recipient
Queue, the step of obtaining the first message that the intended recipient queue receives.
If judging, the resource in the data management module meets preset condition, handles the first message, will be described
Target port serial number is assigned a value of the non-object queue serial number, re-executes described for intended recipient queue, obtains the mesh
The step of first message that mark receiving queue receives;The non-object queue serial number identifies the intended recipient team of poll next time
Port belonging to arranging is different from port described in the intended recipient queue of this poll.
Optionally, if judging, the object queue serial number is not equal to the target port serial number, the method also includes:
Judge whether the corresponding receiving queue of the target port serial number receives second message;
If so, judging whether the resource in the data management module meets preset condition;
If so, handling the second message, the target port serial number is assigned a value of the object queue serial number, is held again
Row is described to judge the step of whether the object queue serial number is equal to target port serial number.
Optionally, if determining that the intended recipient queue is the second class receiving queue, institute according to the object queue serial number
State the second class receiving queue be central processing unit in addition to the data management module receiving queue corresponding to other cores, it is described
Method further include:
The first message is handled, and the object queue serial number is increased by 1.
Optionally, if the intended recipient queue is shielded, in the processing first message, and by the target team
After column serial number increases by 1, the method also includes:
Open it is shielded state intended recipient queue, re-execute described for intended recipient queue, obtain the target
The step of first message that receiving queue receives.
Optionally, be directed to intended recipient queue described, obtain first message that the intended recipient queue receives it
Before, the method also includes:
Judge whether the intended recipient queue receives the first message;
If it is not, the object queue serial number is then increased by 1, re-executes and described judge whether the intended recipient queue connects
The step of receiving the first message.
Optionally, be directed to intended recipient queue described, obtain first message that the intended recipient queue receives it
Before, the method also includes:
Initialize the object queue serial number and the target port serial number.
Second aspect, the embodiment of the present application provides a kind of data processing equipment for solid state hard disk dual-port, described
The port of solid state hard disk includes two ports, and described device includes:
Acquiring unit obtains the first message that the intended recipient queue receives, institute for being directed to intended recipient queue
Stating intended recipient queue is determined according to object queue serial number;The object queue serial number identifies the intended recipient queue
The sequence of classification and the object queue in all receiving queues identical with its classification;
First judging unit, if for determining that the intended recipient queue connects for the first kind according to the object queue serial number
Queue is received, judges whether the object queue serial number is equal to target port serial number;The first kind receiving queue is the solid-state
Receiving queue corresponding to the port of hard disk;The first kind that the target port serial number identifies this poll priority processing receives team
Port belonging to arranging;
First judging unit judges institute after being also used to judge that the object queue serial number is equal to target port serial number
State whether the resource in data management module meets preset condition;
The screen unit, if being also used to judge, the resource in the data management module is unsatisfactory for preset condition, keeps
The value of the target port serial number is constant, shields the intended recipient queue, and the object queue serial number is increased by 1, triggering
The acquiring unit is directed to intended recipient queue described in re-executing, and obtains the first message that the intended recipient queue receives
The step of.
Processing unit, if judging that the resource in the data management module meets default item for first judging unit
When part, the first message is handled, the target port serial number is assigned a value of the non-object queue serial number, triggers the acquisition
Unit re-executes described the step of being directed to intended recipient queue, obtaining the first message that the intended recipient queue receives;
The non-object queue serial number identifies the intended recipient team of the affiliated port of intended recipient queue of poll and this poll next time
It is different to arrange the port.
Optionally, if first judging unit judges that the object queue serial number is not equal to the target port serial number,
Described device further include:
Second judgment unit, judges whether the corresponding receiving queue of the target port serial number receives second message;
If the second judgment unit is also used to judge the target port serial number, corresponding receiving queue receives second
When message, judge whether the resource in the data management module meets preset condition;
The processing unit, if being also used to the second judgment unit judges that the resource in the data management module meets
When preset condition, the second message is handled, the target port serial number is assigned a value of the object queue serial number, described in triggering
First judging unit re-executes described the step of whether the object queue serial number is equal to target port serial number judged.
Optionally, if first judging unit determines that the intended recipient queue is the according to the object queue serial number
Two class receiving queues, the second class receiving queue be in central processing unit in addition to the data management module corresponding to other cores
Receiving queue, the processing unit is also used to handle the first message, and the object queue serial number is increased by 1.
Optionally, if the intended recipient queue is shielded, described device further include:
Opening unit, be used to open it is shielded state intended recipient queue, trigger the acquiring unit re-execute it is described
For intended recipient queue, the step of obtaining the first message that the intended recipient queue receives.
Optionally, described device further include:
Third judging unit, for judging whether the intended recipient queue receives the first message;
The third judging unit judges that the intended recipient queue does not receive the first message, then by the target
Queue serial number increases by 1, trigger the acquiring unit re-execute it is described judge whether the intended recipient queue receive described in
The step of first message.
Optionally, described device further include:
Initialization unit, for initializing the object queue serial number and the target port serial number.
The embodiment of the present application has the advantage that it can be seen from above-mentioned technical proposal
For solid state hard disk dual-port, after receiving first message, need to decide whether by way of poll to
One message is handled, and specific polling procedure is as follows: being directed to intended recipient queue, is obtained intended recipient queue receives first
Message, intended recipient queue are determined according to object queue serial number, and object queue serial number identifies the classification of intended recipient queue,
When intended recipient queue is receiving queue corresponding to the port of solid state hard disk, just need according to resource feelings in data management module
Condition determines how processing first message.Therefore if determining that intended recipient queue is first kind receiving queue according to object queue serial number,
Judge whether object queue serial number is equal to target port serial number, if then illustrating that processing is sent to target port serial number corresponding ports
First message, at this point, then needing to judge whether the resource in data management module meets preset condition, if not, then it represents that number
According to inadequate resource in management module, in order to avoid resource is fought for, the value of target port serial number can be kept constant, shielding target connects
The step of receiving queue, re-executing for intended recipient queue, obtain the first message that intended recipient queue receives, Zhi Daozi
When source is enough, just first message is handled.As it can be seen that this programme is sent not based on port to disappear in the case where inadequate resource
The time sequencing of breath handles message, but does not handle first message, just carries out to first message when resource is enough
Processing avoids the problem that resource is fought between two ports in the case where inadequate resource, to be rationally two port assignments moneys
Source guarantees that the performance of two ports is consistent.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application without any creative labor, may be used also for those of ordinary skill in the art
To obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the data processing method for solid state hard disk dual-port provided by the embodiments of the present application;
Fig. 2 is a kind of flow chart of the data processing method for solid state hard disk dual-port provided by the embodiments of the present application;
Fig. 3 is a kind of structural frames of the data processing equipment for solid state hard disk dual-port provided by the embodiments of the present application
Figure.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application
Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only this
Apply for a part of the embodiment, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art exist
Every other embodiment obtained under the premise of creative work is not made, shall fall in the protection scope of this application.
In order to solve in the prior art, under the scene of inadequate resource, resource is fought for leading to resource allocation between two ports
Unevenness, and then the problem of cause the performance of two ports to be shaken, the embodiment of the present application provides a kind of for solid state hard disk dual-port
Data processing method, referring to Fig. 1, this method comprises:
S101, it is directed to intended recipient queue, obtains the first message that the intended recipient queue receives.
The method that the embodiment of the present application mainly passes through poll determines how to handle first message under out-of-resource condition.SSD
Dual-port in, a port is referred to as 1 port, another port is referred to as 2 ports.16 cores are shared in the CPU of SSD,
All cores are after entering polling status, and the task that each core is undertaken is different, and one of core is referred to as data administrator
(Data Manager, abbreviation DM), DM are used for other cores in the message that receiving host is sended over by port and CPU and send
Message.It is mainly receiving queue (Inbound Queue, the letter due to DM that DM, which receives the message that other cores are sent in CPU,
Claim IBQ) receive message from port after slightly handle, then by transmit queue (Outbound Queue, abbreviation OBQ) send
The processing of other cores is given, other cores pass through corresponding OBQ after processing is completed and are sent to DM.
If the received message for coming from port of the IBQ of DM, the classification of this IBQ is first kind IBQ, if the IBQ
Opposite end is 1 port, which is named as IBQ_P1, if the opposite end of the IBQ is 2 ports, which is named as IBQ_P2.
The opposite end of other IBQ of DM is other cores in SSD, the classification of these IBQ is the second class IBQ.
Message in first kind IBQ can consume the resource in DM, and the message in the second class IBQ can discharge the money in DM
Source.
The intended recipient queue is determined according to object queue serial number;The object queue serial number identifies the target
The sequence of the classification of receiving queue and the object queue in all receiving queues identical with its classification.
In the present embodiment, queue serial number (the Current Polling Queue of this i.e. poll of object queue serial number
Index, abbreviation CPQID), target port serial number is port serial number (Next Polling Port Index, the letter of next poll
Claim NPPID).
Before executing S101, the CPQID and the NPPID can be initialized.For example, the CPQID is assigned a value of
First IBQ indicates the poll since first IBQ, is carried out S101-S106 for each IBQ;NPPID is assigned a value of
IBQ_P1 indicates that first kind IBQ to be treated next time is the IBQ that opposite end is 1 port.
In at any time, not necessarily all IBQ can receive first message, if IBQ is not received by
First message, then without carrying out subsequent processing to the IBQ, therefore, before executing S101, it can be determined that the intended recipient team
Whether column receive the first message;If it is not, the object queue serial number is then increased by 1, re-execute described in the judgement
The step of whether intended recipient queue receives the first message.
S102, determine whether the intended recipient queue is first kind receiving queue according to the object queue serial number, if
It is then to execute S103.
S103, judge whether the object queue serial number is equal to target port serial number, if so, executing S104.
S104, judge whether the resource in data management module meets preset condition, if it is not, S105 is then executed, if so,
Execute S106.
The first kind receiving queue is receiving queue corresponding to the port of the solid state hard disk;The target port sequence
Number identify the affiliated port of first kind receiving queue of this poll priority processing.If judge target IBQ for first kind IBQ, then,
The opposite end for then illustrating target IBQ is port, still, since SSD includes two ports, the corresponding port target IBQ being polled to
It is whether equal with the affiliated port first kind IBQ of this poll priority processing, by the different processing method of correspondence.
If judging, the object queue serial number is equal to the target port serial number, executes S104;If judging the target
Queue serial number is not equal to the target port serial number, then judges whether the corresponding receiving queue of the target port serial number receives
Second message;If so, judging whether the resource in the data management module meets preset condition;If so, processing described the
The target port serial number is assigned a value of the object queue serial number by two message, re-executes the judgement object queue
Whether serial number is equal to the step of target port serial number.
For example, CPQID is equal to IBQ_P1, NPPID IBQ_P1, by judging that the object queue serial number is equal to the mesh
Port serial number is marked, then executes S104;If CPQID is equal to IBQ_P1, NPPID IBQ_P2, by judging the object queue sequence
Number it is not equal to the target port serial number, then can not continues to execute subsequent step to intended recipient queue corresponding to IBQ_P1
Suddenly, but first receiving queue corresponding to IBQ_P2 is polled, then, then to intended recipient queue corresponding to IBQ_P1
Subsequent step is executed, that is, judges whether the corresponding receiving queue of target port serial number receives second message;If so, judging institute
State whether the resource in data management module meets preset condition;If so, the second message is handled, by the NPPID assignment
For the CPQID, i.e., NPPID is assigned a value of IBQ_P1, re-executes S103.
S105, it keeps the value of the target port serial number constant, shields the intended recipient queue, and by the target team
Column serial number increases by 1, re-executes S101.
If judging, the resource in DM is to be unsatisfactory for preset condition, illustrates the inadequate resource in DM, at this point, in order to avoid money
Source is fought for, and the value of the target port serial number can be kept constant, shields the intended recipient queue, and by the object queue
Serial number increases by 1, S101 is re-executed, using next receiving queue as intended recipient queue.Since intended recipient queue is shielded
It covers, then, poll can not also check the intended recipient team next time, just can be again until the resource abundance in DM
Open shielded intended recipient queue.
S106, the processing first message, are assigned a value of the non-object queue serial number for the target port serial number, execute
S101。
If judging, the resource in DM is to meet preset condition, illustrates that resource in DM is sufficient, though to first message into
Row processing, the problem of resource is fought for will not occurs, at this point, handling the first message.Due to corresponding to a port
Intended recipient queue in first message handled, as port assignment resource, in order to enable dual-port performance
Stablize, resource allocation it is uniform, then, next, should the first message in the intended recipient queue to another port carry out
Target port serial number, therefore, can be assigned a value of the non-object queue serial number, S101 be re-executed, to another by processing
The corresponding receiving queue in port is polled.
Wherein, non-targeted queue serial number, that is, non-CPQID, non-CPQID are meant if CPQID is equal to IBQ_P1, non-
CPQID is equal to IBQ_P2;If CPQID is equal to IBQ_P2, non-CPQID is equal to IBQ_P1.
It should be noted that since DM processing first message needs to consume the resource in DM, in order to avoid in DM
Resource consumption is excessive, and the item number for the first message being capable of handling has certain limitation, in such a case, it is possible to which being arranged can locate
The maximum item number of the first message of reason.For example, under normal circumstances, 8 can be set to.
It should be noted that in S102, if determining that the intended recipient queue is not according to the object queue serial number
First kind IBQ, but the second class IBQ, the second class IBQ be in CPU in addition to the DM receiving queue corresponding to other cores,
Due to being the resource for discharging DM for DM when other cores handle first message in addition to the DM in CPU, i.e. in increase DM
Therefore resource if intended recipient queue is the second class IBQ, can directly handle the first message, and by the target team
Column serial number increases by 1, re-executes S101.Due to resource when the second class IBQ handles first message in release DM, so that DM
It is middle to there are enough resources to handle the first message received, therefore, it can will open shielded IBQ, hold again before
Row S101.
The embodiment of the present application has the advantage that it can be seen from above-mentioned technical proposal
For solid state hard disk dual-port, after receiving first message, need to decide whether by way of poll to
One message is handled, and specific polling procedure is as follows: being directed to intended recipient queue, is obtained intended recipient queue receives first
Message, intended recipient queue are determined according to object queue serial number, and object queue serial number identifies the classification of intended recipient queue,
When intended recipient queue is receiving queue corresponding to the port of solid state hard disk, just need according to resource feelings in data management module
Condition determines how processing first message.Therefore if determining that intended recipient queue is first kind receiving queue according to object queue serial number,
Judge whether object queue serial number is equal to target port serial number, if then illustrating that processing is sent to target port serial number corresponding ports
First message, at this point, then needing to judge whether the resource in data management module meets preset condition, if not, then it represents that number
According to inadequate resource in management module, in order to avoid resource is fought for, the value of target port serial number can be kept constant, shielding target connects
The step of receiving queue, re-executing for intended recipient queue, obtain the first message that intended recipient queue receives, Zhi Daozi
When source is enough, just first message is handled.As it can be seen that this programme is sent not based on port to disappear in the case where inadequate resource
The time sequencing of breath handles message, but does not handle first message, just carries out to first message when resource is enough
Processing avoids the problem that resource is fought between two ports in the case where inadequate resource, to be rationally two port assignments moneys
Source guarantees that the performance of two ports is consistent.
It is in one implementation, provided by the embodiments of the present application a kind of hard for solid-state based on the above possible situation
The data processing method of disk dual-port may refer to shown in Fig. 2, which comprises
S201, it is directed to intended recipient queue, judges whether the intended recipient queue receives the first message, if
It is no, then S202 is executed, if so, executing S203.
S202, the object queue serial number is increased by 1, returns to S201.
S203, the first message that the intended recipient queue receives is obtained.
S204, determine whether the intended recipient queue is first kind receiving queue according to the object queue serial number, if
It is then to execute S205, if it is not, executing S212.
S205, judge whether the object queue serial number is equal to target port serial number, if so, S206 is executed, if it is not, holding
Row S209.
S206, judge whether the resource in the data management module meets preset condition, if it is not, S207 is then executed, if
It is then to execute S208.
S207, it keeps the value of the target port serial number constant, shields the intended recipient queue, and by the target team
Column serial number increases by 1, returns to S201.
S208, the processing first message, are assigned a value of the non-object queue serial number for the target port serial number.
S209, judge whether the corresponding receiving queue of the target port serial number receives second message, if so, executing
S210。
S210, judge whether the resource in the data management module meets preset condition, if so, S211 is executed, if it is not,
Execute S207.
S211, the processing second message, are assigned a value of the object queue serial number for the target port serial number, return
S205。
S212, the processing first message, and the object queue serial number is increased by 1, it opens shielded target of stating and connects
Queue is received, S201 is returned.
The embodiment of the present application has the advantage that it can be seen from above-mentioned technical proposal
For solid state hard disk dual-port, after receiving first message, need to decide whether by way of poll to
One message is handled, and specific polling procedure is as follows: being directed to intended recipient queue, is obtained intended recipient queue receives first
Message, intended recipient queue are determined according to object queue serial number, and object queue serial number identifies the classification of intended recipient queue,
When intended recipient queue is receiving queue corresponding to the port of solid state hard disk, just need according to resource feelings in data management module
Condition determines how processing first message.Therefore if determining that intended recipient queue is first kind receiving queue according to object queue serial number,
Judge whether object queue serial number is equal to target port serial number, if then illustrating that processing is sent to target port serial number corresponding ports
First message, at this point, then needing to judge whether the resource in data management module meets preset condition, if not, then it represents that number
According to inadequate resource in management module, in order to avoid resource is fought for, the value of target port serial number can be kept constant, shielding target connects
The step of receiving queue, re-executing for intended recipient queue, obtain the first message that intended recipient queue receives, Zhi Daozi
When source is enough, just first message is handled.As it can be seen that this programme is sent not based on port to disappear in the case where inadequate resource
The time sequencing of breath handles message, but does not handle first message, just carries out to first message when resource is enough
Processing avoids the problem that resource is fought between two ports in the case where inadequate resource, to be rationally two port assignments moneys
Source guarantees that the performance of two ports is consistent.
The embodiment of the present application provides a kind of data processing equipment for solid state hard disk dual-port, the solid state hard disk
Port includes two ports, and referring to Fig. 3, described device includes:
Acquiring unit 301 obtains the intended recipient queue receives first and disappears for being directed to intended recipient queue
Breath, the intended recipient queue is determined according to object queue serial number;The object queue serial number identifies the intended recipient
The sequence of the classification of queue and the object queue in all receiving queues identical with its classification;
First judging unit 302, if for determining that the intended recipient queue is first according to the object queue serial number
Class receiving queue, judges whether the object queue serial number is equal to target port serial number;The first kind receiving queue is described
Receiving queue corresponding to the port of solid state hard disk;The first kind that the target port serial number identifies this poll priority processing connects
Receive the affiliated port of queue;
First judging unit 302, after being also used to judge that the object queue serial number is equal to target port serial number, judgement
Whether the resource in the data management module meets preset condition;
The screen unit 303 judges resource in the data management module not if being also used to the first judging unit 302
Meet preset condition, keep the value of the target port serial number constant, shield the intended recipient queue, and by the target team
Column serial number increases by 1, triggers the acquiring unit and re-executes described for intended recipient queue, obtains the intended recipient queue
The step of first message received.
Processing unit 304, if judging that the resource in the data management module meets for first judging unit 302
When preset condition, the first message is handled, the target port serial number is assigned a value of the non-object queue serial number, triggers institute
It states acquiring unit and re-executes described for intended recipient queue, obtain the first message that the intended recipient queue receives
Step;The affiliated port of intended recipient queue of poll and the target of this poll connect the non-object queue serial number mark next time
It is different to receive port described in queue.
Optionally, if first judging unit judges that the object queue serial number is not equal to the target port serial number,
Described device further include:
Second judgment unit, judges whether the corresponding receiving queue of the target port serial number receives second message;
If the second judgment unit is also used to judge the target port serial number, corresponding receiving queue receives second
When message, judge whether the resource in the data management module meets preset condition;
The processing unit, if being also used to the second judgment unit judges that the resource in the data management module meets
When preset condition, the second message is handled, the target port serial number is assigned a value of the object queue serial number, described in triggering
First judging unit re-executes described the step of whether the object queue serial number is equal to target port serial number judged.
Optionally, if first judging unit determines that the intended recipient queue is the according to the object queue serial number
Two class receiving queues, the second class receiving queue be in central processing unit in addition to the data management module corresponding to other cores
Receiving queue, the processing unit is also used to handle the first message, and the object queue serial number is increased by 1.
Optionally, if the intended recipient queue is shielded, described device further include:
Opening unit, be used to open it is shielded state intended recipient queue, trigger the acquiring unit re-execute it is described
For intended recipient queue, the step of obtaining the first message that the intended recipient queue receives.
Optionally, described device further include:
Third judging unit, for judging whether the intended recipient queue receives the first message;
The third judging unit judges that the intended recipient queue does not receive the first message, then by the target
Queue serial number increases by 1, trigger the acquiring unit re-execute it is described judge whether the intended recipient queue receive described in
The step of first message.
Optionally, described device further include:
Initialization unit, for initializing the object queue serial number and the target port serial number.
It needs to pass through after receiving first message for solid state hard disk dual-port it can be seen from above-mentioned technical proposal
The mode of poll decides whether to handle first message, and following operation is executed in described device polling procedure: being directed to target
Receiving queue, obtains the first message that intended recipient queue receives, and intended recipient queue is determined according to object queue serial number
, object queue serial number identifies the classification of intended recipient queue, and intended recipient queue is to connect corresponding to the port of solid state hard disk
When receiving queue, just need to determine how processing first message according to resource situation in data management module.Therefore if according to target team
Column serial number determines that intended recipient queue is first kind receiving queue, judges whether object queue serial number is equal to target port serial number,
If then illustrating the first message that processing is sent to target port serial number corresponding ports, at this point, then needing to judge data management mould
Whether the resource in block meets preset condition, if not, then it represents that inadequate resource in data management module, in order to avoid resource is striven
It robs, the value of target port serial number can be kept constant, shield intended recipient queue, re-execute for intended recipient queue, obtain
The step of first message for taking intended recipient queue to receive, is just handled first message when resource is enough.It can
See, in the case where inadequate resource, this programme is handled message not based on the time sequencing that port sends message, but not
First message is handled, just first message is handled when resource is enough, avoids two ports in the case where inadequate resource
Between resource the problem of fighting for be rationally two port assignment resources guarantee that the performance of two ports is consistent.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and foregoing routine can be stored in a computer readable storage medium, which exists
When execution, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned can be at least one in following media
Kind: read-only memory (English: read-only memory, abbreviation: ROM), RAM, magnetic or disk etc. are various to be can store
The medium of program code.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment it
Between same and similar part may refer to each other, each embodiment focuses on the differences from other embodiments.
For equipment and system embodiment, since it is substantially similar to the method embodiment, so describe fairly simple,
The relevent part can refer to the partial explaination of embodiments of method.Equipment and system embodiment described above is only schematic
, wherein unit may or may not be physically separated as illustrated by the separation member, it is shown as a unit
Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks
On unit.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
Those of ordinary skill in the art can understand and implement without creative efforts.
The above, only a kind of specific embodiment of the application, but the protection scope of the application is not limited thereto,
Within the technical scope of the present application, any changes or substitutions that can be easily thought of by anyone skilled in the art,
Should all it cover within the scope of protection of this application.Therefore, the protection scope of the application should be with scope of protection of the claims
Subject to.
Claims (10)
1. a kind of data processing method for solid state hard disk dual-port, which is characterized in that the port of the solid state hard disk includes
Two ports, which comprises
For intended recipient queue, the first message that the intended recipient queue receives is obtained, the intended recipient queue is
It is determined according to object queue serial number;The object queue serial number identify the intended recipient queue classification and the target team
The sequence being listed in all receiving queues identical with its classification;
If determining that the intended recipient queue is first kind receiving queue according to the object queue serial number, the target team is judged
Whether column serial number is equal to target port serial number;The first kind receiving queue is reception corresponding to the port of the solid state hard disk
Queue;The target port serial number identifies the affiliated port of first kind receiving queue of this poll priority processing;
If so, judging whether the resource in data management module meets preset condition;
If judging, the resource in the data management module is unsatisfactory for preset condition, keeps the value of the target port serial number not
Become, shield the intended recipient queue, and the object queue serial number is increased by 1, re-executes described for intended recipient team
The step of arranging, obtaining the first message that the intended recipient queue receives.
If judging, the resource in the data management module meets preset condition, handles the first message, by the target
Port serial number is assigned a value of the non-object queue serial number, re-executes described for intended recipient queue, obtains the target and connects
The step of receiving the first message that queue receives;The non-object queue serial number identifies the intended recipient queue institute of poll next time
It is different from port described in the intended recipient queue of this poll to belong to port.
2. the method according to claim 1, wherein if judging the object queue serial number not equal to the target
Port serial number, the method also includes:
Judge whether the corresponding receiving queue of the target port serial number receives second message;
If so, judging whether the resource in the data management module meets preset condition;
If so, handling the second message, the target port serial number is assigned a value of the object queue serial number, re-executes institute
It states and the step of whether the object queue serial number is equal to target port serial number is judged.
3. the method according to claim 1, wherein if determining that the target connects according to the object queue serial number
Receipts queue be the second class receiving queue, the second class receiving queue be central processing unit in addition to the data management module its
Receiving queue corresponding to his core, the method also includes:
The first message is handled, and the object queue serial number is increased by 1.
4. according to the method described in claim 3, it is characterized in that, if the intended recipient queue is shielded, in the processing
The first message, and by the object queue serial number increase by 1 after, the method also includes:
Open it is shielded state intended recipient queue, re-execute described for intended recipient queue, obtain the intended recipient
The step of first message that queue receives.
5. obtaining the target the method according to claim 1, wherein being directed to intended recipient queue described
Before the first message that receiving queue receives, the method also includes:
Judge whether the intended recipient queue receives the first message;
If it is not, the object queue serial number is then increased by 1, re-executes and described judge whether the intended recipient queue receives
The step of first message.
6. obtaining the target the method according to claim 1, wherein being directed to intended recipient queue described
Before the first message that receiving queue receives, the method also includes:
Initialize the object queue serial number and the target port serial number.
7. a kind of data processing equipment for solid state hard disk dual-port, which is characterized in that the port of the solid state hard disk includes
Two ports, described device include:
Acquiring unit obtains the first message that the intended recipient queue receives, the mesh for being directed to intended recipient queue
Marking receiving queue is determined according to object queue serial number;The object queue serial number identifies the classification of the intended recipient queue
With sequence of the object queue in all receiving queues identical with its classification;
First judging unit, if for determining that the intended recipient queue is that the first kind receives team according to the object queue serial number
Column, judge whether the object queue serial number is equal to target port serial number;The first kind receiving queue is the solid state hard disk
Port corresponding to receiving queue;The target port serial number identifies the first kind receiving queue institute of this poll priority processing
Belong to port;
First judging unit judges the number after being also used to judge that the object queue serial number is equal to target port serial number
Whether meet preset condition according to the resource in management module;
The screen unit, if being also used to judge, the resource in data management module is unsatisfactory for preset condition, keeps the target
The value of port serial number is constant, shields the intended recipient queue, and the object queue serial number is increased by 1, triggers the acquisition
Unit re-executes described the step of being directed to intended recipient queue, obtaining the first message that the intended recipient queue receives.
Processing unit, if judging that the resource in the data management module meets preset condition for first judging unit
When, the first message is handled, the target port serial number is assigned a value of the non-object queue serial number, it is single to trigger the acquisition
Member re-executes described the step of being directed to intended recipient queue, obtaining the first message that the intended recipient queue receives;It is non-
The object queue serial number identifies the intended recipient queue of the affiliated port of intended recipient queue of poll and this poll next time
The port is different.
8. device according to claim 7, which is characterized in that if first judging unit judges the object queue sequence
Number be not equal to the target port serial number, described device further include:
Second judgment unit, judges whether the corresponding receiving queue of the target port serial number receives second message;
If the second judgment unit is also used to judge the target port serial number, corresponding receiving queue receives second message
When, judge whether the resource in the data management module meets preset condition;
The processing unit, if being also used to the second judgment unit judges that the resource satisfaction in the data management module is default
When condition, the second message is handled, the target port serial number is assigned a value of the object queue serial number, triggering described first
Judging unit re-executes described the step of whether the object queue serial number is equal to target port serial number judged.
9. device according to claim 7, which is characterized in that if first judging unit is according to the object queue sequence
Number determine that the intended recipient queue is the second class receiving queue, the second class receiving queue is in central processing unit except described
Receiving queue corresponding to other outer cores of data management module, the processing unit are also used to handle the first message, and will
The object queue serial number increases by 1.
10. device according to claim 9, which is characterized in that if the intended recipient queue is shielded, described device is also
Include:
Opening unit, be used to open it is shielded state intended recipient queue, trigger the acquiring unit and re-execute described be directed to
Intended recipient queue, the step of obtaining the first message that the intended recipient queue receives.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811377521.3A CN109491948B (en) | 2018-11-19 | 2018-11-19 | Data processing method and device for double ports of solid state disk |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811377521.3A CN109491948B (en) | 2018-11-19 | 2018-11-19 | Data processing method and device for double ports of solid state disk |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109491948A true CN109491948A (en) | 2019-03-19 |
CN109491948B CN109491948B (en) | 2021-10-29 |
Family
ID=65697154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811377521.3A Active CN109491948B (en) | 2018-11-19 | 2018-11-19 | Data processing method and device for double ports of solid state disk |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109491948B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5925099A (en) * | 1995-06-15 | 1999-07-20 | Intel Corporation | Method and apparatus for transporting messages between processors in a multiple processor system |
CN105068953A (en) * | 2014-05-07 | 2015-11-18 | Hgst荷兰公司 | System and method for peer-to-peer PCIe storage transfers |
CN106776077A (en) * | 2016-12-27 | 2017-05-31 | 中国民生银行股份有限公司 | Message treatment method, device, controller and system |
CN107273214A (en) * | 2017-06-30 | 2017-10-20 | 郑州云海信息技术有限公司 | A kind of multinuclear controller resource access method and its device based on solid state hard disc |
CN108762939A (en) * | 2018-06-29 | 2018-11-06 | 郑州云海信息技术有限公司 | A kind of PCIe port resource allocation methods, system and equipment and storage medium |
-
2018
- 2018-11-19 CN CN201811377521.3A patent/CN109491948B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5925099A (en) * | 1995-06-15 | 1999-07-20 | Intel Corporation | Method and apparatus for transporting messages between processors in a multiple processor system |
CN105068953A (en) * | 2014-05-07 | 2015-11-18 | Hgst荷兰公司 | System and method for peer-to-peer PCIe storage transfers |
CN106776077A (en) * | 2016-12-27 | 2017-05-31 | 中国民生银行股份有限公司 | Message treatment method, device, controller and system |
CN107273214A (en) * | 2017-06-30 | 2017-10-20 | 郑州云海信息技术有限公司 | A kind of multinuclear controller resource access method and its device based on solid state hard disc |
CN108762939A (en) * | 2018-06-29 | 2018-11-06 | 郑州云海信息技术有限公司 | A kind of PCIe port resource allocation methods, system and equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
杨启军等: "虚***防火墙中处理器资源分配方案", 《计算机工程与设计》 * |
Also Published As
Publication number | Publication date |
---|---|
CN109491948B (en) | 2021-10-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102255919B (en) | System and method for optimizing execution of security task in LAN | |
CN109951359A (en) | The asynchronous scan method of distributed network assets and equipment | |
US11502967B2 (en) | Methods and apparatuses for packet scheduling for software-defined networking in edge computing environment | |
KR20190029486A (en) | Elastic honeynet system and method for managing the same | |
Jha et al. | Measuring Congestion in {High-Performance} Datacenter Interconnects | |
CN110018883A (en) | A kind of virtual machine delet method, device, equipment and storage medium | |
US20170126580A1 (en) | Tracking Contention in a Distributed Business Transaction | |
US8938531B1 (en) | Apparatus, system and method for multi-context event streaming network vulnerability scanner | |
Aziz Shah et al. | A quantitative cross‐comparison of container networking technologies for virtualized service infrastructures in local computing environments | |
Yang et al. | Performance modeling of linux network system with open vswitch | |
US10218820B2 (en) | Method and apparatus for processing data packet based on parallel protocol stack instances | |
CN107896196B (en) | Method and device for distributing messages | |
US10116773B2 (en) | Packet processing method and related device that are applied to network device | |
US10243988B2 (en) | Configurable network security | |
CN109491948A (en) | A kind of data processing method and device for solid state hard disk dual-port | |
CN109951532B (en) | DPDK-based automatic flow model conversion device | |
CN109474525B (en) | Message processing method, device, equipment and readable storage medium | |
KR20140122025A (en) | Method for logical network separation and apparatus therefor | |
JP2008186211A (en) | Computer system | |
JP6063882B2 (en) | Virtual machine placement system and method | |
CN107147532B (en) | Virtualization method and device for distributed equipment | |
KR101837935B1 (en) | Receiving packet storage apparatus for improving data search performance based on whole packet storage and method therefor | |
CN114518833B (en) | Method, electronic device and computer program product for storage management | |
Birke et al. | Power of redundancy: Designing partial replication for multi-tier applications | |
CN105721342B (en) | The method for connecting network and system of multi-process equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |