Magnetic disk drive
Patent Information
- Application Number
- JP2025023515
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2026-08-27
Smart Images

Figure 2026137422000001_ABST
Abstract
Description
Technical Field
[0003]
[0001] This embodiment relates to a magnetic disk device.
Background Art
[0002] There are various types of I / O schedulers installed on a host. For example, when the OS (Operating System) is Linux (registered trademark), there are a CFQ scheduler ( Completely Fair Queueing Scheduler) and a BFQ scheduler (Budget Fair Queueing Scheduler).
[0003] CFQ switches the scheduler at regular intervals, and BFQ switches the scheduler for every certain number of bytes.
Prior Art Documents
Patent Documents
[0004]
Patent Document 1
Patent Document 2
Patent Document 3
Summary of the Invention
Problems to be Solved by the Invention
[0005] ]] However, in the prior art, on the drive side such as an HDD (Hard Disk Drive), there is no method for the drive to determine which I / O scheduler, such as BFQ or CFQ, the host is using for operation.
[0006] One of the objectives of this embodiment is to reduce unnecessary seeks, thereby improving drive performance by reducing the rate of idle and increasing the transfer rate. [Means for solving the problem]
[0007] The magnetic disk device according to this embodiment is a magnetic disk device connected to a host, wherein the host is equipped with an input / output scheduler that groups command requests into arbitrary units, and the input / output scheduler operates in either a first scheduler switching method that switches at regular intervals for command groups which are multiple write command requests, or a second scheduler switching method that switches at regular intervals for command groups, and the magnetic disk device is equipped with multiple tracks, each track having multiple data sectors, and operates in response to read and write command requests to the data sectors of the magnetic disk. The system comprises a magnetic head and a controller that, upon receiving a command pattern from a host consisting of multiple command groups in which the command groups switch at regular intervals, controls the read and write operations to the data sector by the magnetic head in response to the command request. The controller processes the received command requests, records any number of command requests, calculates and records the transfer rate from the recorded command requests, compares the calculated transfer rate with a reference transfer rate, and, based on the comparison result, determines whether the input / output scheduler is operating in a first scheduler switching method or a second scheduler switching method. [Brief explanation of the drawing]
[0008] [Figure 1] Figure 1 is a block diagram showing an example of the system configuration of an information processing system according to the embodiment. [Figure 2] Figure 2 is a schematic diagram showing an example of the configuration of a magnetic disk drive according to an embodiment. [Figure 3] Figure 3 is a schematic diagram showing an example of the configuration of a magnetic disk according to the embodiment. [Figure 4]Figure 4 shows an example of the functional configuration of the firmware according to the embodiment. [Figure 5] Figure 5 shows an example of the functional configuration of the firmware when performing sequential writing according to the embodiment. [Figure 6] Figure 6 shows an example of command processing when the command pattern according to the embodiment is optimized. [Figure 7] Figure 7 is a flowchart showing an example of the operation of a controller mounted on a magnetic disk device according to this embodiment. [Figure 8] Figure 8 is a flowchart showing an example of the processing content when the controller according to the embodiment determines that the command pattern sent from the host is switched over time. [Figure 9] Figure 9 is a flowchart showing an example of the processing content when the controller according to the embodiment determines that the command pattern sent from the host is switched based on the number of bytes. [Figure 10] Figure 10 shows an example of command processing when the command switching pattern for the comparative example is incorrect or when seek optimization is not performed. [Modes for carrying out the invention]
[0009] The magnetic disk device according to the embodiment will be described in detail below with reference to the attached drawings. However, the present invention is not limited to these embodiments.
[0010] Figure 1 is a block diagram showing an example of the system configuration of an information processing system according to an embodiment. The information processing system 100 consists of a magnetic disk drive 1 and a host 2. The magnetic disk drive 1 is connectable to the host 2. The communication channel standard between the magnetic disk drive 1 and the host 2 is not limited to a specific standard. For example, SAS (Serial Attached) SCSI can be adopted as the standard for the communication channel between the magnetic disk drive 1 and the host 2.
[0011] The magnetic disk device 1 receives access commands from the host 2 and performs read and write operations on the magnetic disk.
[0012] The host 2 corresponds to, for example, a processor, a personal computer, or a server. The host 2 mainly includes applications 3, 4, and an OS 5.
[0013] The applications 3, 4 are software that runs on the OS 5 and are used by the user by appropriate installation.
[0014] The OS 5 is software necessary to operate the host 2. In this embodiment, an example using Linux (registered trademark) as the OS 5 will be described.
[0015] The OS 5 mainly includes a file system 6 and an I / O scheduler 7. The file system 6 serves as an interface for connecting to the magnetic disk device 1 and managing data. Thereby, the OS 5 can access the data stored in the magnetic disk device 1 via the file system 6.
[0016] The I / O scheduler 7 groups command requests input by the host 2 in arbitrary units and determines when to issue and transmit commands to the magnetic disk device 1. The I / O scheduler 7 includes one or more I / O queues 8. When the I / O queue 8 receives a plurality of commands grouped by the I / O scheduler 7, that is, a command group, it is stored in one or more I / O queues 8.
[0017] FIG. 2 is a schematic diagram showing an example of the configuration of the magnetic disk device according to the embodiment. The magnetic disk device 1 is connected to the host 2. The magnetic disk device 1 can receive access commands such as write commands and read commands from the host 2.
[0018] The magnetic disk drive 1 comprises a magnetic disk 11 on which a recording surface is formed. The magnetic disk drive 1 writes and reads data to the magnetic disk 11 (more precisely, to the recording surface of the magnetic disk 11) in response to access commands. Although the magnetic disk drive 1 may have multiple magnetic disks 11, in this embodiment, for the sake of simplicity in explanation and illustration, the magnetic disk drive 1 comprises only one magnetic disk 11.
[0019] Data is written and read via the magnetic head 22. Specifically, the magnetic disk device 1 includes, in addition to the magnetic disk 11, a spindle motor 12, a motor driver IC (Integrated Circuit) 21, a magnetic 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.
[0020] The magnetic disk 11 is rotated at a predetermined rotational speed by a spindle motor 12 attached to the rotation axis of the magnetic disk 11. The spindle motor 12 is driven by a motor driver IC 21.
[0021] The motor driver IC21 controls the rotation of the spindle motor 12 and the VCM 16.
[0022] The magnetic head 22 writes and reads data to and from the data sectors of the magnetic disk 11 using its built-in write element 22w and read element 22r. The magnetic head 22 is attached to the tip of the actuator arm 15. The magnetic head 22 is moved along the radial direction of the magnetic disk 11 by a VCM 16 driven by a motor driver IC 21. This operation is called seeking.
[0023] When the rotation of the magnetic disk 11 is stopped, the magnetic head 22 is moved onto the ramp 13. The ramp 13 is configured to hold the magnetic head 22 in a position away from the magnetic disk 11.
[0024] During read operations, the head IC 24 amplifies the signal read by the magnetic head 22 from the magnetic disk 11 and outputs it to the RWC 25. During write operations, the head IC 24 also amplifies the signal corresponding to the data to be written, supplied by the RWC 25, and supplies it to the magnetic head 22.
[0025] HDC23 controls the transmission and reception of data between it and host 2 via the I / F bus, as well as the control of the buffer memory 29.
[0026] The buffer memory 29 is used as a buffer for data transmitted to and from the host 2. For example, the buffer memory 29 is used to temporarily record data written to or read from the magnetic disk 11.
[0027] The buffer memory 29 is composed of, for example, volatile memory capable of high-speed operation. The type of memory that constitutes the buffer memory 29 is not limited to a specific type. The buffer memory 29 can be, for example, DRAM (Dynamic Random Access Memory) or SRAM. (Static Random Access Memory) or a combination of these may be used.
[0028] RWC25 modulates the data to be written supplied from HDC23, including error correction coding, and demodulates the modulated data, including error correction, against the signal supplied from head IC24. Finally, it outputs the demodulated digital data to HDC23.
[0029] 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.
[0030] FROM28 is a non-volatile memory. FROM28 stores the firmware 280 (program data) and various operating parameters. In Figure 2, the firmware 280 is stored in FROM28, but it may also be stored in the magnetic disk 11.
[0031] RAM27 is composed of, for example, DRAM, SRAM, or a combination thereof. RAM27 is used by the processor 26 as operating memory. RAM27 is used as an area where firmware 280 is loaded and an area where various management data is stored.
[0032] The processor 26 controls the magnetic disk device 1 according to firmware 280 stored in FROM 28 or the magnetic disk 11. For example, the processor 26 loads the firmware 280 from FROM 28 or the magnetic disk 11 into RAM 27 and controls the motor driver IC 21, head IC 24, RWC 25, HDC 23, etc., according to the loaded firmware 280.
[0033] The configuration including RWC25, processor 26, HDC23, processor 26, RAM27, FROM28, and buffer memory 29 can also be considered as controller 30. Controller 30 may be configured as a SoC (System-On-a-Chip). Controller 30 does not necessarily have to be configured as an SoC. Controller 30 may also have a configuration without FROM28, RAM27, and buffer memory 29.
[0034] Figure 3 is a schematic diagram showing an example of the configuration of a magnetic disk according to the embodiment. During the manufacturing process, servo information is written to the magnetic disk 11, for example, by a servo writer or by self-servo writing (SSW). As shown in Figure 3, a radial arrangement of servo regions 42 is shown as an example of the arrangement of servo regions 42 on which servo information has been written. Data regions 43 on which data can be written are provided between the arrangement of servo regions 42.
[0035] Multiple concentric tracks 41 are set in the radial direction of the magnetic disk 11 based on servo information. Multiple data areas 43 are arranged along the tracks 41, and multiple data sectors on which data is written are placed.
[0036] The servo information includes a servo mark, Gray code, burst pattern, and postcode. When the controller 30 writes and reads data to the data sector, it generates a Positional Error Signal (PES) based on the servo information read by the magnetic head 22 from the servo area 42. The PES indicates the degree of deviation of the target track from the track center. Based on the PES acquired each time the magnetic head 22 passes through the servo area 42, the controller 30 performs positioning of the magnetic head 22, i.e., seek control and tracking control.
[0037] The functions of the firmware 280 installed in the controller 30 in this embodiment will be described below. Figure 4 shows an example of the functional configuration of the firmware according to the embodiment. As shown in Figure 4, the firmware 280 includes a calculation unit 281, a decision unit 282, and a setting unit 283.
[0038] When the calculation unit 281 receives a group of commands from the host 2, which are command requests for multiple writes, it records the number of command groups that make up the sequential write operation. Furthermore, it records the time from sequential writing to the saved command group until switching to the next command group, and the transfer rate. It also calculates the number of bytes by multiplying the block size of the command by the number of commands included in the command group, using the timing of switching from one command group to another as the boundary.
[0039] The determination unit 282 determines whether the I / O scheduler 7 installed on the host 2 is operating in BFQ mode or CFQ mode, based on the transfer rate calculated by the calculation unit 281.
[0040] CFQ is a type of scheduler switching method in which, in response to a group of commands that consist of multiple write command requests from host 2, the I / O scheduler 7 switches schedulers at regular intervals. CFQ is an example of a primary scheduler switching method.
[0041] BFQ is a type of scheduler switching method in which, in response to a group of commands that are multiple write command requests from host 2, the I / O scheduler 7 switches schedulers based on a certain number of bytes. BFQ is an example of a second scheduler switching method.
[0042] The setting unit 283 sets the number of command patterns to record, the time to switch schedulers when performing sequential writes of multiple command groups, when processing a specified command group among multiple command groups for the first time, the value of the reference transfer rate used to determine whether it is BFQ or CFQ, and the point at which writes are interrupted when switching schedulers based on time and number of bytes. Further explanations regarding these values will be provided in subsequent paragraphs.
[0043] Figure 5 shows an example of the functional configuration of the firmware when performing sequential writing according to the embodiment. In Figure 5, it is assumed that host 2 uses I / O scheduler 7 to send a command pattern consisting of sequential write commands, comprising command group A and command group B, with the command groups switching at regular intervals.
[0044] Figure 5 is triggered by the timing when magnetic disk drive 1 performs a sequential write. During this time, magnetic disk drive 1 processes the received commands in a thread and logs an arbitrary number of received command patterns. The number of command patterns to be logged may be configured in the setting section 283.
[0045] When the controller 30 processes a specified command group for the first time in a command pattern consisting of multiple command groups, it switches sequential writing at a time set in the setting unit 283 to process the command.
[0046] Next, the controller 30 processes the specified command set, and the calculation unit 281 determines the time required to switch from the logged specified command set to another command set. Then, the controller 30 switches the sequential write at the determined switching time and responds to the host 2.
[0047] The calculation unit 281 stores the switching times of the specified command group that were logged, as described above. Furthermore, the calculation unit 281 calculates the transfer rate once processing is complete for any number of command requests from the command patterns to be logged set in the setting unit 283, and stores this value.
[0048] The transfer rate is calculated by processing the logged commands. This allows us to determine the switching time and the number of bytes for a specified group of commands. By dividing this number of bytes by the switching time, the transfer rate can be calculated.
[0049] Next, the determination unit 282 compares the transfer rate calculated by the calculation unit 281 with the reference transfer rate that has been set in advance by the setting unit 283.
[0050] If the transfer rate calculated by the calculation unit 281 exceeds the reference transfer rate set in advance by the setting unit 283, the determination unit 282 determines that the command pattern sent from host 2 is switching over time. In other words, the determination unit 282 determines that the I / O scheduler 7 installed on host 2 is operating in CFQ mode. The controller 30 then switches the sequential write operation based on the switching time held by the calculation unit 281. In this case, if the transfer rate exceeds the standard transfer rate, it may also be included that the transfer rate is equal to or greater than the standard transfer rate.
[0051] If the transfer rate calculated by the calculation unit 281 does not exceed the reference transfer rate set in advance by the setting unit 283, the determination unit 282 determines that the command pattern sent from host 2 is switched based on the number of bytes. In other words, the determination unit 282 determines that the I / O scheduler 7 installed on host 2 is operating in BFQ mode. The controller 30 then switches sequential write operations based on the number of bytes held by the calculation unit 281. Here, if the transfer rate does not exceed the standard transfer rate, it may also include the case where the transfer rate is less than or equal to the standard transfer rate.
[0052] As mentioned earlier, the method for calculating the number of bytes is to multiply the block size of a command by the number of commands included in the command group, using the point at which a switch occurs from one command group to another as the boundary.
[0053] The following describes the command processing when the command pattern has been optimized. Figure 6 shows an example of command processing when the command pattern according to the embodiment is optimized. In Figure 6, the horizontal axis represents time. The principle behind command switching is the same regardless of time or the number of bytes. Therefore, since the number of bytes of data to be written can be predicted in advance, the selection of the target data sector to write to can also be predicted in advance.
[0054] Figure 6 illustrates the seek process when the sequential write process is completed in 100ms, assuming that the determination unit 282 has determined that the sequential write process is being switched over over time (i.e., the determination unit 282 has determined that the I / O scheduler 7 is operating in CFQ mode). In this case, the controller 30 interrupts the sequential write process for command A at 80ms and performs a seek to select the target for the write operation of command B.
[0055] Furthermore, if the determination unit 282 determines that sequential write processing is being switched based on the number of bytes (i.e., if the determination unit 282 determines that the I / O scheduler 7 is operating in BFQ mode), and the calculation unit 281 calculates the number of bytes for command A to be 1 GiB, the controller 30 interrupts the sequential write processing for command A when it reaches 0.98 GiB and performs a seek to select the target for writing command B.
[0056] The setting unit 283 allows you to configure the point at which writing is interrupted when switching schedulers based on the time and byte counts mentioned above. For example, you can set it to seek at "80% of the time it will take for sequential writing to be completed".
[0057] As described above, stopping command processing and seeking at a certain point allows the controller 30 to have enough time to select the target for the next command's write operation.
[0058] The following describes a series of processes performed by the controller 30 according to this embodiment. Figure 7 is a flowchart showing an example of the operation of a controller mounted on a magnetic disk drive according to this embodiment. In this figure, the magnetic disk drive 1 performs a series of operations when it receives a command request from the host 2 that has a command pattern consisting of multiple command groups.
[0059] When the controller 30 receives a command request from the host 2 consisting of multiple command groups, it starts sequential write thread processing (S601).
[0060] While the controller 30 processes the received commands, the calculation unit 281 logs a number of command patterns that have been pre-set in the setting unit 283 (S602).
[0061] When the controller 30 processes a specified set of commands for the first time from among multiple command sets in a command pattern, it switches the sequential write thread processing after the time set in the setting unit 283 (S603).
[0062] The calculation unit 281 extracts the timing of switching from one command group to another from the logged command pattern and calculates the switching time from there (S604). Once the controller 30 has determined the switching time, it then switches the sequential write at the calculated time and responds to the host 2.
[0063] After the controller 30 has processed any number of logged command requests, it records the transfer rate for that section in the calculation unit 281 (S605).
[0064] Next, the determination unit 282 compares the determined transfer rate with the reference transfer rate pre-set by the setting unit 283 (S606).
[0065] If the requested transfer rate exceeds the standard transfer rate (S606: Yes), the determination unit 282 determines that the command pattern sent from host 2 is switched over time (S607).
[0066] The following describes the processing performed when the controller 30 determines that the command pattern sent from the host 2 is being switched over time. Figure 8 is a flowchart showing an example of the processing content when the controller according to the embodiment determines that the command pattern sent from the host is switched over time.
[0067] In Figure 8, the controller 30 performs sequential writing (S701). Next, when the point in time is reached where the lights should be interrupted when switching the scheduler set in the setting unit 283, the controller 30 interrupts the sequential lights (S702). For example, if the calculation unit 281 calculates that the command switching time is 100ms, and the setting unit 283 is set to "interrupt command processing when 80% of the switching time is reached," then processing will be interrupted at 80ms.
[0068] Next, the controller 30 performs a seek and selects the target destination for the magnetic disk 11 to which the next set of commands sent from the host 2 will be written (S703).
[0069] Then, the controller 30 performs sequential writes to the selected target destination for the following commands (S704).
[0070] Continue sequential writing, and once disk processing is complete (S705:Yes), terminate the process. If disk processing is still ongoing (S705:No), restart from process S701.
[0071] Returning to the explanation of Figure 7, the determination unit 282 compares the obtained transfer rate with the reference transfer rate set in advance by the setting unit 283. If the obtained transfer rate does not exceed the reference transfer rate (S606: No), it determines that the command pattern sent from host 2 is switched based on the number of bytes (S608).
[0072] The following describes the processing performed when the controller 30 determines that the command pattern sent from the host 2 is switched based on the number of bytes. Figure 9 is a flowchart showing an example of the processing content when the controller according to the embodiment determines that the command pattern sent from the host is switched based on the number of bytes.
[0073] In Figure 9, the controller 30 performs sequential writing (S801). Next, the calculation unit 281 calculates the number of bytes in the command group using the byte count calculation method described above (S802). Then, when the number of bytes reached that triggers the interruption of writing when switching the scheduler set in the setting unit 283, the controller 30 interrupts the sequential write (S803). For example, if the calculation unit 281 determines that the number of bytes is 1 GiB using the method described above, and the setting unit 283 is set to "interrupt sequential writing when the number of bytes in the command group reaches 98%", then command processing will be interrupted when the number of bytes reaches 0.98 GiB.
[0074] Next, the controller 30 performs a seek and selects the target destination for the magnetic disk 11 to which the next set of commands sent from the host 2 will be written (S804).
[0075] Then, the controller 30 performs sequential writes to the selected target destination for the following commands (S805).
[0076] Controller 30 continues sequential writing and terminates the process once the disk processing is complete (S806:Yes). If there is still disk processing remaining (S806:No), the process restarts from S801.
[0077] The following provides examples of cases where the command switching pattern is incorrect or where seek optimization is not performed. Figure 10 shows an example of command processing when the command switching pattern for the comparative example is incorrect or when seek optimization is not performed. In Figure 10, the horizontal axis represents time. Figure 10 assumes sequential write processing of a command group where the time and number of bytes calculated by the calculation unit 281 are 100 ms or 1 GiB.
[0078] If the command switching pattern is incorrect or seek optimization is not performed, even if host 2 sends a command pattern to switch from command A to command B, controller 30 cannot predict when the target destination to write to will switch, resulting in wasted idle time and a decrease in the transfer rate.
[0079] In contrast, in the magnetic disk device 1 according to this embodiment, in order to determine on the magnetic disk device 1 side whether the I / O scheduler 7 installed on the host 2 is switching schedulers by CFQ or BFQ, the magnetic disk device 1 records any number of command requests consisting of multiple command groups and calculates the command switching time and transfer rate. Then, the calculated transfer rate is compared with the reference transfer rate to determine whether it is operating in CFQ or BFQ mode. As a result, the magnetic disk device 1 side can process commands according to the type of I / O scheduler 7, reducing unnecessary seeks, reducing the rate of idle, and improving drive performance by improving the transfer rate.
[0080] Furthermore, in this embodiment, when the magnetic disk device 1 performs sequential write processing of a command pattern composed of multiple command groups, when processing a specified command group from among the multiple command groups for the first time, it switches the sequential write at the time set by the setting unit 283 and processes it. After the processing of the specified command group is completed and the time to switch from the specified command group to another command group is determined, the I / O scheduler 7 is switched at the determined time. As a result, according to this embodiment, it is possible to improve the transfer rate in processing after the time to switch from the specified command group to another command group has been determined. This makes it possible to improve drive performance even in processing at a stage where the processing of logged commands has not yet been completed.
[0081] Furthermore, in this embodiment, the magnetic disk device 1 calculates the transfer rate of a specified command group from the logged command pattern using the calculation unit 281 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 installed on the host 2 is operating in CFQ mode. As a result, according to this embodiment, the magnetic disk device 1 can determine that the I / O scheduler 7 installed on the host 2 is operating in CFQ mode, and the magnetic disk device 1 can perform appropriate processing on the command processing side that is sent from the host 2 in CFQ mode, thereby improving drive performance.
[0082] Furthermore, in the magnetic disk device 1 according to this embodiment, when the controller 30 determines that the host 2 is operating in CFQ mode, it switches thread processing based on the command switching time of the calculated command pattern when performing sequential write of a command request consisting of multiple command groups, optimizing the seek timing so that the selection of the target data sector for writing is completed in time. As a result, according to this embodiment, by optimizing the seek timing when the I / O scheduler 7 installed on the host 2 is operating in CFQ mode, unnecessary seeks are reduced, the rate of idle is reduced, and the transfer rate is improved, thereby improving the performance of the drive.
[0083] Furthermore, in this embodiment, the magnetic disk device 1 calculates the transfer rate of a specified command group from the logged command pattern using the calculation unit 281 and compares it with the reference transfer rate set by the setting unit 283. The determination unit 282 determines that the I / O scheduler 7 installed on the host 2 is operating by BFQ if the calculated transfer rate does not exceed the reference transfer rate set by the setting unit 283. As a result, according to this embodiment, the magnetic disk device 1 can determine that the I / O scheduler 7 installed on the host 2 is operating by BFQ, and the magnetic disk device 1 can perform appropriate processing on the command processing side that is sent from the host 2 by BFQ, thereby improving drive performance.
[0084] Furthermore, in the magnetic disk device 1 according to 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 command transfer rate of the calculated command pattern when performing sequential write of a command request consisting of multiple command groups, switches thread processing based on the calculated number of bytes, and optimizes the seek timing so that the selection of the target data sector to be written to can be completed in time. As a result, according to this embodiment, by optimizing the seek timing when the I / O scheduler 7 installed on the host 2 is operating in BFQ mode, unnecessary seeks can be reduced, the rate of idle spins can be reduced, and the transfer rate can be improved, thereby improving the performance of the drive.
[0085] In this embodiment, Linux (registered trademark) is used as an example for OS5, but the embodiment is not limited to it. For example, any OS5 other than Linux (registered trademark) can be applied to any OS5 that employs a first scheduler switching method that switches at regular intervals for a group of commands which are command requests for multiple writes, and a second scheduler switching method that switches at regular intervals for a group of commands.
[0086] 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, if the first scheduler switching method is adopted to switch at regular intervals for a group of commands which are command requests for multiple writes, then this embodiment can also be applied to first scheduler switching methods other than CFQ.
[0087] In this embodiment, BFQ is used as an example to describe the second scheduler switching method of the I / O scheduler 7, but it is not limited to this. For example, if a second scheduler switching method is adopted that switches based on a certain number of bytes for a group of commands which are command requests for multiple writes, then this embodiment can also be applied to second scheduler switching methods other than BFQ.
[0088] While several embodiments of the present invention have been described, these embodiments are presented as examples only and are not intended to limit the scope of the invention. These novel embodiments can be carried out in a variety of other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their variations are included in the scope and spirit of the invention, as well as in the claims of the invention and its equivalents.
[0089] 1 Magnetic disk drive, 2 Host, 7 I / O scheduler, 11 Magnetic disk, 22 Magnetic head, 30 Controller, 41 Track, 280 Firmware, 281 Calculation unit, 282 Decision unit, 283 Setting unit.
Claims
1. In a magnetic disk device connected to a host, The host is equipped with an input / output scheduler that groups command requests into arbitrary units, The input / output scheduler operates in either a first scheduler switching method that switches at regular intervals for a group of commands which are command requests for multiple writes, or a second scheduler switching method that switches at regular intervals for a group of commands. The magnetic disk device is A magnetic disk having multiple tracks, each of which has multiple data sectors, A magnetic head that operates in response to read and write command requests to the data sectors of the magnetic disk, The system includes a controller that, upon receiving a command pattern from the host consisting of multiple command groups, in which the command groups switch at regular intervals, controls the read and write operations performed by the magnetic head on the data sectors in response to the command request. The aforementioned controller, While processing received command requests, record any number of command requests. The transfer rate is calculated and recorded from the recorded command requests. The system compares the calculated transfer rate with the reference transfer rate and, based on the comparison result, determines whether the input / output scheduler is operating using the first scheduler switching method or the second scheduler switching method. Magnetic disk drive.
2. The aforementioned controller, The magnetic disk device according to claim 1, wherein when sequentially writing the command group to the data sector, the controller, in the command pattern, when processing a specified command group from among multiple command groups for the first time, switches the sequential write at a predetermined time for processing, and after the processing of the specified command group is completed and the time for switching from the recorded specified command group to another command group is determined, the input / output scheduler is switched at the determined time.
3. The aforementioned controller, The magnetic disk device according to claim 2, wherein if the transfer rate exceeds the reference transfer rate, the input / output scheduler determines that it is operating in the first scheduler switching method.
4. The aforementioned controller, The magnetic disk device according to claim 3, wherein the input / output scheduler, when it determines that it is operating in the first scheduler switching method, switches thread processing over time and optimizes the timing of seeking so that the selection of the target data sector for writing is completed in time.
5. The aforementioned controller, The magnetic disk device according to claim 2, wherein if the transfer rate does not exceed the reference transfer rate, the input / output scheduler determines that it is operating in the second scheduler switching method.
6. The aforementioned controller, The magnetic disk device according to claim 5, wherein the input / output scheduler, when it determines that it is operating in the second scheduler switching method, switches thread processing based on the number of bytes and optimizes the timing of seeking so that the selection of the target data sector for writing can be completed in time.
Citation Information
Patent Citations
System and method for scheduling disk writes in an application server or transactional environment
US20070005882A1
Methods for accounting seek time of disk accesses
US20110196996A1
Mobile device and a method of controlling the mobile device
US20150026398A1