CN112000480B - Method, device, equipment and medium for improving SSD full-disk scanning efficiency - Google Patents

Method, device, equipment and medium for improving SSD full-disk scanning efficiency Download PDF

Info

Publication number
CN112000480B
CN112000480B CN202010863452.8A CN202010863452A CN112000480B CN 112000480 B CN112000480 B CN 112000480B CN 202010863452 A CN202010863452 A CN 202010863452A CN 112000480 B CN112000480 B CN 112000480B
Authority
CN
China
Prior art keywords
resources
overlapped
idle
resource
read command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010863452.8A
Other languages
Chinese (zh)
Other versions
CN112000480A (en
Inventor
沈荣娟
郭芳芳
杨锦平
韩道静
吴娴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Shenzhen Union Memory Information System Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Union Memory Information System Co Ltd filed Critical Shenzhen Union Memory Information System Co Ltd
Priority to CN202010863452.8A priority Critical patent/CN112000480B/en
Publication of CN112000480A publication Critical patent/CN112000480A/en
Application granted granted Critical
Publication of CN112000480B publication Critical patent/CN112000480B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for improving SSD full disk scanning efficiency, wherein the method comprises the following steps of defining a plurality of Overlapped resources; initializing an overlay resource; judging whether a read command to be sent exists or not; if yes, judging whether the plurality of Overlapped resources have idle Overlapped resources or not; if yes, sending a read command through the idle overextended resource; and waiting for idle overextended resources after sending the read command. The application replaces the multithreading function, the overlay I/O model is OS (Operating System) for transmitting data to the user, completing the context switch and notifying the user after the processing is finished. The processing in the program becomes processing of the OS, and the inside is also processing by a thread. The method can greatly reduce development difficulty, improve development efficiency and reduce software maintenance cost.

Description

Method, device, equipment and medium for improving SSD full-disk scanning efficiency
Technical Field
The application relates to a solid state disk, in particular to a method, a device, equipment and a medium for improving SSD full-disk scanning efficiency.
Background
In recent years, SSD (Solid State Disk) products have been developed unprecedentedly due to high-speed read-write performance, and many manufacturers have invested a lot of manpower and effort to make SSD products, and the performance requirements for SSD are also higher and higher, so that a series of tests and verification are required to ensure the quality of the products. The full disk scan or the designated storage range is one of the tests, and usually requires a certain test time.
The implementation of full-disk scanning on the SSD is not complex, and only the NVMe (Non-Volatile Memory express) read command is sent according to a protocol, but due to the requirement on test time, the read command is generally sent by a single thread for too long, and the performance of the SSD is not exerted. The use of multithreading is feasible, but cumbersome, and the multithreading involves a synchronization mechanism, error handling, and in thousands of thread I/Os, thread context switching is a very CPU resource consuming.
Disclosure of Invention
The application aims to overcome the defects of the prior art and provide a method, a device, equipment and a medium for improving SSD full disk scanning efficiency.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, a method for improving SSD full disc scanning efficiency, the method comprising:
defining a plurality of Overlapped resources;
initializing an overlay resource;
judging whether a read command to be sent exists or not;
if yes, judging whether the plurality of Overlapped resources have idle Overlapped resources or not;
if yes, sending a read command through the idle overextended resource;
and waiting for idle overextended resources after sending the read command.
The further technical scheme is as follows: after the step of determining whether there is a read command to be sent, the method further includes the steps of:
and if not, releasing all the Overlapped resources.
The further technical scheme is as follows: judging whether the idle Overlapped resources exist in the plurality of Overlapped resources or not, and acquiring the idle Overlapped resources specifically comprises the following steps:
judging whether the number of idle Overlapped resources in the defined plurality of Overlapped resources is larger than zero or not;
if yes, sequentially indexing the defined plurality of Overlapped resources;
judging whether event kernel object members in the currently indexed overextended resources are illegal handles or not;
if yes, an event handle is created for the current Overlapped resources through the CreateEvent function, and the number of the corresponding defined idle Overlapped resources in the plurality of Overlapped resources is reduced by one.
The further technical scheme is as follows: in the step of waiting for idle overlay resources after sending the read command, the step of waiting for releasing the idle overlay resources specifically includes the following steps:
sequentially indexing a plurality of Overlapped resources defined from the zeroth;
checking the result of the currently indexed overextended resource through the GetOverlayresult () function, and judging whether the command is sent completely or not;
if yes, releasing the current Overlapped resource as an idle Overlapped resource, and adding one corresponding idle Overlapped resource in the defined plurality of Overlapped resources.
The device for improving the SSD full-disk scanning efficiency comprises a definition unit, an initialization unit, a first judgment unit, a second judgment unit, a read command sending unit and a waiting unit;
the definition unit is used for defining a plurality of Overlapped resources;
the initialization unit is used for initializing the Overlapped resources;
the first judging unit is used for judging whether a read command to be sent exists or not;
the second judging unit is configured to judge whether an idle Overlapped resource exists in the plurality of Overlapped resources;
the read command sending unit is used for sending a read command through the idle overextended resource;
and the waiting unit is used for waiting for idle overextended resources after sending the read command.
The further technical scheme is as follows: the device also comprises a release unit;
the releasing unit is configured to release all the Overlapped resources.
The further technical scheme is as follows: the second judging unit comprises a first judging module, a first index module, a second judging module and an event handle creating module;
the first judging module is used for judging whether the number of idle Overlapped resources in the defined plurality of Overlapped resources is larger than zero;
the first index module is used for sequentially indexing a plurality of overextended resources defined by the first index module;
the second judging module is used for judging whether event kernel object members in the currently indexed overextended resources are illegal handles or not;
the event handle creation module is configured to create an event handle for a current Overlapped resource through a CreateEvent function, and reduce one idle Overlapped resource in the corresponding defined plurality of Overlapped resources.
The further technical scheme is as follows: the waiting unit comprises a second index module, a third judging module and a releasing module;
the second index module is used for sequentially indexing a plurality of overextended resources defined from the zeroth;
the third judging module is configured to check a result of the currently indexed overextended resource through a getoverlappedduct () function, and judge whether the command is sent completely;
the releasing module is configured to release the currently Overlapped resource as an idle Overlapped resource, and one of the idle Overlapped resources in the corresponding defined plurality of Overlapped resources is added.
In a third aspect, a computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method steps for improving SSD full disk scanning efficiency as described above when the computer program is executed.
In a fourth aspect, a storage medium stores a computer program, the computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method steps of improving SSD full disk scanning efficiency as described above.
Compared with the prior art, the application has the beneficial effects that: the application replaces the multithreading function, and the Overlapped I/O model is OS (Operating System) for transmitting data to the user, completing the context switch and notifying the user after the processing is finished. The processing in the program becomes processing of the OS, and the inside is also processing by a thread. The method can greatly reduce development difficulty, improve development efficiency and reduce software maintenance cost.
The foregoing description is only an overview of the present application, and is intended to be more clearly understood as being carried out in accordance with the following description of the preferred embodiments, as well as other objects, features and advantages of the present application.
Drawings
FIG. 1 is a schematic diagram of a prior art single-threaded manner of sending read commands;
FIG. 2 is a diagram illustrating the sending of a read command using an over-extended I/O scheme in accordance with the present application;
FIG. 3 is a flowchart illustrating a method for improving SSD full disk scanning efficiency according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a second embodiment of a method for improving SSD full disk scanning efficiency;
FIG. 5 is a flowchart of a third embodiment of a method for improving SSD full disk scanning efficiency;
FIG. 6 is a schematic block diagram I of an embodiment of an apparatus for improving SSD full disk scanning efficiency;
FIG. 7 is a schematic block diagram II of an embodiment of an apparatus for improving SSD full disk scanning efficiency;
FIG. 8 is a schematic block diagram III of an embodiment of an apparatus for improving SSD full disk scanning efficiency;
fig. 9 is a schematic block diagram of a computer device of the present application.
Detailed Description
In order to more fully understand the technical content of the present application, the following technical solutions of the present application will be further described and illustrated with reference to specific embodiments, but are not limited thereto.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
In the prior art, referring to fig. 1, a host sends a read command to an SSD in a single channel, and one command is completed and then the next command is performed. In the present application, the read command is sent by the Overlapped I/O mode, please refer to FIG. 2, wherein Overlapped is an asynchronous I/O model. Asynchronous I/O differs from synchronous I/O in that the program is suspended until the I/O is processed, and the program is not controlled. Asynchronous I/O, calling a function to tell the OS that I/O operation is performed, returning immediately after the unequal I/O is finished, continuing the program, and sending a notification message after the operating system finishes the I/O. The Overlapped I/O replaces the multithreading function, the OS transmits data, the context switching is completed, and the OS notifies after the processing is completed. The data structure of the overlaid is as follows:
typedef struct_OVERLAPPED{
DWORD Internal;
DWORD InternalHigh;
DWORD Offset;
DWORD OffsetHigh;
HANDLE hEvent;
}OVERLAPPED,*LPOVERLAPPED;
by sending multiple Overlapped requests, each Overlapped handles an independent request operation, and when the system has multiple asynchronous operations for the same file Handle, the event kernel object can be identified through the hervent in the Overlapped. CreateEvent creates an event for each request, initializes the hEvent member of each request, binds an event object for each operation for multiple read and write requests of the same file, and calls GetOverlappdresultants to wait for one (or all) to complete.
Referring to fig. 3, the method for improving the full-disc scanning efficiency of the SSD of the present application includes the following steps:
s10, defining a plurality of Overlapped resources, and executing S20 next;
s20, initializing an Overlapped resource, and executing S30 next;
s30, judging whether a read command to be sent exists, if yes, executing the step S40, and if not, executing the step S70;
s40, judging whether the plurality of Overlapped resources have idle Overlapped resources, if so, executing the step S50, and if not, executing the step S60;
s50, sending a read command through the idle overextended resource, and executing S60 next;
s60, waiting for idle overextended resources after sending the read command.
S70, releasing all the Overlapped resources.
Specifically, by defining a macro first to identify how many Overlapped resources need to be opened, defining N resources, then initializing, if there is a read command to be sent, searching whether there is an idle OVP (abbreviated OVP) resource, if there is any, sending a read command through the OVP, that is, assigning the last parameter Overlapped in the deviceIoControl as the acquired idle OVP resource. And after the transmission is finished, waiting for the release of the idle OVP resources, continuing to transmit the read command when the idle resources exist, and continuing to wait when the idle resources do not exist, and circulating until all the read commands to be transmitted are transmitted.
Referring to fig. 4, determining whether there are idle Overlapped resources in the plurality of Overlapped resources, and obtaining the idle Overlapped resources specifically includes the following steps:
s401, judging whether the number of idle Overlapped resources in the defined plurality of Overlapped resources is larger than zero, if so, executing the step S402, and if not, ending the whole flow;
s402, sequentially indexing a plurality of Overlapped resources defined by the indexes, and executing S403 next;
s403, judging whether event kernel object members in the currently indexed overextended resources are illegal handles, if so, executing step S404, and if not, ending the whole flow;
s404, creating an event handle for the current Overlapped resource through the CreateEvent function, wherein the number of the corresponding defined Overlapped resources is reduced by one.
Specifically, if there is a free resource, the N OVPs are indexed, and from 0 th, it is determined whether the hervent member in the OVP is an INVALID handle, and the INVALID handle is initialized to be used to identify the free state. If the OVP is the illegal handle, an event handle is created through the CreateEvent function, assigned to the hervent member of the OVP, the corresponding number of the OVP idle resources is reduced by 1, and the OVP resources are returned.
Referring to fig. 5, in the step of waiting for the idle Overlapped resources after sending the read command, the step of waiting for releasing the idle Overlapped resources specifically includes the following steps:
s601, sequentially indexing a plurality of Overlapped resources defined from the zeroth, and executing S602 next;
s602, checking the result of the currently indexed overextended resource through a GetOverlayresult () function, judging whether the command is sent completely, if so, executing a step S603, and if not, executing a step S604;
s603, releasing the current Overlapped resource as an idle Overlapped resource, and adding one corresponding idle Overlapped resource in the defined plurality of Overlapped resources;
s604, judging whether the resource is the last Overlapped resource, if so, ending the whole flow, and if not, entering step S601.
Specifically, the N OVPs are first indexed, and from the 0 th, the OVP result is checked through the getoverlappedduct () function, and the last parameter bWait is set to False, which indicates that the I/O is not waiting for completion of the asynchronous operation. And if the result is that the OVP is finished, releasing the current OVP resource, adding 1 to the number of the OVP idle resources, and setting the event handle of the havent member as an illegal handle to represent the idle resources. If the idle resource is not waited, the result is directly returned, the module is continuously called in the main program, and the idle resource is continuously waited.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Corresponding to the method for improving the SSD full disk scanning efficiency, the application also provides a device for improving the SSD full disk scanning efficiency. Referring to fig. 6, the apparatus includes a defining unit 1, an initializing unit 2, a first judging unit 3, a second judging unit 4, a read command transmitting unit 5, a waiting unit 6, and a releasing unit 7;
a definition unit 1, configured to define a plurality of Overlapped resources;
an initialization unit 2, configured to initialize an Overlapped resource;
a first judging unit 3 for judging whether there is a read command to be sent;
a second judging unit 4, configured to judge whether there are idle Overlapped resources in the plurality of Overlapped resources;
a read command sending unit 5, configured to send a read command through an idle overextended resource;
a waiting unit 6, configured to wait for an idle overextended resource after sending a read command;
and a releasing unit 7, configured to release all the Overlapped resources.
Further, referring to fig. 7, the second judging list 4 includes a first judging module 41, a first indexing module 42, a second judging module 43, and an event handler creating module 44;
a first judging module 41, configured to judge whether the number of idle Overlapped resources in the defined plurality of Overlapped resources is greater than zero;
a first indexing module 42, configured to sequentially index a plurality of Overlapped resources defined by the first indexing module;
a second judging module 43, configured to judge whether an event kernel object member in the currently indexed overextended resource is an illegal handle;
the event handle creation module 44 is configured to create an event handle for the current Overlapped resource through the CreateEvent function, and reduce the number of the corresponding and defined Overlapped resources by one.
Further, referring to fig. 8, the waiting unit 6 includes a second index module 61, a third judging module 62, and a releasing module 63;
a second indexing module 61, configured to sequentially index a plurality of Overlapped resources defined from the zeroth;
a third judging module 62, configured to check the result of the currently indexed overextended resource through the getoverlappedduct () function, and judge whether the command is sent completely;
and a releasing module 63, configured to release the current Overlapped resource as an idle Overlapped resource, and increase one of the idle Overlapped resources in the corresponding defined plurality of Overlapped resources.
As shown in fig. 9, the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the method steps for improving the overall scan efficiency of the SSD as described above when executing the computer program.
The computer device 700 may be a terminal or a server. The computer device 700 includes a processor 720, a memory, and a network interface 750, which are connected through a system bus 710, wherein the memory may include a non-volatile storage medium 730 and an internal memory 740.
The non-volatile storage medium 730 may store an operating system 731 and computer programs 732. The computer program 732, when executed, causes the processor 720 to perform any one of a number of methods for improving the overall scan efficiency of SSDs.
The processor 720 is used to provide computing and control capabilities to support the operation of the overall computer device 700.
The internal memory 740 provides an environment for the execution of a computer program 732 in the non-volatile storage medium 730, which when executed by the processor 720, causes the processor 720 to perform any method for improving the overall scan efficiency of the SSD.
The network interface 750 is used for network communications such as sending assigned tasks and the like. It will be appreciated by those skilled in the art that the structure shown in FIG. 9 is merely a block diagram of some of the structures associated with the present inventive arrangements and does not constitute a limitation of the computer device 700 to which the present inventive arrangements may be applied, and that a particular computer device 700 may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components. Wherein the processor 720 is configured to execute the program code stored in the memory to implement the following steps:
defining a plurality of Overlapped resources;
initializing an overlay resource;
judging whether a read command to be sent exists or not;
if yes, judging whether the plurality of Overlapped resources have idle Overlapped resources or not;
if yes, sending a read command through the idle overextended resource;
and waiting for idle overextended resources after sending the read command.
The further technical scheme is as follows: after the step of determining whether there is a read command to be sent, the method further includes the steps of:
and if not, releasing all the Overlapped resources.
The further technical scheme is as follows: judging whether the idle Overlapped resources exist in the plurality of Overlapped resources or not, and acquiring the idle Overlapped resources specifically comprises the following steps:
judging whether the number of idle Overlapped resources in the defined plurality of Overlapped resources is larger than zero or not;
if yes, sequentially indexing the defined plurality of Overlapped resources;
judging whether event kernel object members in the currently indexed overextended resources are illegal handles or not;
if yes, an event handle is created for the current Overlapped resources through the CreateEvent function, and the number of the corresponding defined idle Overlapped resources in the plurality of Overlapped resources is reduced by one.
The further technical scheme is as follows: in the step of waiting for idle overlay resources after sending the read command, the step of waiting for releasing the idle overlay resources specifically includes the following steps:
sequentially indexing a plurality of Overlapped resources defined from the zeroth;
checking the result of the currently indexed overextended resource through the GetOverlayresult () function, and judging whether the command is sent completely or not;
if yes, releasing the current Overlapped resource as an idle Overlapped resource, and adding one corresponding idle Overlapped resource in the defined plurality of Overlapped resources.
It should be appreciated that in embodiments of the present application, the processor 720 may be a central processing unit (Central Processing Unit, CPU), the processor 720 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that the computer device 700 configuration shown in fig. 9 is not limiting of the computer device 700 and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above device may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. 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 application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing examples are provided to further illustrate the technical contents of the present application for the convenience of the reader, but are not intended to limit the embodiments of the present application thereto, and any technical extension or re-creation according to the present application is protected by the present application. The protection scope of the application is subject to the claims.

Claims (10)

1. The method for improving SSD full disk scanning efficiency is characterized by comprising the following steps:
defining a plurality of Overlapped resources;
initializing an overlay resource;
judging whether a read command to be sent exists or not;
if yes, judging whether the plurality of Overlapped resources have idle Overlapped resources or not;
if yes, sending a read command through the idle overextended resource;
and waiting for idle overextended resources after sending the read command.
2. The method for improving the full-disc scanning efficiency of the SSD of claim 1, further comprising the step of, after the step of determining whether there is a read command to be sent:
and if not, releasing all the Overlapped resources.
3. The method for improving SSD full-disk scanning efficiency of claim 1, wherein the determining whether the plurality of Overlapped resources have idle Overlapped resources comprises:
judging whether the number of idle Overlapped resources in the defined plurality of Overlapped resources is larger than zero or not;
if yes, sequentially indexing the defined plurality of Overlapped resources;
judging whether event kernel object members in the currently indexed overextended resources are illegal handles or not;
if yes, an event handle is created for the current Overlapped resources through the CreateEvent function, and the number of the corresponding defined idle Overlapped resources in the plurality of Overlapped resources is reduced by one.
4. The method for improving SSD full disk scanning efficiency of claim 1, wherein waiting for idle overlay resources after sending the read command specifically comprises the steps of:
sequentially indexing a plurality of Overlapped resources defined from the zeroth;
checking the result of the currently indexed overextended resource through the GetOverlayresult () function, and judging whether the command is sent completely or not;
if yes, releasing the current Overlapped resource as an idle Overlapped resource, and adding one corresponding idle Overlapped resource in the defined plurality of Overlapped resources.
5. The device for improving the SSD full-disk scanning efficiency is characterized by comprising a definition unit, an initialization unit, a first judgment unit, a second judgment unit, a read command sending unit and a waiting unit;
the definition unit is used for defining a plurality of Overlapped resources;
the initialization unit is used for initializing the Overlapped resources;
the first judging unit is used for judging whether a read command to be sent exists or not;
the second judging unit is configured to judge whether an idle Overlapped resource exists in the plurality of Overlapped resources if a read command to be sent exists;
the read command sending unit is configured to send a read command through the idle Overlapped resource if the idle Overlapped resource exists;
and the waiting unit is used for waiting for idle overextended resources after sending the read command.
6. The apparatus for improving full disc scanning efficiency of SSD of claim 5, further comprising a release unit;
and the releasing unit is used for releasing all the Overlapped resources if the read command to be sent does not exist.
7. The apparatus for improving SSD full disk scanning efficiency according to claim 5, wherein the second judging unit includes a first judging module, a first indexing module, a second judging module, and an event handle creating module;
the first judging module is used for judging whether the number of idle Overlapped resources in the defined plurality of Overlapped resources is larger than zero;
the first index module is configured to index the defined plurality of Overlapped resources in sequence if the number of the idle Overlapped resources is greater than zero;
the second judging module is used for judging whether event kernel object members in the currently indexed overextended resources are illegal handles or not;
the event handle creation module is configured to create an event handle for the current Overlapped resource through the CreateEvent function if the event handle is an illegal handle, and reduce the number of the corresponding and defined Overlapped resources by one.
8. The apparatus for improving SSD full-disc scanning efficiency according to claim 5, wherein the waiting unit includes a second index module, a third judgment module, and a release module;
the second index module is used for sequentially indexing a plurality of overextended resources defined from the zeroth;
the third judging module is configured to check a result of the currently indexed overextended resource through a getoverlappedduct () function, and judge whether the command is sent completely;
and the releasing module is used for releasing the current over-extended resource as the idle over-extended resource if the command is sent completely, and adding one corresponding idle over-extended resource in the defined plurality of over-extended resources.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method steps of improving SSD full disk scan efficiency as claimed in any one of claims 1 to 4 when the computer program is executed.
10. A storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method steps of improving SSD full disc scanning efficiency as claimed in any one of claims 1 to 4.
CN202010863452.8A 2020-08-25 2020-08-25 Method, device, equipment and medium for improving SSD full-disk scanning efficiency Active CN112000480B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010863452.8A CN112000480B (en) 2020-08-25 2020-08-25 Method, device, equipment and medium for improving SSD full-disk scanning efficiency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010863452.8A CN112000480B (en) 2020-08-25 2020-08-25 Method, device, equipment and medium for improving SSD full-disk scanning efficiency

Publications (2)

Publication Number Publication Date
CN112000480A CN112000480A (en) 2020-11-27
CN112000480B true CN112000480B (en) 2023-12-05

Family

ID=73470817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010863452.8A Active CN112000480B (en) 2020-08-25 2020-08-25 Method, device, equipment and medium for improving SSD full-disk scanning efficiency

Country Status (1)

Country Link
CN (1) CN112000480B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158912A (en) * 2006-10-08 2008-04-09 上海科泰世纪科技有限公司 Asynchronous output incoming signal processing method
CN101609420A (en) * 2009-07-17 2009-12-23 杭州华三通信技术有限公司 Realize method and the redundant arrays of inexpensive disks and the controller thereof of rebuilding of disc redundant array
CN104932942A (en) * 2015-05-29 2015-09-23 华为技术有限公司 Buffer resource allocation method and device
WO2016145904A1 (en) * 2015-09-10 2016-09-22 中兴通讯股份有限公司 Resource management method, device and system
CN109901785A (en) * 2017-12-08 2019-06-18 西安华为技术有限公司 Order sort method reduces and reads time delay method and solid-state hard disk SSD controller
US10445239B1 (en) * 2013-03-15 2019-10-15 Bitmicro Llc Write buffering

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050179936A1 (en) * 2004-02-13 2005-08-18 Microsoft Corporation Scalable print spooler

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158912A (en) * 2006-10-08 2008-04-09 上海科泰世纪科技有限公司 Asynchronous output incoming signal processing method
CN101609420A (en) * 2009-07-17 2009-12-23 杭州华三通信技术有限公司 Realize method and the redundant arrays of inexpensive disks and the controller thereof of rebuilding of disc redundant array
US10445239B1 (en) * 2013-03-15 2019-10-15 Bitmicro Llc Write buffering
CN104932942A (en) * 2015-05-29 2015-09-23 华为技术有限公司 Buffer resource allocation method and device
WO2016145904A1 (en) * 2015-09-10 2016-09-22 中兴通讯股份有限公司 Resource management method, device and system
CN109901785A (en) * 2017-12-08 2019-06-18 西安华为技术有限公司 Order sort method reduces and reads time delay method and solid-state hard disk SSD controller

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
"Overlapped I/O模型深入分析";紫殿;《www.360doc.com/content/11/0924/15/7023119_150875729.shtml》;全文 *
"基于IOCP的MMO服务器设计与实现";王健;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;全文 *
"异步套接字编程之重叠I/O模型";xiongli54;《www.blog.csdn.net/xiongli54/article/details/45646109》;全文 *
"通信机房动力与环境监控系统实现和研究";殷鹏;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;全文 *
一种基于PC机的网络监控及计费软件;唐佳佳;苏州科技学院学报(工程技术版)(第02期);全文 *
基于异步I/O模型的双机TCP代理的研究与实现;赵鲲;王宝生;;电脑知识与技术(第33期);全文 *

Also Published As

Publication number Publication date
CN112000480A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
US12061566B2 (en) IO processing method and apparatus
EP3352083A1 (en) Debugging method, multi-core processor, and debugging equipment
US20080040526A1 (en) Processing apparatus and method of modifying system configuration
US9026687B1 (en) Host based enumeration and configuration for computer expansion bus controllers
US8429454B2 (en) Coordination of error reporting among multiple managed runtimes in the same process
US11163659B2 (en) Enhanced serial peripheral interface (eSPI) signaling for crash event notification
CN104636076A (en) Distributed block device driving method and system for cloud storage
US20130086683A1 (en) Selectively scanning objects for infection by malware
US7281163B2 (en) Management device configured to perform a data dump
KR20180091665A (en) Methods and systems for handling asynchronous event request command in a solid state drive
US20140032967A1 (en) Sas self-test operations
US7685381B2 (en) Employing a data structure of readily accessible units of memory to facilitate memory access
CN110209548B (en) Service control method, system, electronic device and computer readable storage medium
US8346975B2 (en) Serialized access to an I/O adapter through atomic operation
CN112000480B (en) Method, device, equipment and medium for improving SSD full-disk scanning efficiency
US9038075B2 (en) Batch execution of system calls in an operating system
CN109885420B (en) PCIe link fault analysis method, BMC and storage medium
CN116089124A (en) Communication method, device and medium of simulation system
CN107168815B (en) Method for collecting hardware error information
US9552324B2 (en) Dynamic data collection communication between adapter functions
US8359602B2 (en) Method and system for task switching with inline execution
CN108733678B (en) Data searching method, device and related equipment
US7110928B1 (en) Apparatuses and methods for modeling shared bus systems
CN114253877B (en) Method and device for scanning Peripheral Component Interconnect Express (PCIE) equipment in Liune system
CN116841697B (en) Method for processing MMIO request, electronic device and storage medium

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