CN113746759A - Double-control communication method, device, equipment and readable medium in garbage recovery - Google Patents
Double-control communication method, device, equipment and readable medium in garbage recovery Download PDFInfo
- Publication number
- CN113746759A CN113746759A CN202110962331.3A CN202110962331A CN113746759A CN 113746759 A CN113746759 A CN 113746759A CN 202110962331 A CN202110962331 A CN 202110962331A CN 113746759 A CN113746759 A CN 113746759A
- Authority
- CN
- China
- Prior art keywords
- linked list
- request
- sending
- response
- waiting time
- 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
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000004891 communication Methods 0.000 title claims abstract description 32
- 238000011084 recovery Methods 0.000 title claims abstract description 6
- 230000004044 response Effects 0.000 claims description 151
- 230000005540 biological transmission Effects 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 239000000835 fiber Substances 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 239000008187 granular material Substances 0.000 description 1
- 238000004064 recycling Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000013403 standard screening design Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a double-control communication method in garbage recovery, which comprises the following steps: creating a sending 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 sending request linked list reaches a preset number or not based on the thread number; if the number of the requests in the corresponding sending request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time; and if the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time, sending all the requests in the corresponding sending request linked list and the request to be sent to a second node together. The invention also discloses a double-control communication device, computer equipment and a readable storage medium in garbage recovery. The invention reduces the frequency of message sending between nodes, reduces the bandwidth occupation and improves the communication efficiency.
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 overwritten, if the data in a page must be updated, a new version must be written to an empty page, and the page holding the previous version data will be marked as a stable. When a block of data is filled with a stable page, it needs to be erased before it can be rewritten. The garbage collection process in the SSD controller ensures that a stale page is erased and becomes free, 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 the SSDs are still stored on the hard disk, so that a large amount of invalid data, also called data garbage, is generated. In order to improve the utilization rate of the SSD, Garbage Collection (GC) is performed at this time.
In the garbage recycling process between double controls of the full-flash disk array, the double controls are required to perform locking and unlocking operations simultaneously for the operation of locking and unlocking a hash (hash) value. The specific locking and unlocking operation process comprises the following steps: the controller carries out local end locking operation and sets a local end locking completion flag bit; the controller A sends a locking message to the controller B to initiate a locking request; after the controller B receives the locking request of the controller A, locking operation is carried out 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; and the controller A receives the response message of the controller B, sets a locking completion flag bit of the opposite end, and completes the locking operation. And continuing to process in the next step. The flow of unlocking is similar, except that the instructions passed in the message are different.
In the prior art, when the locking and unlocking operations are performed, the number of processing each time is the minimum capacity unit granularity (grain), a large amount of message communication between double controls is needed, and the occupied bandwidth between the double controls is large.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method, an apparatus, a device, and a readable medium for dual-control communication in garbage collection, in which the number of requests processed in a message is increased, one requested message is increased to several requested messages, and locking or unlocking operations of multiple requests are performed by sending a message once, so as to reduce the frequency of message sending between nodes, reduce bandwidth occupation, and improve communication efficiency between dual controls.
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 sending 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 sending request linked list reaches a preset number or not based on the thread number; if the number of the requests in the corresponding sending request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time; and if the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time, sending all the requests in the corresponding sending request linked list and the request to be sent to a second node together.
In some embodiments, the method further comprises: judging whether the time of adding the first request into the linked list in each request sending linked list exceeds the preset waiting time or not at preset intervals; and if the time for adding the first request into the linked list in the request sending linked list exceeds the preset waiting time, sending all the requests in the request sending linked list to the second node.
In some embodiments, the method further comprises: and if the number of the requests in the corresponding sending request linked list reaches the preset number, sending all the requests in the corresponding sending request linked list and the request to be sent to a second node together.
In some embodiments, the method further comprises: and if the waiting time of the first request in the corresponding sending request linked list does not exceed the preset waiting time, adding the request to be sent into the corresponding sending request linked list.
In some embodiments, the method further comprises: creating a sending 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 response sending 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 sending response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding sending response linked list exceeds the preset waiting time; and if the waiting time of the first response in the corresponding response sending linked list exceeds the preset waiting time, sending all the responses in the corresponding response sending linked list and the response to be sent to the first node together.
In some embodiments, the method further comprises: judging whether the time of adding the first response in each sending response linked list to the linked list exceeds the preset waiting time or not at preset intervals; and if the time for adding the first response in the response sending linked list into the linked list exceeds the preset waiting time, sending all the responses in the response sending linked list to the first node.
In some embodiments, the method further comprises: if the number of the responses in the corresponding sending response linked list reaches the preset number, sending all the responses in the corresponding sending response linked list and the response to be sent to the first node together; and if the waiting time of the first response in the corresponding sending response linked list does not exceed the preset waiting time, adding the response to be sent into the corresponding sending response linked list.
In another aspect of the embodiments of the present invention, there is also provided a dual-control communication device in garbage collection, including: a first module configured to create a request-to-send linked list at a first node based on a thread number; the second module is configured to acquire a thread number corresponding to a request to be sent, and judge whether the number of the requests in the corresponding sending request linked list reaches a preset number or not based on the thread number; a third module, configured to further determine whether the waiting time of the first request in the corresponding transmission request linked list exceeds a preset waiting time if the number of the requests in the corresponding transmission request linked list does not reach a preset number; and a fourth module, configured to send all requests in the corresponding transmission request linked list and the request to be sent 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 another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing steps of the method comprising: creating a sending 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 sending request linked list reaches a preset number or not based on the thread number; if the number of the requests in the corresponding sending request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time; and if the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time, sending all the requests in the corresponding sending request linked list and the request to be sent to a second node together.
In some embodiments, the steps further comprise: judging whether the time of adding the first request into the linked list in each request sending linked list exceeds the preset waiting time or not at preset intervals; and if the time for adding the first request into the linked list in the request sending linked list exceeds the preset waiting time, sending all the requests in the request sending linked list to the second node.
In some embodiments, the steps further comprise: and if the number of the requests in the corresponding sending request linked list reaches the preset number, sending all the requests in the corresponding sending request linked list and the request to be sent to a second node together.
In some embodiments, the steps further comprise: and if the waiting time of the first request in the corresponding sending request linked list does not exceed the preset waiting time, adding the request to be sent into the corresponding sending request linked list.
In some embodiments, the steps further comprise: creating a sending 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 response sending 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 sending response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding sending response linked list exceeds the preset waiting time; and if the waiting time of the first response in the corresponding response sending linked list exceeds the preset waiting time, sending all the responses in the corresponding response sending linked list and the response to be sent to the first node together.
In some embodiments, the steps further comprise: judging whether the time of adding the first response in each sending response linked list to the linked list exceeds the preset waiting time or not at preset intervals; and if the time for adding the first response in the response sending linked list into the linked list exceeds the preset waiting time, sending all the responses in the response sending linked list to the first node.
In some embodiments, the steps further comprise: if the number of the responses in the corresponding sending response linked list reaches the preset number, sending all the responses in the corresponding sending response linked list and the response to be sent to the first node together; and if the waiting time of the first response in the corresponding sending response linked list does not exceed the preset waiting time, adding the response to be sent into the corresponding sending response linked list.
In a further aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has at least the following beneficial technical effects: by increasing the number of the requests processed in the message, the information of one request is increased to the information of several requests, and the locking or unlocking operation of a plurality of requests is carried out by sending the message once, so that the message sending frequency between the 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 present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic diagram of an embodiment of a dual-control communication method in garbage collection according to 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 are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
Based on the above purpose, a first aspect of the embodiments of the present invention provides an embodiment of a dual-control communication method in garbage collection. Fig. 1 is a schematic diagram illustrating an embodiment of a dual-control communication method in garbage collection according to the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s01, creating a sending request linked list at the first node based on the thread number;
s02, acquiring a thread number corresponding to the request 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 number;
s03, if the number of the requests in the corresponding sending request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time; and
and S04, if the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time, sending all the requests in the corresponding sending request linked list and the request to be sent to the second node together.
In this embodiment, for a multi-control cluster, the garbage collection involves the sending of messages and responses between nodes. The messages transmitted among the nodes contain various information, and are used for receiving and processing the messages by the opposite end controller, and after the processing is finished, the response messages are sent to the source nodes. By increasing the number of the grams processed in the message, the information of one gram is increased to the information of several gram requests, and by transmitting the message once, locking or unlocking operations of multiple requests are carried out, so that the frequency of message transmission among nodes is reduced. The bandwidth occupation is reduced, and the communication efficiency between double controls is improved.
In this embodiment, when a request message is sent, the number of grain requests, the message number (msgNo) of each grain request, and the thread number (fibre) where the grain request is located are increased. And 16 sending request linked lists are created in the sending node and used for sending locking request req messages, and each linked list is numbered from 0 to 15. And 16 sending response linked lists are created in the receiving node and used for responding rsp messages with successful locking, and each linked list is numbered from 0 to 15.
When each grain request on the node is processed to the locking step, acquiring a thread number (fibre) where the request is located, simultaneously checking whether the number of the grain requests existing in the linked list corresponding to the fibre id is equal to 15, if so, sending all the requests in the linked list and the current request to the opposite end node together, if not, continuing to judge the time of adding the first grain request in the linked list into the linked list, and if the time of the first request exceeds 20ms, sending the requests in the linked list and the current request to the opposite end node together; and if the time does not exceed 20ms, adding the current request into the linked list to be sent, and simultaneously recording the time for adding into the linked list.
After receiving the message, the opposite end node analyzes the message content according to the structure, performs locking operation by switching to the corresponding thread according to the fibried in the grain request, checks whether the number of grains of the messages waiting to be sent in the linked list corresponding to fbireid is equal to 15 after the locking is completed, and sends the nodes in the linked list and the messages which are successfully replied and locked by the current grain to the opposite end node together if the number of grains is equal to 15. If not, continuously judging whether the time of adding the first gain request into the linked list exceeds 20ms or not, if so, forcibly sending all replies and the current reply in the linked list back to the opposite end node, if not, adding the current reply into the linked list, and recording the adding time. After receiving the response message of the node at the opposite end, the source node analyzes the message structure, processes the corresponding grain request, judges whether the double-end lock is added or not, 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 into the linked list in each request sending linked list exceeds the preset waiting time or not at intervals of preset interval time; and if the time for adding the first request into the linked list in the request sending linked list exceeds the preset waiting time, sending all the requests in the request sending linked list to the second node.
In this embodiment, there may be a case where the number of grain requests is less than 16, and this case relies on the node's timer to force the transmission of req and rsp messages. The nodes respectively start two timers, the timers scan all the linked lists every 100ms, and the messages are forcibly 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: and if the number of the requests in the corresponding sending request linked list reaches the preset number, sending all the requests in the corresponding sending request linked list and the requests to be sent to the second node together.
In some embodiments of the invention, the method further comprises: and if the waiting time of the first request in the corresponding sending request linked list does not exceed the preset waiting time, adding the request to be sent into the corresponding sending request linked list.
In some embodiments of the invention, the method further comprises: creating a sending 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 response sending 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 sending response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding sending response linked list exceeds the preset waiting time; and if the waiting time of the first response in the corresponding response sending linked list exceeds the preset waiting time, sending all the responses in the corresponding response sending linked list and the response to be sent to the first node together.
In some embodiments of the invention, the method further comprises: judging whether the time of adding the first response into the linked list in each response sending linked list exceeds the preset waiting time or not at intervals of preset interval time; and if the time for adding the first response in the response chain table into the chain table exceeds the preset waiting time, all the responses in the response chain table are sent to the first node.
In some embodiments of the invention, the method further comprises: if the number of the responses in the corresponding sending response linked list reaches the preset number, all the responses in the corresponding sending response linked list and the responses to be sent are sent to the first node together; and if the waiting time of the first response in the corresponding sending response linked list does not exceed the preset waiting time, adding the response to be sent into the corresponding sending response linked list.
It should be particularly noted that, the steps in the embodiments of the above-mentioned dual-control communication method in garbage collection may be mutually intersected, replaced, added, and deleted, so that these dual-control communication methods in garbage collection that are reasonably arranged, combined and transformed shall also belong to the scope of the present invention, and shall not limit the scope of the present invention to the embodiments.
In view of the above, 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 illustrating an embodiment of the dual-control communication device in garbage collection according to the present invention. As shown in fig. 2, the embodiment of the present invention includes the following modules: a first module S11 configured to create a send request linked list at a 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 whether the number of requests in the corresponding sending request linked list reaches a preset number based on the thread number; a third module S13, configured to, if the number of the requests in the corresponding transmission request linked list does not reach the preset number, further determine whether the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time; and a fourth module S14, configured to send all requests in the corresponding transmission request linked list and the request to be sent to the second node together if the waiting time of the first request in the corresponding transmission request linked list exceeds the preset waiting time.
In view of the above object, a third aspect of the embodiments of the present invention provides 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 steps of implementing a method when the instructions are executed by the processor comprising: creating a sending 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 sending request linked list reaches a preset number or not based on the thread number; if the number of the requests in the corresponding sending request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time; and if the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time, sending all the requests in the corresponding sending request linked list and the request to be sent to the second node together.
In some embodiments of the invention, the steps further comprise: judging whether the time of adding the first request into the linked list in each request sending linked list exceeds the preset waiting time or not at intervals of preset interval time; and if the time for adding the first request into the linked list in the request sending linked list exceeds the preset waiting time, sending all the requests in the request sending linked list to the second node.
In some embodiments of the invention, the steps further comprise: and if the number of the requests in the corresponding sending request linked list reaches the preset number, sending all the requests in the corresponding sending request linked list and the requests to be sent to the second node together.
In some embodiments of the invention, the steps further comprise: and if the waiting time of the first request in the corresponding sending request linked list does not exceed the preset waiting time, adding the request to be sent into the corresponding sending request linked list.
In some embodiments of the invention, the steps further comprise: creating a sending 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 response sending 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 sending response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding sending response linked list exceeds the preset waiting time; and if the waiting time of the first response in the corresponding response sending linked list exceeds the preset waiting time, sending all the responses in the corresponding response sending linked list and the response to be sent to the first node together.
In some embodiments of the invention, the steps further comprise: judging whether the time of adding the first response into the linked list in each response sending linked list exceeds the preset waiting time or not at intervals of preset interval time; and if the time for adding the first response in the response chain table into the chain table exceeds the preset waiting time, all the responses in the response chain table are sent to the first node.
In some embodiments of the invention, the steps further comprise: if the number of the responses in the corresponding sending response linked list reaches the preset number, all the responses in the corresponding sending response linked list and the responses to be sent are sent to the first node together; and if the waiting time of the first response in the corresponding sending response linked list does not exceed the preset waiting time, adding the response to be sent into the corresponding sending response linked list.
The invention also provides a computer readable storage medium. FIG. 4 is a schematic diagram illustrating 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 which, when executed by a processor, performs the method as described above.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate, all or part of the processes in the methods of the above embodiments 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, and when executed, may include the processes 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 embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the methods disclosed according to embodiments 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. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
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 disclosed embodiments of the present invention.
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 place 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 a general-purpose or special-purpose processor. Also, 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 present 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 of the invention 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 numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits 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 instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A double-control communication method in garbage recovery is characterized by comprising the following steps:
creating a sending 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 sending request linked list reaches a preset number or not based on the thread number;
if the number of the requests in the corresponding sending request linked list does not reach the preset number, further judging whether the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time; and
and if the waiting time of the first request in the corresponding sending request linked list exceeds the preset waiting time, sending all the requests in the corresponding sending request linked list and the request to be sent to a second node together.
2. The dual-control communication method in garbage collection according to claim 1, further comprising:
judging whether the time of adding the first request into the linked list in each request sending linked list exceeds the preset waiting time or not at preset intervals;
and if the time for adding the first request into the linked list in the request sending linked list exceeds the preset waiting time, sending all the requests in the request sending linked list to the second node.
3. The dual-control communication method in garbage collection according to claim 1, further comprising:
and if the number of the requests in the corresponding sending request linked list reaches the preset number, sending all the requests in the corresponding sending request linked list and the request to be sent to a second node together.
4. The dual-control communication method in garbage collection according to claim 1, further comprising:
and if the waiting time of the first request in the corresponding sending request linked list does not exceed the preset waiting time, adding the request to be sent into the corresponding sending request linked list.
5. The dual-control communication method in garbage collection according to claim 1, further comprising:
creating a sending 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 response sending 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 sending response linked list does not reach the preset number, further judging whether the waiting time of the first response in the corresponding sending response linked list exceeds the preset waiting time;
and if the waiting time of the first response in the corresponding response sending linked list exceeds the preset waiting time, sending all the responses in the corresponding response sending linked list and the response to be sent to the first node together.
6. The dual-control communication method in garbage collection according to claim 5, further comprising:
judging whether the time of adding the first response in each sending response linked list to the linked list exceeds the preset waiting time or not at preset intervals;
and if the time for adding the first response in the response sending linked list into the linked list exceeds the preset waiting time, sending all the responses in the response sending linked list to the first node.
7. The dual-control communication method in garbage collection according to claim 5, further comprising:
if the number of the responses in the corresponding sending response linked list reaches the preset number, sending all the responses in the corresponding sending response linked list and the response to be sent to the first node together;
and if the waiting time of the first response in the corresponding sending response linked list does not exceed the preset waiting time, adding the response to be sent into the corresponding sending response linked list.
8. A dual-control communication device in garbage recovery is characterized by comprising:
a first module configured to create a request-to-send linked list at a first node based on a thread number;
the second module is configured to acquire a thread number corresponding to a request to be sent, and judge whether the number of the requests in the corresponding sending request linked list reaches a preset number or not based on the thread number;
a third module, configured to further determine whether the waiting time of the first request in the corresponding transmission request linked list exceeds a preset waiting time if the number of the requests in the corresponding transmission request linked list does not reach a preset number; and
and a fourth module, configured to send all requests in the corresponding transmission request linked list and the request to be sent 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.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
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 true CN113746759A (en) | 2021-12-03 |
CN113746759B 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 (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170075828A1 (en) * | 2014-06-19 | 2017-03-16 | Hitachi, Ltd. | Storage apparatus and interface apparatus |
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 |
-
2021
- 2021-08-20 CN CN202110962331.3A patent/CN113746759B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170075828A1 (en) * | 2014-06-19 | 2017-03-16 | Hitachi, Ltd. | Storage apparatus and interface apparatus |
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 |
---|---|
CN113746759B (en) | 2023-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100359960B1 (en) | Computer, data sharing system, and method for maintaining replica consistency | |
CN101741730A (en) | Method and equipment for downloading file and method and system for providing file downloading service | |
CN107241444B (en) | Distributed cache data management system, method and device | |
CN111340470A (en) | Block chain transaction processing method, node and contract container | |
CN111104232A (en) | Method, device and medium for accelerating message writing of message queue | |
CN112003915A (en) | File access method, device, equipment and readable medium | |
CN111221826A (en) | Method, system, device and medium for processing shared cache synchronization message | |
CN114116531B (en) | Cache consistency write-back method, device, equipment and medium | |
CN111966637B (en) | Method, device and equipment for opening file and readable medium | |
CN107357808B (en) | Data management method, device and equipment | |
CN113746759B (en) | Dual-control communication method, device and equipment in garbage recovery and readable medium | |
CN114138181A (en) | Method, device, equipment and readable medium for placing, grouping and selecting owners in binding pool | |
CN114490129B (en) | Message broadcasting method, device and storage medium in cluster | |
CN113505180B (en) | Method, device and equipment for synchronizing mirror images in multi-cloud platform and readable medium | |
CN113190523B (en) | Distributed file system, method and client based on multi-client cooperation | |
CN114138180A (en) | Method, device and equipment for deleting object and readable medium | |
CN111240933B (en) | Method, system, device and medium for monitoring performance data of multiple data centers | |
CN113220243B (en) | Method, device and equipment for multi-controller data transmission and readable medium | |
CN114584551A (en) | File uploading method, electronic equipment and computer program product | |
CN108345431B (en) | Data reading method and device | |
CN112130757A (en) | Storage reservation method, device, equipment and readable medium | |
CN110569146B (en) | Data backup and configuration method, device, storage medium and system | |
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 | |
CN111737658B (en) | Method, system, device and medium for limiting quota of ZooKeeper data node |
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 |