Magnetic disk device
Patent Information
- Application Number
- CN202510631978.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-02-17
- Filing Date
- 2025-05-16
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]然而,以往技术中,不存在HDD(Hard Disk Drive:硬盘驱动器)等驱动器侧判别主机正在使用的I/O调度器是正在利用BFQ、CFQ之类的、什么样的I/O调度器进行着动作的方法
Smart Images

Figure CN122598696A_ABST
Abstract
Description
[0001] This application enjoys priority based on Japanese Patent Application No. 2025-023515 (filed on February 17, 2025). This application incorporates the entire contents of the basic application by reference to that basic application. Technical Field
[0002] Embodiments of the present invention relate to disk drives. Background Technology
[0003] There are various types of I / O (input / output) schedulers mounted on the host machine. For example, in the case of Linux (registered trademark) operating system, there are CFQ (Completely Fair Queueing Scheduler) and BFQ (Budget Fair Queueing Scheduler).
[0004] CFQ switches schedulers based on a certain time interval, while BFQ switches schedulers based on a certain number of bytes.
[0005] However, in previous technologies, there was no way for the drive side (HDD, Hard Disk Drive) to determine what kind of I / O scheduler the host was using, such as BFQ or CFQ. Summary of the Invention
[0006] Embodiments of the present invention provide a disk drive that improves drive performance by reducing unnecessary seeks, reducing idling rates, and increasing transfer rates.
[0007] Regarding the disk device of this embodiment, in the disk device connected to a host, the host includes an input / output scheduler that summarizes command requests in arbitrary units. The input / output scheduler operates in either a first scheduler switching mode that switches between command groups that are multiple write command requests at a certain time interval, or a second scheduler switching mode that switches between command groups at a certain number of bytes. The disk device includes: a disk having multiple tracks, and multiple data sectors in each track; a read / write head that operates on the data sectors of the disk according to read and write command requests; and a controller that receives a command mode (Command Mode) from the host consisting of multiple command groups that switch at a certain timing. In the case of Pattern), the controller controls the reading and writing of data sectors by the read / write head according to the command request. The controller processes the received command request and records any number of command requests. It calculates and records the transmission rate based on the recorded command requests, compares the calculated transmission rate with the reference transmission rate, and determines whether the input / output scheduler is operating in the first scheduler switching mode or the second scheduler switching mode based on the comparison result. Attached Figure Description
[0008] Figure 1 This is a block diagram illustrating an example of the system configuration of an information processing system according to an embodiment.
[0009] Figure 2 This is a schematic diagram illustrating an example of the configuration of a disk device according to an embodiment.
[0010] Figure 3 This is a schematic diagram illustrating an example of the configuration of a disk in an embodiment.
[0011] Figure 4 This is a diagram illustrating an example of the functional configuration of the firmware in an implementation.
[0012] Figure 5 This is a diagram illustrating an example of the firmware's functional configuration during sequential writing in an implementation method.
[0013] Figure 6 This diagram illustrates an example of command processing when the command mode has been optimized in the implementation.
[0014] Figure 7 This is a flowchart illustrating an example of the operation of a controller mounted on a disk device in an embodiment.
[0015] Figure 8 This is a flowchart illustrating an example of the processing when the controller in the embodiment determines that the command mode sent from the host is switching according to time.
[0016] Figure 9 This is a flowchart illustrating an example of the processing when the controller in the embodiment determines that the command mode sent from the host is switched according to the number of bytes.
[0017] Figure 10 This is a diagram illustrating an example of command processing in the case where there is no mode switching for commands and no seek optimization is performed, as a comparative example.
[0018] Explanation of reference numerals in the attached figures
[0019] 1 Disk device, 2 Host, 7 I / O scheduler, 11 Disk, 22 Heads, 30 Controller, 41 Tracks, 280 Firmware, 281 Calculation unit, 282 Judgment unit, 283 Setting unit. Detailed Implementation
[0020] Hereinafter, the disk device according to embodiments will be described in detail with reference to the accompanying drawings. Furthermore, these embodiments do not constitute a limitation on the present invention.
[0021] Figure 1 This is a block diagram illustrating an example of the system configuration of an information processing system according to an embodiment. The information processing system 100 comprises a disk drive 1 and a host 2. The disk drive 1 is capable of being connected to the host 2. The standard for the communication path between the disk drive 1 and the host 2 is not limited to a specific standard. In one example, SAS (Serial Attached SCSI) may be used as the standard for the communication path between the disk drive 1 and the host 2.
[0022] Disk device 1 receives access commands from host 2 and reads and writes to the disk.
[0023] Host 2 is comparable to, for example, a processor, personal computer, or server. Host 2 primarily features applications 3 and 4, and OS 5.
[0024] Applications 3 and 4 utilize software that works on OS5 and are used by the user through proper installation.
[0025] OS5 is the software required for host 2 to function. In this embodiment, Linux (registered trademark) will be used as an example of OS5 for illustration.
[0026] OS5 primarily features a file system (6) and an I / O scheduler (7).
[0027] File system 6 serves as an interface for connecting to and managing data on disk device 1. Therefore, OS5 can access the data stored on disk device 1 via file system 6.
[0028] I / O scheduler 7 summarizes the command requests input by host 2 in arbitrary units and decides when to issue and send commands to disk device 1.
[0029] The I / O scheduler 7 has one or more I / O queues 8.
[0030] Regarding I / O queue 8, when the I / O scheduler 7 receives multiple grouped commands, i.e., command groups, it stores them in one or more I / O queues 8.
[0031] Figure 2 This is a schematic diagram illustrating an example of the configuration of a disk device according to an embodiment.
[0032] Disk device 1 is connected to host 2. Disk device 1 can receive access commands such as write commands and read commands from host 2.
[0033] The disk drive 1 includes a disk 11 with a recording surface formed on its surface. The disk drive 1 writes and reads data from the disk 11 (more precisely, the recording surface of the disk 11) according to access commands. In addition, the disk drive 1 may have multiple disks 11, but in this embodiment, for the sake of simplicity of explanation and illustration, it is assumed that the disk drive 1 has one disk 11.
[0034] Data writing and reading are performed via the read / write head 22. Specifically, in addition to the disk 11, the disk device 1 also includes a spindle motor 12, a motor driver IC (Integrated Circuit) 21, a read / write head 22, an actuator arm 15, a voice coil motor (VCM) 16, a ramp 13, a head IC 24, a read / write channel (RWC) 25, RAM 27, FROM (Flash Read-Only Memory) 28, a buffer memory 29, a hard disk controller (HDC) 23, and a processor 26.
[0035] The disk 11 is rotated at a predetermined speed by a spindle motor 12 mounted on the spindle of the disk 11. The spindle motor 12 is driven by a motor driver IC 21.
[0036] The motor driver IC21 controls the rotation of the spindle motor 12 and the VCM16.
[0037] The read / write head 22 writes and reads data from the data sectors of the disk 11 using its write element 22w and read element 22r. The read / write head 22 is mounted on the front end of the actuator arm 15. The read / write head 22 moves radially along the disk 11 via the VCM 16 driven by the motor driver IC 21. This movement is called seek.
[0038] In cases such as when the disk 11 stops rotating, the read / write head 22 moves up the ramp 13. The ramp 13 is configured to hold the read / write head 22 in a position away from the disk 11.
[0039] During a read operation, head IC24 amplifies and outputs the signal read by head 22 from disk 11, and supplies it to RWC25. Conversely, during a write operation, head IC24 amplifies the signal corresponding to the data to be written supplied from RWC25 and supplies it to head 22.
[0040] HDC23 controls the transmission and reception of data between the host 2 and the I / F bus, and controls the buffer memory 29.
[0041] The buffer memory 29 is used as a buffer for data sent and received between the host 2 and the host 2. For example, the buffer memory 29 is used to temporarily record data written to or read from the disk 11.
[0042] The buffer memory 29 is, for example, composed of a volatile memory capable of high-speed operation. The type of memory constituting the buffer memory 29 is not limited to a specific type. The buffer memory 29 may be composed of, for example, DRAM (Dynamic Random Access Memory), SRAM (Static Random Access Memory), or a combination thereof.
[0043] RWC25 modulates the data to be written from HDC23, including error correction coding. It then demodulates the signal supplied from IC24 with error correction and other functions based on the modulated data, and outputs the demodulated digital data to HDC23.
[0044] The processor 26 is, for example, a CPU (Central Processing Unit). RAM 27, FROM (Flash Read Only Memory) 28, and buffer memory 29 are connected to the processor 26.
[0045] FROM28 is a non-volatile memory. It stores firmware 280 (program data) and various operational parameters. Although... Figure 2 Firmware 280 is stored in FROM 28, but it can also be stored on disk 11.
[0046] RAM 27 is composed of, for example, DRAM, SRAM, or a combination thereof. RAM 27 is used as memory for the processor 26 to perform operations. RAM 27 is used as an area for loading firmware 280 and for storing various management data.
[0047] The processor 26 performs overall control of the disk device 1 according to the firmware 280 stored in the FROM 28 or the disk 11. For example, the processor 26 loads the firmware 280 from the FROM 28 or the disk 11 into the RAM 27, and executes the control of the motor driver IC 21, head IC 24, RWC 25, HDC 23, etc. according to the loaded firmware 280.
[0048] Furthermore, the configuration including RWC25, processor 26, HDC23, RAM27, FROM28, and buffer memory 29 can also be considered as controller 30. Controller 30 is sometimes configured as a SoC (System-On-a-Chip). Controller 30 does not necessarily have to be configured as a SoC. Controller 30 may also be configured without FROM28, RAM27, and buffer memory 29.
[0049] Figure 3 This is a schematic diagram illustrating an example of the configuration of a disk in an embodiment.
[0050] During the manufacturing process, servo information is written to disk 11, for example, via a servo writer or via self-servo write (SSW). Figure 3 As an example of the configuration of a servo region 42 where servo information is written, a radially arranged servo region 42 is shown. Data regions 43, where data can be written, are provided between the configurations of the servo regions 42.
[0051] Multiple concentric tracks 41 are defined in the radial direction of disk 11 based on servo information. Multiple data sectors for writing data are configured in multiple data areas 43 set along the tracks 41.
[0052] Servo information includes a servo mark, Gray code, burst pattern, and postcode. When writing and reading data from data sectors, the controller 30 generates a Positional Error Signal (PES) based on the servo information read by the read / write head 22 from the servo region 42. The PES indicates the degree of offset from the track center of the target track. The controller 30 performs head positioning, seek control, and tracking control based on the PES obtained each time the read / write head 22 passes through the servo region 42.
[0053] The functions of the firmware 280 of the controller 30 in this embodiment will be described below.
[0054] Figure 4 This is a diagram illustrating an example of the functional configuration of the firmware in an implementation.
[0055] like Figure 4 As shown, firmware 280 includes a calculation unit 281, a judgment unit 282, and a setting unit 283.
[0056] When the computing unit 281 receives a group of command requests, which are multiple write command requests, from the host 2, it records the number of command groups formed when sequential writes are performed. Furthermore, it records the time and transmission rate from the sequential writing of the stored command groups until switching to the next command group. Additionally, it calculates the number of bytes by multiplying the block size of the command by the number of commands contained in the command group, using the timing of switching from one command group to another as a boundary.
[0057] Based on the transmission rate calculated by the calculation unit 281, the judgment unit 282 determines whether the I / O scheduler 7 mounted on the host 2 is operating in BFQ or CFQ mode.
[0058] CFQ is a scheduler switching method where host 2 responds to a group of write command requests, causing I / O scheduler 7 to switch schedulers at certain intervals.
[0059] CFQ is an example of the first scheduler switching method.
[0060] BFQ is a scheduler switching method where host 2, in response to a group of write command requests, causes I / O scheduler 7 to switch schedulers according to a certain number of bytes.
[0061] BFQ is an example of the second scheduler switching method.
[0062] The setting unit 283 sets the number of recorded command modes, the time for switching the scheduler when sequentially writing multiple command groups, the time for first processing a specified command group among multiple command groups, the value of the base transfer rate used when determining whether it is BFQ or CFQ, and the time point for interrupting writing when switching the scheduler according to time and number of bytes.
[0063] Details regarding the explanations associated with these values will be provided in later paragraphs.
[0064] Figure 5 This is a diagram illustrating an example of the firmware's functional configuration during sequential writing in an implementation method.
[0065] exist Figure 5 The concept is that host 2 uses I / O scheduler 7 to send sequential write commands consisting of command groups of command A and command groups of command B, with the command groups switching at certain time intervals.
[0066] Figure 5 The sequential write operation of disk device 1 is triggered by a timer. During this period, disk device 1 processes the received commands as a thread and logs the acquired command patterns in any number of times.
[0067] The number of command modes for logging can be set by the setting unit 283.
[0068] When the controller 30 starts processing a specified command group in a command mode consisting of multiple command groups, it switches and processes sequential writing at any time set by the setting unit 283.
[0069] Next, the controller 30 processes the specified command group, calculates the time to switch from the specified command group that has been logged to another command group through the calculation unit 281, and then switches the sequential writing according to the calculated switching time to respond to the host 2.
[0070] The computing unit 281 maintains the switching time of the specified command group as described above, which is logged.
[0071] Furthermore, the calculation unit 281 calculates the transmission rate after processing any number of command requests in the command mode for logging set by the setting unit 283, and maintains that value.
[0072] Regarding the method for calculating the transmission rate, by processing the commands that have been logged, we know the switching time and number of bytes of the specified command group. Therefore, by dividing the number of bytes by the switching time, we can calculate the transmission rate.
[0073] Next, the judgment unit 282 compares the transmission rate calculated by the calculation unit 281 with the reference transmission rate preset by the setting unit 283.
[0074] If the transmission rate calculated by the calculation unit 281 exceeds the reference transmission rate preset by the setting unit 283, the determination unit 282 determines that the command mode sent from the host 2 is switching according to time. In other words, the determination unit 282 determines that the I / O scheduler 7 mounted on the host 2 is operating in CFQ mode. Then, the controller 30 switches the sequential write according to the switching time maintained by the calculation unit 281.
[0075] Here, the case where the transmission rate exceeds the reference transmission rate can include cases where the transmission rate is higher than the reference transmission rate.
[0076] If the transmission rate calculated by the calculation unit 281 does not exceed the reference transmission rate preset by the setting unit 283, the determination unit 282 determines that the command mode sent from the host 2 is switching according to the number of bytes. In other words, the determination unit 282 determines that the I / O scheduler 7 mounted on the host 2 is operating in BFQ mode.
[0077] Then, the controller 30 switches the sequential write according to the number of bytes held by the computing unit 281.
[0078] Here, the case where the transmission rate does not exceed the reference transmission rate may also include the case where the transmission rate is below the reference transmission rate.
[0079] As mentioned above, the number of bytes is calculated by using the timing of switching from one command group to another as a boundary, and multiplying the block size of the command by the number of commands contained in the command group.
[0080] The following explains command processing when the command mode has been optimized.
[0081] Figure 6 This diagram illustrates an example of command processing when the command mode has been optimized in an implementation. Figure 6 In the middle, the horizontal axis represents time.
[0082] The principle behind command switching does not differ based on time or number of bytes. Therefore, it is possible to predict in advance the number of bytes of data to be written, and thus, to predict in advance the selection of the target data sector that will become the write destination.
[0083] exist Figure 6 In the case where the determination unit 282 determines that the sequential write processing is switched according to time (that is, when the determination unit 282 determines that the I / O scheduler 7 is operating in CFQ mode), the seek process when the sequential write processing is completed in 100ms is shown in the figure. In this case, the controller 30 interrupts the sequential write processing of command A at the time point of 80ms and performs a seek in order to select the target of the write destination of command B.
[0084] Furthermore, when the determination unit 282 determines that the sequential write processing is switched according to the number of bytes (that is, when the determination unit 282 determines that the I / O scheduler 7 is operating in BFQ mode), when the calculation unit 281 calculates the number of bytes of command A to be 1 GiB, the controller 30 interrupts the sequential write processing of command A at a time point of 0.98 GiB and performs seek in order to select the target of the write destination of command B.
[0085] The setting unit 283 can set the time point for interrupting writes when switching schedulers based on time and number of bytes. For example, it can set the seek time to be 80% of the time when the sequential write process is completed.
[0086] As mentioned above, regarding "stop command processing and seek at a certain point in time", in order to allow the controller 30 to have time to select the target of the write destination for the next command processing, the timing of seeking has a margin.
[0087] The following describes a series of processes performed by the controller 30 in this embodiment.
[0088] Figure 7 This is a flowchart illustrating an example of the operation of the controller mounted on the disk device in the embodiment. The flowchart shows the execution of a series of actions when the disk device 1 receives a command request from the host 2, which has a command pattern consisting of multiple command groups.
[0089] When the controller 30 receives a command request consisting of multiple command groups from the host 2, it begins sequential writing thread processing (S601).
[0090] While processing the received commands, the controller 30 causes the calculation unit 281 to log a number of command patterns preset by the setting unit 283 (S602).
[0091] When the controller 30 processes a specified command group from among multiple command groups for the first time in command mode, it switches the sequential writing thread processing at a time set by the setting unit 283 (S603).
[0092] The computing unit 281 obtains the timing for switching from one command group to another from the command mode that has been logged, and calculates the switching time accordingly (S604). After calculating the switching time, the controller 30 switches the sequential writes according to the calculated time in subsequent processing and responds to the host 2.
[0093] After processing any number of command requests that have been logged, the controller 30 records the transmission rate of the interval in the calculation unit 281 (S605).
[0094] Next, the determination unit 282 compares the calculated transmission rate with the reference transmission rate preset by the setting unit 283 (S606).
[0095] If the calculated transmission rate exceeds the reference transmission rate (S606: Yes), the determination unit 282 determines that the command mode sent from the host 2 is switching according to time (S607).
[0096] The following explains the processing steps taken when the controller 30 determines that the command mode sent from the host 2 is switching according to time.
[0097] Figure 8 This is a flowchart illustrating an example of the processing when the controller in the embodiment determines that the command mode sent from the host is switching according to time.
[0098] exist Figure 8 In the process, controller 30 performs sequential writing (S701).
[0099] Next, when the time point set by the setting unit 283 for interrupting the write operation during scheduler switching is reached, the controller 30 interrupts the sequential write operation (S702).
[0100] For example, if the calculation unit 281 calculates the switching time of the command group to be 100ms, and the setting unit 283 sets it to "interrupt command processing when 80% of the switching time has been reached", then the processing will be interrupted at 80ms.
[0101] Next, the controller 30 performs a seek and selects the target location of the disk 11 where the command group sent from the host 2 will be written next (S703).
[0102] Then, the controller 30 performs sequential writing of the next command group at the selected target location (S704).
[0103] If sequential writing continues and disk processing is complete (S705: Yes), the process ends. If disk processing remains (S705: No), the process restarts from S701.
[0104] Return to Figure 7 As explained, the determination unit 282 compares the calculated transmission rate with the reference transmission rate preset by the setting unit 283. If the calculated transmission rate does not exceed the reference transmission rate (S606: No), it determines that the command mode sent from the host 2 is switching according to the number of bytes (S608).
[0105] The following describes the processing steps taken when the controller 30 determines that the command mode sent from the host 2 is switching according to the number of bytes.
[0106] Figure 9 This is a flowchart illustrating an example of the processing when the controller in the embodiment determines that the command mode sent from the host is switched according to the number of bytes.
[0107] exist Figure 9 In the process, controller 30 performs sequential writing (S801).
[0108] Next, the calculation unit 281 calculates the number of bytes in the command group using the byte count calculation method described above (S802).
[0109] Then, when the number of bytes to be written during scheduler switching, set by the setting unit 283, is reached, the controller 30 interrupts the sequential write (S803).
[0110] For example, if the number of bytes calculated by the calculation unit 281 using the above-described byte number calculation method is set to 1 GiB, and the setting unit 283 sets "interrupt sequential writing when 98% of the number of bytes in the command group is reached", then the command processing is interrupted at the time point when 0.98 GiB is reached.
[0111] Next, the controller 30 performs a seek and selects the target location of the disk 11 to write the command group sent from the host 2 (S804).
[0112] Then, the controller 30 performs sequential writing of the next command group at the selected target location (S805).
[0113] When the controller 30 continues sequential writing and disk processing is complete (S806: Yes), the process ends. If there is still disk processing to be completed (S806: No), the process resumes from S801.
[0114] The following is a comparative example of the case where there is no mode for switching commands and no seek optimization.
[0115] Figure 10 This diagram illustrates an example of command processing in a comparative case where there is no mode switching for commands and no seek optimization. Figure 10 In the middle, the horizontal axis represents time.
[0116] exist Figure 10 The design envisions sequential write processing of command groups where the time and number of bytes calculated by the computing unit 281 are calculated to be 100ms or 1GiB.
[0117] In the absence of a command switching mode and without seek optimization, even if host 2 sends the command mode in a way that switches from command group A to command group B, controller 30 cannot predict when the target location for writing will switch. Therefore, useless idle time will occur and the transmission rate will decrease.
[0118] In contrast, in the disk drive 1 of this embodiment, in order to determine on the disk drive 1 side whether the I / O scheduler 7 mounted on the host 2 is switching the scheduler in CFQ or BFQ mode, a random number of command requests consisting of multiple command groups are recorded, and the command switching time and transfer rate are calculated. Then, the calculated transfer rate is compared with a reference transfer rate to determine whether the operation is in CFQ or BFQ mode. As a result, command processing corresponding to the type of I / O scheduler 7 can be performed on the disk drive 1 side, unnecessary seeks are reduced, and the drive performance is improved by reducing the idle rate and increasing the transfer rate.
[0119] Furthermore, in this embodiment, when the disk device 1 performs sequential write processing of a command pattern consisting of multiple command groups, when processing a specific command group among the multiple command groups for the first time, the sequential write is switched and processed at a time set by the setting unit 283. After determining the time when the processing of the specified command group is completed and the process switches to another command group, the I / O scheduler 7 is switched at the determined time. Therefore, according to this embodiment, an increase in transfer rate can be achieved in processing after the time when the process switches from the specified command group to another command group is determined. Thus, drive performance can also be improved during processing in stages where the processing of log-recording commands is not yet complete.
[0120] Furthermore, in this embodiment, the disk drive 1 uses the calculation unit 281 to calculate the transfer rate of a specified command group based on the logged command pattern, and compares it with the reference transfer rate set by the setting unit 283. If the calculated transfer rate exceeds the reference transfer rate set by the setting unit 283, the determination unit 282 determines that the I / O scheduler 7 mounted on the host 2 is operating in CFQ mode. Therefore, according to this embodiment, the disk drive 1 can determine that the I / O scheduler 7 mounted on the host 2 is operating in CFQ mode, and can appropriately process commands sent from the host 2 in CFQ mode on the disk drive 1 side, thereby improving drive performance.
[0121] Furthermore, in the disk device 1 of this embodiment, when the controller 30 determines that the host 2 is operating in CFQ mode, it switches thread processing according to time based on the command switching time of the command mode calculated when sequentially writing command requests consisting of multiple command groups. This optimizes seek timing by allowing sufficient time to select the target data sector for writing. Therefore, according to this embodiment, optimization of seek timing is achieved when the I / O scheduler 7 mounted on the host 2 is operating in CFQ mode, thereby reducing useless seeks, reducing idle time, increasing transfer rate, and ultimately improving drive performance.
[0122] Furthermore, in this embodiment, the disk drive 1 uses the calculation unit 281 to calculate the transfer rate of a specified command group based on the logged command pattern, and compares it with the reference transfer rate set by the setting unit 283. If the calculated transfer rate does not exceed the reference transfer rate set by the setting unit 283, the determination unit 282 determines that the I / O scheduler 7 mounted on the host 2 is operating in BFQ mode. Therefore, according to this embodiment, the disk drive 1 can determine that the I / O scheduler 7 mounted on the host 2 is operating in BFQ mode, and can appropriately process commands sent from the host 2 in BFQ mode on the disk drive 1 side, thereby improving drive performance.
[0123] Furthermore, in the disk device 1 of this embodiment, when the controller 30 determines that the host 2 is operating in BFQ mode, it calculates the number of bytes based on the transmission rate of the command in the command mode calculated when sequentially writing command requests consisting of multiple command groups. It then switches thread processing according to the calculated number of bytes, optimizing seek timing to allow for the selection of the target data sector for writing. Thus, according to this embodiment, optimization of seek timing is achieved when the I / O scheduler 7 mounted on the host 2 is operating in BFQ mode, thereby reducing useless seeks, reducing idle time, increasing transmission rate, and ultimately improving drive performance.
[0124] In this embodiment, Linux (registered trademark) is used as an example of OS5, but it is not limited to this. For example, this embodiment can also be applied to OS5 other than Linux (registered trademark) as long as the OS5 uses a first scheduler switching method that switches between command groups that are multiple write command requests at a certain time interval and a second scheduler switching method that switches between command groups according to a certain number of bytes.
[0125] In this embodiment, the first scheduler switching method of the I / O scheduler 7 is described using CFQ as an example, but it is not limited to this. For example, as long as the first scheduler switching method adopts a first scheduler switching method that switches between command groups that are multiple write command requests at a certain time interval, this embodiment can also be applied to first scheduler switching methods other than CFQ.
[0126] In this embodiment, the second scheduler switching method of the I / O scheduler 7 is described using BFQ as an example, but it is not limited to this. For example, this embodiment can also be applied to any second scheduler switching method other than BFQ, as long as the second scheduler switching method uses a command group that switches according to a certain number of bytes for multiple write command requests.
[0127] Several embodiments of the present invention have been described, but these embodiments are merely illustrative examples and are not intended to limit the scope of the invention. These new embodiments can be implemented in various other ways, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their variations are included within the scope and spirit of the invention, and are included within the scope of the invention as described in the claims and its equivalents.
Claims
1. A disk drive, connected to a host computer, The host has an input / output scheduler that can aggregate command requests in arbitrary units. The input / output scheduler operates in either a first scheduler switching mode that switches between command groups that are multiple write command requests over a certain period of time, or a second scheduler switching mode that switches between command groups based on a certain number of bytes. The disk device includes: A disk having multiple tracks, and each track having multiple data sectors; A read / write head, which operates on the data sector of the disk according to read and write command requests; and The controller, upon receiving a command mode consisting of multiple command groups from the host, which switches at certain time intervals, controls the reading and writing of the data sector by the read / write head according to the command request. The controller Process the received command requests and record any number of command requests. The transmission rate is determined and recorded based on the recorded command requests. The calculated transmission rate is compared with the reference transmission rate, and the comparison result is used to determine whether the input / output scheduler is operating in the first scheduler switching mode or the second scheduler switching mode.
2. The disk drive according to claim 1, The controller When the command group is written sequentially to the data sector, when the controller processes a specified command group from among multiple command groups for the first time in the command mode, the sequential writing is switched and processed at a predetermined time. After the time when the processing of the specified command group is completed and the controller switches from the recorded specified command group to another command group is determined, the input / output scheduler is switched at the determined time.
3. The disk drive according to claim 2, The controller If the transmission rate exceeds the reference transmission rate, it is determined that the input / output scheduler is operating in the first scheduler switching mode.
4. The disk drive according to claim 3, The controller If it is determined that the input / output scheduler is operating in the first scheduler switching mode, the thread processing is switched according to time so as to optimize the timing of seek in order to select the data sector that becomes the destination for writing.
5. The disk drive according to claim 2, The controller If the transmission rate does not exceed the baseline transmission rate, it is determined that the input / output scheduler is operating in the second scheduler switching mode.
6. The disk drive according to claim 5, The controller If it is determined that the input / output scheduler is operating in the second scheduler switching mode, the thread processing is switched according to the number of bytes, so as to optimize the timing of seek in order to select the data sector that becomes the destination for writing.
Citation Information
Patent Citations
Command input device and command input method
JP2025023515A