CN106445849A - Method for processing ordered command in multiple controllers - Google Patents
Method for processing ordered command in multiple controllers Download PDFInfo
- Publication number
- CN106445849A CN106445849A CN201610918151.4A CN201610918151A CN106445849A CN 106445849 A CN106445849 A CN 106445849A CN 201610918151 A CN201610918151 A CN 201610918151A CN 106445849 A CN106445849 A CN 106445849A
- Authority
- CN
- China
- Prior art keywords
- command
- controller
- ordered
- queue
- controllers
- 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 OR CALCULATING; 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/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the program performs an interfacing function, e.g. device driver
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0028—Serial attached SCSI [SAS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明公开了一种多控制器中处理有序命令的方法,该方法包括:在存储系统中,当一个控制器接收到有序命令Ordered Command时,所述控制器中的事件处理器EM向存储系统中所有的控制器发送请求消息Qr;所述所有的控制器接收请求消息Qr,均继续执行当前的无序命令Unordered Command,执行完毕后向所述事件处理器EM发送反馈消息Qc;当所述事件处理器EM接收到的反馈消息Qc的数量与存储系统中所有控制器的数量一致时,接收到所述有序命令Ordered Command的控制器开始执行所述有序命令Ordered Command。该方法实现在多控制器中完成有序命令Ordered Command的正常执行。
The invention discloses a method for processing an ordered command in a multi-controller. The method includes: in a storage system, when a controller receives an Ordered Command, an event processor EM in the controller sends a All controllers in the storage system send a request message Qr; all the controllers receive the request message Qr, continue to execute the current unordered command Unordered Command, and send a feedback message Qc to the event processor EM after execution; When the number of feedback messages Qc received by the event processor EM is consistent with the number of all controllers in the storage system, the controller that receives the Ordered Command starts to execute the Ordered Command. This method realizes the normal execution of the Ordered Command in the multi-controller.
Description
技术领域technical field
本发明涉及存储系统技术领域,特别是涉及一种多控制器中处理有序命令的方法。The invention relates to the technical field of storage systems, in particular to a method for processing ordered commands in a multi-controller.
背景技术Background technique
目前,SCSI(Small Computer Systems Interface,小型计算机系统接口)协议规定执行Ordered Command的顺序必须与接收到Ordered Command的顺序一致,因此对于有序命令Ordered Command,只有在保证所有的SCSI Command即SCSI命令执行完毕之后OrderedCommand才能开始执行。现有技术中,在多个控制器中,每个控制器都是各自执行各自的SCSI命令中的无序命令Unordered Command,当一个控制器接收到有序命令OrderedCommand后,仅仅只能考虑自身无序命令Unordered Command是否已完成,不能考虑到其他所有控制器是否都已经执行完Unordered Command命令,因此无法保证所有UnorderedCommand命令执行完毕之后Ordered Command才能开始执行,无法实现在多控制器中完成有序命令Ordered Command的正常执行。At present, the SCSI (Small Computer Systems Interface, small computer system interface) protocol stipulates that the order in which Ordered Commands are executed must be consistent with the order in which Ordered Commands are received. Therefore, for Ordered Commands, only when all SCSI Commands are guaranteed to execute After the OrderedCommand can start executing. In the prior art, among multiple controllers, each controller executes the Unordered Command in its own SCSI command. When a controller receives the Ordered Command, it can only consider its own Unordered Command. Whether the Unordered Command has been completed can not be considered whether all other controllers have executed the Unordered Command command, so it cannot be guaranteed that the Ordered Command can only be executed after all the Unordered Command commands are executed, and it is impossible to complete the ordered command in multiple controllers Normal execution of Ordered Command.
发明内容Contents of the invention
本发明的目的是提供一种多控制器中处理有序命令的方法,以实现在多控制器中完成有序命令Ordered Command的正常执行。The purpose of the present invention is to provide a method for processing ordered commands in multi-controllers, so as to realize the normal execution of Ordered Commands in multi-controllers.
为解决上述技术问题,本发明提供一种多控制器中处理有序命令的方法,该方法包括:In order to solve the above technical problems, the present invention provides a method for processing ordered commands in a multi-controller, the method comprising:
在存储系统中,当一个控制器接收到有序命令Ordered Command时,所述控制器中的事件处理器EM向存储系统中所有的控制器发送请求消息Qr;In the storage system, when a controller receives an Ordered Command, the event processor EM in the controller sends a request message Qr to all the controllers in the storage system;
所述所有的控制器接收请求消息Qr,均继续执行当前的无序命令UnorderedCommand,执行完毕后向所述事件处理器EM发送反馈消息Qc;All the controllers receive the request message Qr, continue to execute the current unordered command UnorderedCommand, and send a feedback message Qc to the event processor EM after execution;
当所述事件处理器EM接收到的反馈消息Qc的数量与存储系统中所有控制器的数量一致时,接收到所述有序命令Ordered Command的控制器开始执行所述有序命令OrderedCommand。When the number of feedback messages Qc received by the event processor EM is consistent with the number of all controllers in the storage system, the controller that receives the Ordered Command starts to execute the Ordered Command.
优选的,所述所有的控制器接收请求消息Qr之后,还包括:Preferably, after receiving the request message Qr, all the controllers further include:
所述所有的控制器均停止执行新接收到的SCSI命令,并将新接收到的SCSI命令插入到静止队列Quiesce Queue中。All the controllers stop executing newly received SCSI commands, and insert the newly received SCSI commands into Quiesce Queue.
优选的,所述接收到所述有序命令Ordered Command的控制器开始执行所述有序命令Ordered Command之后,还包括:Preferably, after the controller receiving the Ordered Command starts to execute the Ordered Command, it further includes:
执行所述有序命令Ordered Command完毕后,所述接收到所述有序命令OrderedCommand的控制器向所述事件处理器EM发送命令完成消息Qd。After executing the Ordered Command, the controller that receives the OrderedCommand sends a command completion message Qd to the event processor EM.
优选的,所述接收到所述有序命令Ordered Command的控制器向所述事件处理器EM发送命令完成消息Qd之后,还包括:Preferably, after the controller receiving the Ordered Command sends a command completion message Qd to the event processor EM, it further includes:
所述事件处理器EM将所述命令完成消息Qd发送至所述所有的控制器;The event processor EM sends the command completion message Qd to all the controllers;
所述所有的控制器开始执行静止队列Quiesce Queue中的命令。All the controllers start to execute the commands in Quiesce Queue.
优选的,所述方法还包括:Preferably, the method also includes:
对于存储系统中每一个控制器,当控制器接收到队列命令头信息时,将所述队列命令头信息插入到静止队列Quiesce Queue的队头。For each controller in the storage system, when the controller receives the queue command header information, it inserts the queue command header information into the queue head of the quiet queue Quiesce Queue.
优选的,所述执行完毕后向所述事件处理器EM发送命令完成消息Qc之后,还包括:Preferably, after the execution is completed, after sending the command completion message Qc to the event processor EM, it further includes:
所述所有的控制器均停止执行任何命令。All of the controllers stop executing any commands.
优选的,所述存储系统中所有的控制器中包括接收到所述有序命令OrderedCommand的控制器。Preferably, all the controllers in the storage system include the controller that has received the OrderedCommand.
优选的,所述,存储系统中所有的控制器的个数为至少两个。Preferably, the number of all controllers in the storage system is at least two.
本发明所提供的一种多控制器中处理有序命令的方法,在存储系统中,当一个控制器接收到有序命令Ordered Command时,所述控制器中的事件处理器EM向存储系统中所有的控制器发送请求消息Qr;所述所有的控制器接收请求消息Qr,均继续执行当前的无序命令Unordered Command,执行完毕后向所述事件处理器EM发送反馈消息Qc;当所述事件处理器EM接收到的反馈消息Qc的数量与存储系统中所有控制器的数量一致时,接收到所述有序命令Ordered Command的控制器开始执行所述有序命令Ordered Command。可见,在存储系统中,当Qc的数量与存储系统中所有控制器的数量一致时,表示所有控制器执行Unordered Command命令结束,即所有的控制器中的Unordered Command命令执行完毕之后,接收到有序命令Ordered Command的控制器才开始执行有序命令Ordered Command,保证所有Unordered Command命令执行完毕之后Ordered Command才能开始执行,实现在多控制器中完成有序命令Ordered Command的正常执行。A method for processing ordered commands in a multi-controller provided by the present invention, in a storage system, when a controller receives an ordered command Ordered Command, the event processor EM in the controller sends a message to the storage system All controllers send a request message Qr; all the controllers receive the request message Qr, continue to execute the current unordered command Unordered Command, and send a feedback message Qc to the event processor EM after execution; when the event When the number of feedback messages Qc received by the processor EM is consistent with the number of all controllers in the storage system, the controller that receives the Ordered Command starts to execute the Ordered Command. It can be seen that in the storage system, when the number of Qc is consistent with the number of all controllers in the storage system, it means that all controllers have finished executing the Unordered Command command, that is, after the execution of the Unordered Command command in all controllers is completed, the received The controller of the Ordered Command starts to execute the Ordered Command. It is guaranteed that the Ordered Command can only be executed after all Unordered Commands are executed, so that the normal execution of the Ordered Command can be completed in multiple controllers.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.
图1为本发明所提供的一种多控制器中处理有序命令的方法的流程图;Fig. 1 is a flowchart of a method for processing ordered commands in a multi-controller provided by the present invention;
图2为Ordered Command命令执行流程图。Figure 2 is a flowchart of Ordered Command command execution.
具体实施方式detailed description
本发明的核心是提供一种多控制器中处理有序命令的方法,以实现在多控制器中完成有序命令Ordered Command的正常执行。The core of the present invention is to provide a method for processing ordered commands in multi-controllers, so as to realize the normal execution of Ordered Commands in multi-controllers.
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
请参考图1,图1为本发明所提供的一种多控制器中处理有序命令的方法的流程图,该方法包括:Please refer to Fig. 1, Fig. 1 is the flow chart of the method for processing ordered order in a kind of multi-controller provided by the present invention, and this method comprises:
S11:在存储系统中,当一个控制器接收到有序命令Ordered Command时,控制器中的事件处理器EM向存储系统中所有的控制器发送请求消息Qr;S11: In the storage system, when a controller receives an Ordered Command, the event processor EM in the controller sends a request message Qr to all the controllers in the storage system;
S12:所有的控制器接收请求消息Qr,均继续执行当前的无序命令UnorderedCommand,执行完毕后向事件处理器EM发送反馈消息Qc;S12: All controllers continue to execute the current unordered command UnorderedCommand after receiving the request message Qr, and send a feedback message Qc to the event processor EM after execution;
S13:当事件处理器EM接收到的反馈消息Qc的数量与存储系统中所有控制器的数量一致时,接收到有序命令Ordered Command的控制器开始执行有序命令OrderedCommand。S13: When the number of feedback messages Qc received by the event processor EM is consistent with the number of all controllers in the storage system, the controller that receives the Ordered Command starts to execute the Ordered Command.
可见,在存储系统中,当Qc的数量与存储系统中所有控制器的数量一致时,表示所有控制器执行Unordered Command命令结束,即所有的控制器中的Unordered Command命令执行完毕之后,接收到有序命令Ordered Command的控制器才开始执行有序命令OrderedCommand,保证所有Unordered Command命令执行完毕之后Ordered Command才能开始执行,实现在多控制器中完成有序命令Ordered Command的正常执行。It can be seen that in the storage system, when the number of Qc is consistent with the number of all controllers in the storage system, it means that all controllers have finished executing the Unordered Command command, that is, after the execution of the Unordered Command command in all controllers is completed, the received The controller of the Ordered Command starts to execute the Ordered Command. It is guaranteed that the Ordered Command can only be executed after all Unordered Commands are executed, so that the normal execution of the Ordered Command can be completed in multiple controllers.
基于所述方法,具体的,所有的控制器接收请求消息Qr之后,所有的控制器均停止执行新接收到的SCSI命令,并将新接收到的SCSI命令插入到静止队列Quiesce Queue中。然后所有控制器均继续执行当前的无序命令Unordered Command,执行完毕后向事件处理器EM发送反馈消息Qc。Based on the method, specifically, after all the controllers receive the request message Qr, all the controllers stop executing the newly received SCSI command, and insert the newly received SCSI command into the Quiesce Queue. Then all the controllers continue to execute the current Unordered Command, and send a feedback message Qc to the event processor EM after execution.
其中,无序命令Unordered Command为没有顺序的指令,执行过程没有先后顺序。有序命令Ordered Command为有顺序的指令,执行过程有先后顺序。有序命令OrderedCommand应该在所有的无序命令Unordered Command都执行完后再执行。Among them, the unordered command Unordered Command is an instruction without sequence, and there is no sequence in the execution process. Ordered Command Ordered Command is an ordered command, and the execution process has a sequence. The ordered command OrderedCommand should be executed after all the unordered commands Unordered Command are executed.
其中,存储系统中所有的控制器中包括接收到有序命令Ordered Command的控制器。Wherein, all the controllers in the storage system include the controller that has received the Ordered Command.
进一步的,步骤S12中,执行完毕后向事件处理器EM发送反馈消息Qc之后,还包括:所有的控制器均停止执行任何命令。Further, in step S12, after sending the feedback message Qc to the event processor EM after execution, it also includes: all controllers stop executing any commands.
进一步的,步骤S13中,接收到有序命令Ordered Command的控制器开始执行有序命令Ordered Command之后,还包括:执行所述有序命令Ordered Command完毕后,接收到有序命令Ordered Command的控制器向事件处理器EM发送命令完成消息Qd。Further, in step S13, after the controller that receives the Ordered Command starts to execute the Ordered Command, it also includes: after the execution of the Ordered Command is completed, the controller that receives the Ordered Command A command completion message Qd is sent to the event processor EM.
进一步的,接收到有序命令Ordered Command的控制器向事件处理器EM发送命令完成消息Qd之后,事件处理器EM将命令完成消息Qd发送至所有的控制器;所有的控制器开始执行静止队列Quiesce Queue中的命令。Further, after the controller receiving the ordered command Ordered Command sends a command completion message Qd to the event processor EM, the event processor EM sends the command completion message Qd to all controllers; all controllers start to execute the static queue Quiesce Commands in the Queue.
具体的,所述方法还包括:对于存储系统中每一个控制器,当控制器接收到队列命令头信息时,将队列命令头信息插入到静止队列Quiesce Queue的队头。Specifically, the method further includes: for each controller in the storage system, when the controller receives the queue command header information, inserting the queue command header information into the head of the quiet queue Quiesce Queue.
其中,存储系统中所有的控制器的个数为至少两个。Wherein, there are at least two controllers in the storage system.
详细的,每个控制器都有一个EM,用于发送或者接受控制器之间同步的消息,消息包括Quiesce Request,Quiesce Complete,Quiesce Command Done。接收到OrderedCommand之后,所有控制器停止执行新接收到的SCSI Command,并将其插入到QuiesceQueue中,包括Ordered Command和Unordered Command。控制器接收到的Ordered Command,Ordered Command的顺序必须与接收到Ordered Command 的顺序一致,只有在保证所有Unordered Command命令执行完毕之后Ordered Command才能开始执行。In detail, each controller has an EM for sending or receiving synchronization messages between controllers, and the messages include Quiesce Request, Quiesce Complete, and Quiesce Command Done. After receiving OrderedCommand, all controllers stop executing the newly received SCSI Command and insert it into QuiesceQueue, including Ordered Command and Unordered Command. The Ordered Command received by the controller must be in the same order as the Ordered Command received. The Ordered Command can only be executed after all Unordered Commands are executed.
队列命令头信息即为Head Of Queue Command,Head Of Queue Command是一种特殊的Ordered Command,在接收到Head Of Queue Command之后必须将其插入到CommandQueue的队头,以保证其最先执行,即便接收到的下一条命令任然是Head Of QueueCommand,也需要把它插入到队头。每一个控制器需要维护一个命令接收队列QuiesceQueue,即每一个控制器中对应有一个Quiesce Queue。The header information of the queue command is the Head Of Queue Command. The Head Of Queue Command is a special Ordered Command. After receiving the Head Of Queue Command, it must be inserted into the head of the CommandQueue to ensure that it is executed first, even if it is received The next command to arrive is still Head Of QueueCommand, and it needs to be inserted at the head of the queue. Each controller needs to maintain a command receiving queue QuiesceQueue, that is, each controller corresponds to a Quiesce Queue.
对于事件处理器Event Manager,简称EM,每个控制器都有一个EM,用于发送或者接受控制器之间同步的消息,消息包括Quiesce Request、Quiesce Complete、QuiesceCommand Done。For the event processor Event Manager, referred to as EM, each controller has an EM for sending or receiving synchronization messages between controllers, and the messages include Quiesce Request, Quiesce Complete, and QuiesceCommand Done.
对于Quiesce Request消息,该消息为请求消息,具体是静止请求消息,简称Qr,当控制器接受到Ordered Command的时候会发送给EM Qr消息,EM随后将Qr发送到所有控制器。For the Quiesce Request message, the message is a request message, specifically a static request message, referred to as Qr. When the controller receives the Ordered Command, it will send the EM Qr message, and the EM will then send the Qr to all controllers.
对于Quiesce Complete消息,该消息为反馈消息,具体是静止完成消息,简称Qc,控制器执行完在执行的Unordered Commad之后向EM发送Qc消息,EM再将Qc消息发送到所有控制器。For the Quiesce Complete message, the message is a feedback message, specifically a static completion message, referred to as Qc, the controller sends a Qc message to the EM after executing the Unordered Commad, and the EM sends the Qc message to all controllers.
对于Quiesce Command Done消息,该消息为命令完成消息,具体为静止命令完成消息,简称Qd,当控制器执行完Ordered Command之后,会向EM发送Qd消息,EM再将Qd发送到所有控制器,控制器在接收到Qd消息之后就可以执行Quiesce Queue队列中的消息。For the Quiesce Command Done message, the message is a command completion message, specifically a static command completion message, referred to as Qd. After the controller executes the Ordered Command, it will send a Qd message to the EM, and the EM will send Qd to all controllers to control After the receiver receives the Qd message, it can execute the message in the Quiesce Queue queue.
对于Quiesce Queue队列,接收到Ordered Command之后,所有控制器停止执行新接收到的SCSI Command,并将其插入到Quiesce Queue中,包括Ordered Command和Unordered Command。For Quiesce Queue, after receiving Ordered Command, all controllers stop executing newly received SCSI Command and insert it into Quiesce Queue, including Ordered Command and Unordered Command.
对于多控制器存储,主机端可以通过存储的任何一个控制器访问逻辑卷,当任一个控制器接收到Ordered Command的时候,需要保证其他所有控制器在执行完在执行的命令之后停止继续处理下一条命令,这就需要控制器之间有相应的通信协调机制。For multi-controller storage, the host can access the logical volume through any controller of the storage. When any controller receives an Ordered Command, it is necessary to ensure that all other controllers stop and continue processing after executing the executed command. A command, which requires a corresponding communication coordination mechanism between the controllers.
具体的,每一个控制器都有一个事件处理器Event Manager(EM),EM负责在控制器之间接收和发送消息,消息包括Quiesce Request,Quiesce Complete,Quiesce CommandDone,控制器根据接收到的消息来执行对应的事件处理函数,以保证Ordered Command的执行顺序。Specifically, each controller has an event processor Event Manager (EM). EM is responsible for receiving and sending messages between the controllers. The messages include Quiesce Request, Quiesce Complete, and Quiesce CommandDone. The controller responds according to the received messages. Execute the corresponding event processing function to ensure the execution order of the Ordered Command.
当一个存储控制器接收到Ordered Command的时候,会发送Qr消息到EM,EM将Qr发送到所有的控制器,包括发出Qr的控制器也会接收到。当接收到Qr之后控制器停止继续执行命令,并将新接收到的SCSI命令插入到Quiesce Queue队列中。此时控制器中会有正在执行的Unordered Command,当控制器中正在执行的unordered command执行完毕之后向EM发送Qc消息,EM在接收到Qc消息之后向所有控制器发送Qc消息,包括所在控制器,每个控制器会记录接收到的Qc消息。当Quiesce Complete消息数量达到系统中所有控制器的数量时,表示所有控制器执行Unordered Command命令结束,接收到Ordered Command的控制器可以执行Ordered Command命令。当Ordered Command命令执行完毕之后,控制器向EM发送Qd消息,EM将此消息发送到所有控制器,包括所在控制器。接收到Qd消息的控制器开始执行Quiesce Queue中的消息。参考图2,图2为Ordered Command执行流程,图中是将控制器A和控制器B的EM抽象为一个单独的EM,实际每个控制器一个EM,Qc1、Qc2均为QuiesceComplete消息,Qd1和Qd2均为Quiesce Command Done消息。When a storage controller receives the Ordered Command, it will send a Qr message to the EM, and the EM will send the Qr to all controllers, including the controller that sent the Qr. After receiving Qr, the controller stops executing the command and inserts the newly received SCSI command into the Quiesce Queue. At this time, there will be an Unordered Command being executed in the controller. When the unordered command being executed in the controller is executed, it will send a Qc message to the EM. After receiving the Qc message, the EM will send a Qc message to all controllers, including the controller where it is located. , each controller will record the received Qc message. When the number of Quiesce Complete messages reaches the number of all controllers in the system, it means that all controllers have finished executing the Unordered Command, and the controller that has received the Ordered Command can execute the Ordered Command. After the Ordered Command is executed, the controller sends a Qd message to the EM, and the EM sends this message to all controllers, including the controller where it is located. The controller that receives the Qd message starts to execute the message in the Quiesce Queue. Referring to Figure 2, Figure 2 shows the execution flow of Ordered Command. In the figure, the EMs of controller A and controller B are abstracted into a single EM. In fact, each controller has one EM. Qc1 and Qc2 are QuiesceComplete messages, and Qd1 and Both Qd2 are Quiesce Command Done messages.
Quiesce Queue中的SCSI命令中包含Ordered Command的时候,会再次执行上述步骤,完成Ordered Command命令。由于主机端发送Ordered Command命令的几率比较小,所以并不会影响到存储控制器的效率。When the SCSI command in Quiesce Queue contains Ordered Command, the above steps will be executed again to complete the Ordered Command command. Since the probability of sending the Ordered Command command from the host side is relatively small, it will not affect the efficiency of the storage controller.
对于命令接收队列Quiesce Queue,也称为静止队列,在存储端接收到OrderedCommand之后会继续接收主机端发送过来的SCSI命令,所以每一个存储端控制器需要维护一个命令接收队列Quiesce Queue,队列包括Unordered Command和Ordered Command,所有新接收到的SCSI Command都要插入到此队列中。当接收到Head Of Queue Command的时候需要将其插入到Quiesce Queue队列的队头。For the command receiving queue Quiesce Queue, also known as the static queue, after the storage end receives the OrderedCommand, it will continue to receive the SCSI commands sent by the host end, so each storage end controller needs to maintain a command receiving queue Quiesce Queue, the queue includes Unordered Command and Ordered Command, all newly received SCSI Commands must be inserted into this queue. When the Head Of Queue Command is received, it needs to be inserted into the head of the Quiesce Queue queue.
综上,本发明所提供的一种多控制器中处理有序命令的方法,在存储系统中,当一个控制器接收到有序命令Ordered Command时,控制器中的事件处理器EM向存储系统中所有的控制器发送请求消息Qr;所有的控制器接收请求消息Qr,均继续执行当前的无序命令Unordered Command,执行完毕后向事件处理器EM发送反馈消息Qc;当事件处理器EM接收到的反馈消息Qc的数量与存储系统中所有控制器的数量一致时,接收到有序命令OrderedCommand的控制器开始执行有序命令Ordered Command。可见,在存储系统中,当Qc的数量与存储系统中所有控制器的数量一致时,表示所有控制器执行Unordered Command命令结束,即所有的控制器中的Unordered Command命令执行完毕之后,接收到有序命令OrderedCommand的控制器才开始执行有序命令Ordered Command,保证所有Unordered Command命令执行完毕之后Ordered Command才能开始执行,实现在多控制器中完成有序命令OrderedCommand的正常执行。To sum up, the present invention provides a method for processing ordered commands in multiple controllers. In a storage system, when a controller receives an Ordered Command, the event processor EM in the controller sends a message to the storage system All controllers in the system send a request message Qr; all controllers receive the request message Qr, continue to execute the current unordered command Unordered Command, and send a feedback message Qc to the event processor EM after execution; when the event processor EM receives When the number of feedback messages Qc is consistent with the number of all controllers in the storage system, the controller that receives the OrderedCommand starts to execute the Ordered Command. It can be seen that in the storage system, when the number of Qc is consistent with the number of all controllers in the storage system, it means that all controllers have finished executing the Unordered Command command, that is, after the execution of the Unordered Command command in all controllers is completed, the received The controller of the OrderedCommand starts to execute the Ordered Command. It is guaranteed that the Ordered Command can only be executed after all Unordered Commands are executed, so that the normal execution of the OrderedCommand can be completed in multiple controllers.
以上对本发明所提供的一种多控制器中处理有序命令的方法进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。A method for processing ordered commands in a multi-controller provided by the present invention has been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention, and the descriptions of the above embodiments are only used to help understand the method and core idea of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610918151.4A CN106445849B (en) | 2016-10-21 | 2016-10-21 | The method orderly ordered is handled in a kind of multi-controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610918151.4A CN106445849B (en) | 2016-10-21 | 2016-10-21 | The method orderly ordered is handled in a kind of multi-controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106445849A true CN106445849A (en) | 2017-02-22 |
| CN106445849B CN106445849B (en) | 2019-05-28 |
Family
ID=58176544
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610918151.4A Active CN106445849B (en) | 2016-10-21 | 2016-10-21 | The method orderly ordered is handled in a kind of multi-controller |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106445849B (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101208675A (en) * | 2005-06-29 | 2008-06-25 | 英特尔公司 | Frame sequence processing device, system and method |
| US20090094385A1 (en) * | 2007-10-08 | 2009-04-09 | Freking Ronald E | Techniques for Handling Commands in an Ordered Command Stream |
| US20150324319A1 (en) * | 2014-05-09 | 2015-11-12 | Micron Technology, Inc. | Interconnect systems and methods using hybrid memory cube links |
| CN105183568A (en) * | 2015-08-19 | 2015-12-23 | 山东超越数控电子有限公司 | Inter memory double-controller scsi command synchronization mechanism |
| US20160077991A1 (en) * | 2014-09-12 | 2016-03-17 | Qualcomm Incorporated | Bridging strongly ordered write transactions to devices in weakly ordered domains, and related apparatuses, methods, and computer-readable media |
-
2016
- 2016-10-21 CN CN201610918151.4A patent/CN106445849B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101208675A (en) * | 2005-06-29 | 2008-06-25 | 英特尔公司 | Frame sequence processing device, system and method |
| US20090094385A1 (en) * | 2007-10-08 | 2009-04-09 | Freking Ronald E | Techniques for Handling Commands in an Ordered Command Stream |
| US20150324319A1 (en) * | 2014-05-09 | 2015-11-12 | Micron Technology, Inc. | Interconnect systems and methods using hybrid memory cube links |
| US20160077991A1 (en) * | 2014-09-12 | 2016-03-17 | Qualcomm Incorporated | Bridging strongly ordered write transactions to devices in weakly ordered domains, and related apparatuses, methods, and computer-readable media |
| CN105183568A (en) * | 2015-08-19 | 2015-12-23 | 山东超越数控电子有限公司 | Inter memory double-controller scsi command synchronization mechanism |
Non-Patent Citations (1)
| Title |
|---|
| 舒密特编著;韩永彬,袁潮译: "《SCSI总线和IDE接口:协议、应用和编辑》", 31 March 2001, 北京:中国电力出版社 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106445849B (en) | 2019-05-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9705752B2 (en) | Reliably updating a messaging system | |
| US9614646B2 (en) | Method and system for robust message retransmission | |
| CN110096340B (en) | Timing task processing method and device | |
| US9888048B1 (en) | Supporting millions of parallel light weight data streams in a distributed system | |
| US10474451B2 (en) | Containerized upgrade in operating system level virtualization | |
| CN106462449B (en) | Multi-database logging with multi-project transaction support | |
| CN104468521B (en) | Online moving method, device and system | |
| CN102023974B (en) | A method, device and system for processing messages through a message queue | |
| CN107634984B (en) | A File Synchronization Method Based on One-way Transmission Channel | |
| CN110413398B (en) | Task scheduling method and device, computer equipment and storage medium | |
| CN103888441A (en) | Information transmitting method between application and protocol stack and processing device | |
| CN101593119A (en) | A method and device for upgrading firmware over the air of an exclusive flash memory combination device | |
| CN116301568A (en) | A data access method, device and equipment | |
| CN106815080A (en) | Distributed diagram data treating method and apparatus | |
| US10673983B2 (en) | Processing a unit of work | |
| CN103049348B (en) | The method that under multiserver environment, data fault-tolerant stores | |
| CN113608765A (en) | Data processing method, apparatus, device and storage medium | |
| CN104683486B (en) | Method, apparatus, the distributed system of synchronization message are handled in distributed system | |
| CN107391283A (en) | A kind of message treatment method and device | |
| CN102123079B (en) | Method and device for processing transaction message | |
| CN106445849A (en) | Method for processing ordered command in multiple controllers | |
| CN109032979A (en) | Document transmission method, device, equipment and storage medium between a kind of BMC | |
| CN109933343A (en) | A system installation method and device | |
| CN109728937A (en) | Method and device for updating network state of voice module | |
| CN104220982B (en) | A transaction processing method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |