CN113746759B - Dual-control communication method, device and equipment in garbage recovery and readable medium - Google Patents
Dual-control communication method, device and equipment in garbage recovery and readable medium Download PDFInfo
- Publication number
- CN113746759B CN113746759B CN202110962331.3A CN202110962331A CN113746759B CN 113746759 B CN113746759 B CN 113746759B CN 202110962331 A CN202110962331 A CN 202110962331A CN 113746759 B CN113746759 B CN 113746759B
- Authority
- CN
- China
- Prior art keywords
- linked list
- request
- response
- waiting time
- preset
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000004891 communication Methods 0.000 title claims abstract description 31
- 238000011084 recovery Methods 0.000 title claims abstract description 4
- 230000005540 biological transmission Effects 0.000 claims abstract description 148
- 230000004044 response Effects 0.000 claims description 166
- 238000004590 computer program Methods 0.000 claims description 10
- 238000012545 processing Methods 0.000 claims description 10
- 230000009977 dual effect Effects 0.000 claims description 9
- 230000008569 process Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 239000000835 fiber Substances 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000013403 standard screening design Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000008187 granular material Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004064 recycling Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/625—Queue scheduling characterised by scheduling criteria for service slots or service orders
- H04L47/628—Queue scheduling characterised by scheduling criteria for service slots or service orders based on packet size, e.g. shortest packet first
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/56—Queue scheduling implementing delay-aware scheduling
- H04L47/568—Calendar queues or timing rings
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Abstract
The invention discloses a double-control communication method in garbage recovery, which comprises the following steps: creating a transmission request linked list at a first node based on the thread number; acquiring a thread number corresponding to a request to be sent, and judging whether the number of the requests in a corresponding request sending linked list reaches a preset number or not based on the thread number; if the number of the requests in the corresponding transmission request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time; and if the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time, transmitting all the requests in the corresponding transmission request linked list and the request to be transmitted to a second node together. The invention also discloses a double-control communication device, computer equipment and a readable storage medium in garbage collection. The invention reduces the bandwidth occupation and improves the communication efficiency by reducing the frequency of message transmission between nodes.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a readable medium for dual control communication in garbage collection.
Background
Since SSD (Solid State Disk) pages cannot be rewritten, if data in a page must be updated, a new version must be written to an empty page, and a page holding the previous version of data will be marked as a State. When a data block is full of a state page, it needs to be erased before it can be rewritten. A garbage collection process in the SSD controller ensures that the state page is erased and changed to the free state so that a received write command can access this page. The flash memory granule cannot cover the existing data, and the currently invalid data on all SSDs is still stored on the hard disk, so that a large amount of invalid data, also called data garbage, is generated. In order to increase the utilization of SSDs, garbage collection is performed at this time (GC, garbage Collection).
In the garbage recycling process between double controls of the full flash disk array, double controls are needed to be used for locking and unlocking the hash (hash) value. The specific locking and unlocking operation flow comprises the following steps: the controller A performs local locking operation and sets a local locking completion flag bit; the controller A initiates a locking request by sending a locking message to the controller B; after receiving the locking request of the controller A, the controller B performs locking operation on the controller B; after the controller B completes the locking operation, a response message is sent to the controller A by sending a locking success message; the controller A receives the response message of the controller B, sets the opposite end locking completion flag bit, and completes the locking operation. The next processing is continued. The flow of unlocking is also similar, except that the instructions passed in the message are not identical.
When the prior art performs the locking and unlocking operation, the number of each processing is the minimum capacity unit granularity (grain), a large amount of message communication between the double controls is needed, and the bandwidth between the double controls is occupied.
Disclosure of Invention
Accordingly, an object of the embodiments of the present invention is to provide a method, apparatus, device, and readable medium for dual-control communication in garbage collection, in which the number of requests processed in a message is increased, one request message is increased to several request messages, and a plurality of requests are locked or unlocked by sending the message once, so that the frequency of message sending between nodes is reduced, bandwidth occupation is reduced, and communication efficiency between dual-control is improved.
Based on the above object, an aspect of the embodiments of the present invention provides a dual control communication method in garbage collection, including the following steps: creating a transmission request linked list at a first node based on the thread number; acquiring a thread number corresponding to a request to be sent, and judging whether the number of the requests in a corresponding request sending linked list reaches a preset number or not based on the thread number; if the number of the requests in the corresponding transmission request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time; and if the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time, transmitting all the requests in the corresponding transmission request linked list and the request to be transmitted to a second node together.
In some embodiments, the method further comprises: judging whether the time of adding the first request in each transmission request linked list in the linked list exceeds preset waiting time or not at preset interval time respectively; and if the time of adding the first request in the transmission request linked list exceeds the preset waiting time, transmitting all the requests in the transmission request linked list to a second node.
In some embodiments, the method further comprises: if the number of the requests in the corresponding transmission request linked list reaches the preset number, all the requests in the corresponding transmission request linked list and the requests to be transmitted are transmitted to the second node together.
In some embodiments, the method further comprises: if the waiting time of the first request in the corresponding transmission request linked list does not exceed the preset waiting time, the request to be transmitted is added into the corresponding transmission request linked list.
In some embodiments, the method further comprises: creating a transmission response linked list at the second node based on the thread number; processing the received request to obtain a response to be sent, and judging whether the number of the responses in the corresponding sending response linked list reaches a preset number or not based on the thread number of the response to be sent; if the number of the responses in the corresponding transmission response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time; and if the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time, transmitting all the responses in the corresponding transmission response linked list and the response to be transmitted to the first node together.
In some embodiments, the method further comprises: judging whether the time of adding the first response in each transmission response linked list into the linked list exceeds preset waiting time or not at preset interval time respectively; and if the time for adding the first response in the transmission response linked list exceeds the preset waiting time, transmitting all the responses in the transmission response linked list to the first node.
In some embodiments, the method further comprises: if the number of the responses in the corresponding transmission response linked list reaches the preset number, transmitting all the responses in the corresponding transmission response linked list and the responses to be transmitted to the first node together; if the waiting time of the first response in the corresponding transmission response linked list does not exceed the preset waiting time, the response to be transmitted is added into the corresponding transmission response linked list.
In another aspect of the embodiment of the present invention, there is also provided a dual-control communication device in garbage collection, including: a first module configured to create a send request linked list at a first node based on a thread number; the second module is configured to acquire a thread number corresponding to the request to be sent, and judge whether the number of the requests in the corresponding request to be sent linked list reaches a preset number or not based on the thread number; the third module is configured to further judge whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time if the number of the requests in the corresponding transmission request linked list does not reach the preset number; and a fourth module configured to send all requests in the corresponding transmission request linked list and the request to be transmitted to the second node together if the waiting time of the first request in the corresponding transmission request linked list exceeds a preset waiting time.
In still another aspect of the embodiment of the present invention, there is also provided a computer apparatus, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing steps of a method comprising: creating a transmission request linked list at a first node based on the thread number; acquiring a thread number corresponding to a request to be sent, and judging whether the number of the requests in a corresponding request sending linked list reaches a preset number or not based on the thread number; if the number of the requests in the corresponding transmission request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time; and if the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time, transmitting all the requests in the corresponding transmission request linked list and the request to be transmitted to a second node together.
In some embodiments, the steps further comprise: judging whether the time of adding the first request in each transmission request linked list in the linked list exceeds preset waiting time or not at preset interval time respectively; and if the time of adding the first request in the transmission request linked list exceeds the preset waiting time, transmitting all the requests in the transmission request linked list to a second node.
In some embodiments, the steps further comprise: if the number of the requests in the corresponding transmission request linked list reaches the preset number, all the requests in the corresponding transmission request linked list and the requests to be transmitted are transmitted to the second node together.
In some embodiments, the steps further comprise: if the waiting time of the first request in the corresponding transmission request linked list does not exceed the preset waiting time, the request to be transmitted is added into the corresponding transmission request linked list.
In some embodiments, the steps further comprise: creating a transmission response linked list at the second node based on the thread number; processing the received request to obtain a response to be sent, and judging whether the number of the responses in the corresponding sending response linked list reaches a preset number or not based on the thread number of the response to be sent; if the number of the responses in the corresponding transmission response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time; and if the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time, transmitting all the responses in the corresponding transmission response linked list and the response to be transmitted to the first node together.
In some embodiments, the steps further comprise: judging whether the time of adding the first response in each transmission response linked list into the linked list exceeds preset waiting time or not at preset interval time respectively; and if the time for adding the first response in the transmission response linked list exceeds the preset waiting time, transmitting all the responses in the transmission response linked list to the first node.
In some embodiments, the steps further comprise: if the number of the responses in the corresponding transmission response linked list reaches the preset number, transmitting all the responses in the corresponding transmission response linked list and the responses to be transmitted to the first node together; if the waiting time of the first response in the corresponding transmission response linked list does not exceed the preset waiting time, the response to be transmitted is added into the corresponding transmission response linked list.
In yet another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method steps as described above.
The invention has at least the following beneficial technical effects: by increasing the number of requests processed in the message, the information of one request is increased to the information of a plurality of requests, and by sending the message once, locking or unlocking operation of a plurality of requests is carried out, so that the frequency of message sending among nodes is reduced, the bandwidth occupation is reduced, and the communication efficiency between double controls is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an embodiment of a dual control communication method in garbage collection provided by the present invention;
fig. 2 is a schematic diagram of an embodiment of a dual-control communication device in garbage collection according to the present invention;
FIG. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention;
fig. 4 is a schematic diagram of an embodiment of a computer readable storage medium provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two entities with the same name but different entities or different parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention, and the following embodiments are not described one by one.
Based on the above object, in a first aspect of the embodiments of the present invention, an embodiment of a dual control communication method in garbage collection is provided. Fig. 1 is a schematic diagram of an embodiment of a dual control communication method in garbage collection provided by the invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s01, creating a transmission request linked list at a first node based on a thread number;
s02, obtaining thread numbers corresponding to the requests to be sent, and judging whether the number of the requests in the corresponding sending request linked list reaches a preset number or not based on the thread numbers;
s03, if the number of the requests in the corresponding transmission request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time; and
and S04, if the waiting time of the first request in the corresponding transmission request chain table exceeds the preset waiting time, transmitting all the requests in the corresponding transmission request chain table and the request to be transmitted to the second node together.
In this embodiment, for multi-control clusters, garbage collection may involve messaging and responses between nodes. In the messages transmitted between the nodes, the messages contain various information which are used for receiving and processing the messages by the opposite end controllers, and after the processing is finished, the response messages are sent to the source nodes. By increasing the number of the grains processed in the message, the information of one grain is increased to the information of a plurality of grain requests, and by sending the message once, locking or unlocking operation of a plurality of requests is carried out, so that the frequency of message sending among nodes is reduced. The bandwidth occupation is reduced, and the communication efficiency between the double controls is improved.
In this embodiment, when a request message is sent, the number of the grain requests, the message number (msgNo) of each grain request, and the thread number (fibrid) where the grain request is located are increased. 16 transmission request linked lists are created in the transmission node and used for transmitting a request req message for locking, and each linked list is numbered 0-15. 16 transmit response linked lists are created in the receiving node and used for locking the response rsp message of success, and each linked list is numbered 0-15.
When each grain request on the node processes to a locking step, acquiring a thread number (fibrid) where the request is located, checking whether the number of the grain requests in a linked list corresponding to the fibrid is equal to 15, if so, sending all requests in the linked list to the opposite node together with the current request, if the number of the grain requests is less than 15, continuing to judge the time of joining the linked list of the first grain request in the linked list, and if the time of the first request is more than 20ms, sending the request in the linked list together with the current request to the opposite node; if the time does not exceed 20ms, the current request is added to the linked list to wait for transmission while recording the time of adding to the linked list.
After receiving the message, the opposite node analyzes the message content according to the structure, switches to the corresponding thread according to the fiber in the gain request to perform locking operation, and after the locking is completed, checks whether the number of the gains waiting for sending the message in the linked list where the corresponding fbireid is located is equal to 15, and if the number of the gains waiting for sending the message is equal to 15, sends the node in the linked list and the message that the current gain replies that the locking is successful together to the opposite node. If not, continuing to judge whether the time of the first grain request added to the linked list exceeds 20ms or not, if so, forcibly sending all replies and current replies in the linked list back to the opposite node, if not, adding the current replies to the linked list, and recording the adding time. After receiving the response message of the node of the opposite terminal, the source node analyzes the message structure, processes the corresponding gain request, judges whether the double-end locks are added, and carries out the next processing.
In some embodiments of the invention, the method further comprises: judging whether the time of adding the first request to the linked list in each transmission request linked list exceeds preset waiting time or not at preset interval time respectively; and if the time of adding the first request in the transmission request linked list exceeds the preset waiting time, all the requests in the transmission request linked list are transmitted to the second node.
In this embodiment, there may be a situation where the number of gain requests has been less than 16, which relies on the node's timer to force req and rsp messages. The nodes respectively start two timers, the timers scan all linked lists every 100ms, and the messages are forcedly sent to the requests in the linked lists with the grain requests smaller than 16.
In some embodiments of the invention, the method further comprises: if the number of the requests in the corresponding transmission request linked list reaches the preset number, all the requests in the corresponding transmission request linked list and the requests to be transmitted are transmitted to the second node together.
In some embodiments of the invention, the method further comprises: if the waiting time of the first request in the corresponding transmission request linked list does not exceed the preset waiting time, the request to be transmitted is added into the corresponding transmission request linked list.
In some embodiments of the invention, the method further comprises: creating a transmission response linked list at the second node based on the thread number; processing the received request to obtain a response to be sent, and judging whether the number of the responses in the corresponding sending response linked list reaches a preset number or not based on the thread number of the response to be sent; if the number of the responses in the corresponding transmission response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time; and if the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time, transmitting all the responses in the corresponding transmission response linked list and the response to be transmitted to the first node together.
In some embodiments of the invention, the method further comprises: judging whether the time of adding the first response in each transmission response linked list into the linked list exceeds preset waiting time or not at preset interval time respectively; and if the time for adding the first response in the transmission response linked list exceeds the preset waiting time, transmitting all the responses in the transmission response linked list to the first node.
In some embodiments of the invention, the method further comprises: if the number of the responses in the corresponding transmission response linked list reaches the preset number, transmitting all the responses in the corresponding transmission response linked list and the responses to be transmitted to the first node together; if the waiting time of the first response in the corresponding transmission response linked list does not exceed the preset waiting time, adding the response to be transmitted into the corresponding transmission response linked list.
It should be noted that, the steps in the embodiments of the dual control communication method in garbage collection may be intersected, replaced, added and deleted, so that the dual control communication method in garbage collection with the reasonable permutation and combination transformation should also belong to the protection scope of the present invention, and the protection scope of the present invention should not be limited to the embodiments.
Based on the above object, a second aspect of the embodiments of the present invention provides a dual-control communication device in garbage collection. Fig. 2 is a schematic diagram of an embodiment of a dual control communication device in garbage collection according to the present invention. As shown in fig. 2, the embodiment of the invention includes the following modules: a first module S11 configured to create a transmission request linked list at the first node based on the thread number; a second module S12, configured to obtain a thread number corresponding to the request to be sent, and determine, based on the thread number, whether the number of requests in the corresponding request to be sent linked list reaches a preset number; a third module S13, configured to further determine whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time if the number of the requests in the corresponding transmission request linked list does not reach the preset number; and a fourth module S14, configured to send all the requests in the corresponding transmission request linked list to the second node together with the request to be sent if the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor S21; and a memory S22, the memory S22 storing computer instructions S23 executable on the processor, the instructions when executed by the processor performing the steps of the method comprising: creating a transmission request linked list at a first node based on the thread number; acquiring a thread number corresponding to a request to be sent, and judging whether the number of the requests in a corresponding request-to-send linked list reaches a preset number or not based on the thread number; if the number of the requests in the corresponding transmission request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time; and if the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time, transmitting all the requests in the corresponding transmission request linked list and the request to be transmitted to the second node together.
In some embodiments of the invention, the steps further comprise: judging whether the time of adding the first request to the linked list in each transmission request linked list exceeds preset waiting time or not at preset interval time respectively; and if the time of adding the first request in the transmission request linked list exceeds the preset waiting time, all the requests in the transmission request linked list are transmitted to the second node.
In some embodiments of the invention, the steps further comprise: if the number of the requests in the corresponding transmission request linked list reaches the preset number, all the requests in the corresponding transmission request linked list and the requests to be transmitted are transmitted to the second node together.
In some embodiments of the invention, the steps further comprise: if the waiting time of the first request in the corresponding transmission request linked list does not exceed the preset waiting time, the request to be transmitted is added into the corresponding transmission request linked list.
In some embodiments of the invention, the steps further comprise: creating a transmission response linked list at the second node based on the thread number; processing the received request to obtain a response to be sent, and judging whether the number of the responses in the corresponding sending response linked list reaches a preset number or not based on the thread number of the response to be sent; if the number of the responses in the corresponding transmission response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time; and if the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time, transmitting all the responses in the corresponding transmission response linked list and the response to be transmitted to the first node together.
In some embodiments of the invention, the steps further comprise: judging whether the time of adding the first response in each transmission response linked list into the linked list exceeds preset waiting time or not at preset interval time respectively; and if the time for adding the first response in the transmission response linked list exceeds the preset waiting time, transmitting all the responses in the transmission response linked list to the first node.
In some embodiments of the invention, the steps further comprise: if the number of the responses in the corresponding transmission response linked list reaches the preset number, transmitting all the responses in the corresponding transmission response linked list and the responses to be transmitted to the first node together; if the waiting time of the first response in the corresponding transmission response linked list does not exceed the preset waiting time, adding the response to be transmitted into the corresponding transmission response linked list.
The invention also provides a computer readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium S31 stores a computer program S32 that, when executed by a processor, performs the method as described above.
Finally, it should be noted that, as will be understood by those skilled in the art, implementing all or part of the above-mentioned embodiments of the method may be implemented by a computer program to instruct related hardware, and the program of the dual-control communication method in garbage collection may be stored in a computer readable storage medium, where the program when executed may include the steps of the embodiments of the methods described above. The storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.
Claims (9)
1. The double-control communication method in garbage recovery is characterized by comprising the following steps of:
creating a transmission request linked list at a first node based on the thread number;
acquiring a thread number corresponding to a request to be sent, and judging whether the number of the requests in a corresponding request sending linked list reaches a preset number or not based on the thread number;
if the number of the requests in the corresponding transmission request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time; and
if the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time, all the requests in the corresponding transmission request linked list and the requests to be transmitted are transmitted to a second node together;
creating a transmission response linked list at the second node based on the thread number;
processing the received request to obtain a response to be sent, and judging whether the number of the responses in the corresponding sending response linked list reaches a preset number or not based on the thread number of the response to be sent;
if the number of the responses in the corresponding transmission response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time;
and if the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time, transmitting all the responses in the corresponding transmission response linked list and the response to be transmitted to the first node together.
2. The method of double control communication in garbage collection according to claim 1, further comprising:
judging whether the time of adding the first request in each transmission request linked list in the linked list exceeds preset waiting time or not at preset interval time respectively;
and if the time of adding the first request in the transmission request linked list exceeds the preset waiting time, transmitting all the requests in the transmission request linked list to a second node.
3. The method of double control communication in garbage collection according to claim 1, further comprising:
if the number of the requests in the corresponding transmission request linked list reaches the preset number, all the requests in the corresponding transmission request linked list and the requests to be transmitted are transmitted to the second node together.
4. The method of double control communication in garbage collection according to claim 1, further comprising:
if the waiting time of the first request in the corresponding transmission request linked list does not exceed the preset waiting time, the request to be transmitted is added into the corresponding transmission request linked list.
5. The method of double control communication in garbage collection according to claim 1, further comprising:
judging whether the time of adding the first response in each transmission response linked list into the linked list exceeds preset waiting time or not at preset interval time respectively;
and if the time for adding the first response in the transmission response linked list exceeds the preset waiting time, transmitting all the responses in the transmission response linked list to the first node.
6. The method of double control communication in garbage collection according to claim 1, further comprising:
if the number of the responses in the corresponding transmission response linked list reaches the preset number, transmitting all the responses in the corresponding transmission response linked list and the responses to be transmitted to the first node together;
if the waiting time of the first response in the corresponding transmission response linked list does not exceed the preset waiting time, the response to be transmitted is added into the corresponding transmission response linked list.
7. A dual control communication device in garbage collection, comprising:
a first module configured to create a send request linked list at a first node based on a thread number;
the second module is configured to acquire a thread number corresponding to the request to be sent, and judge whether the number of the requests in the corresponding request to be sent linked list reaches a preset number or not based on the thread number;
the third module is configured to further judge whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time if the number of the requests in the corresponding transmission request linked list does not reach the preset number; and
a fourth module, configured to send all requests in the corresponding transmission request linked list and the request to be transmitted to a second node together if the waiting time of the first request in the corresponding transmission request linked list exceeds a preset waiting time;
and a fifth module, configured to create a transmission response linked list at the second node based on a thread number, process the received request to obtain a response to be transmitted, determine whether the number of responses in the corresponding transmission response linked list reaches a preset number based on the thread number of the response to be transmitted, if the number of responses in the corresponding transmission response linked list does not reach the preset number, further determine whether the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time, and if the waiting time of the first response in the corresponding transmission response linked list exceeds the preset waiting time, send all responses in the corresponding transmission response linked list and the response to be transmitted to the first node together.
8. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-6.
9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110962331.3A CN113746759B (en) | 2021-08-20 | 2021-08-20 | Dual-control communication method, device and equipment in garbage recovery and readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110962331.3A CN113746759B (en) | 2021-08-20 | 2021-08-20 | Dual-control communication method, device and equipment in garbage recovery and readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113746759A CN113746759A (en) | 2021-12-03 |
CN113746759B true CN113746759B (en) | 2023-08-18 |
Family
ID=78732011
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110962331.3A Active CN113746759B (en) | 2021-08-20 | 2021-08-20 | Dual-control communication method, device and equipment in garbage recovery and readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113746759B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110447009A (en) * | 2017-03-24 | 2019-11-12 | 西部数据技术公司 | The system and method for obtaining polymerization for adaptive command |
CN111078134A (en) * | 2019-10-18 | 2020-04-28 | 苏州浪潮智能科技有限公司 | Method, apparatus, and medium for adjusting concurrent amount of garbage reclamation in a storage array |
CN112463069A (en) * | 2020-12-11 | 2021-03-09 | 苏州浪潮智能科技有限公司 | Method, device and equipment for recovering storage garbage and readable medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6181304B2 (en) * | 2014-06-19 | 2017-08-16 | 株式会社日立製作所 | Storage device and interface device |
-
2021
- 2021-08-20 CN CN202110962331.3A patent/CN113746759B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110447009A (en) * | 2017-03-24 | 2019-11-12 | 西部数据技术公司 | The system and method for obtaining polymerization for adaptive command |
CN111078134A (en) * | 2019-10-18 | 2020-04-28 | 苏州浪潮智能科技有限公司 | Method, apparatus, and medium for adjusting concurrent amount of garbage reclamation in a storage array |
CN112463069A (en) * | 2020-12-11 | 2021-03-09 | 苏州浪潮智能科技有限公司 | Method, device and equipment for recovering storage garbage and readable medium |
Also Published As
Publication number | Publication date |
---|---|
CN113746759A (en) | 2021-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111708744B (en) | Method, system, device and medium for maintaining file lock based on stateless protocol | |
CN111158610A (en) | Method, device and equipment for synchronously setting cache acceleration and readable medium | |
CN112003915A (en) | File access method, device, equipment and readable medium | |
US20230393950A1 (en) | Method and apparatus for expanding cloud volume, and device and readable medium | |
CN113746759B (en) | Dual-control communication method, device and equipment in garbage recovery and readable medium | |
CN111966637B (en) | Method, device and equipment for opening file and readable medium | |
CN113420082A (en) | Data synchronization anomaly detection method and device | |
CN111176904A (en) | Method, system, equipment and medium for data backup under private cloud architecture | |
CN103714059A (en) | Data updating method and device | |
CN113505180B (en) | Method, device and equipment for synchronizing mirror images in multi-cloud platform and readable medium | |
CN111240933B (en) | Method, system, device and medium for monitoring performance data of multiple data centers | |
CN115756304A (en) | Method, device, equipment and readable medium for realizing configuration data consistency | |
CN113220243B (en) | Method, device and equipment for multi-controller data transmission and readable medium | |
CN111078430A (en) | Message notification processing method, device and storage medium | |
CN104580512A (en) | Data processing method and device and distributed file system | |
CN110569146B (en) | Data backup and configuration method, device, storage medium and system | |
CN113672177B (en) | Method, device, equipment and readable medium for customizing volume QoS (quality of service) of multiple clients | |
CN112463528B (en) | In-band and out-band data interaction method, device, equipment and readable medium | |
CN110737635A (en) | data blocking method | |
CN114138180A (en) | Method, device and equipment for deleting object and readable medium | |
CN114003372A (en) | Method, system, equipment and readable medium for realizing HDFS service capacity quota | |
CN112748882B (en) | Communication method, device, equipment and readable medium of host and storage equipment | |
CN112003933A (en) | Writing method, device and equipment of server and readable medium | |
CN116455722A (en) | Quota management method, device, equipment and medium based on application | |
CN114066632A (en) | Transaction retransmission method and device |
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 |