System and method of garbage collection in a memory device

In a particular embodiment, a controller is adapted to perform a garbage collection operation to remove redundant data, to predict a performance parameter associated with performance of the garbage collection operation, and to abort the garbage collection operation when the predicted performance parameter exceeds a threshold.

FIELD OF THE DISCLOSURE

The present disclosure is generally related to a system and method of garbage collection in a memory device. More particularly, the present disclosure is related to a system and method of performing garbage collection in solid-state and hybrid memory devices.

BACKGROUND

Flash memory devices are becoming increasingly important for embedded systems because such memory devices have many attractive features, including small size, fast access speeds, shock resistance, and low weight. In some instances, a NAND flash memory may only allow write-after-erase operations, and re-write operations are not permitted. To improve write performance, a logical block address location is mapped to different physical locations inside of the NAND flash memory. However, this can introduce redundant data that has been overwritten but still occupies physical space within the NAND flash memory. Such redundant data is sometimes referred to as “garbage.”

In some instances, a garbage collection operation is performed to remove the redundant data. In general, garbage collection requires a long time due to a long programming time of the NAND flash memory. In a particular example, a typical garbage collection operation copies valid data page-by-page to another free location and then erases the freed block. In general, copying of each page takes time, and each block typically includes 64 pages of data (128 kilobytes of data). In general, the time needed to free a block of data is dependent on the particular system. In a particular example, given the time to copy a page and given the number of pages to be copied, a particular embodiment of a system can include a flash memory that has a garbage collection rate of about 6.4 megabytes per second. In this instance, the garbage collection operations may be slow as compared to a host-to-device transfer rate of the system. In a particular example, a system can have a host-to-device transfer rate of 66 megabytes per second or more. Hence, a garbage collection operation can be much slower than transfer operations and can decreases the overall performance of the system. Further, a garbage collection operation consumes power for each page of data that is to be removed. When a power supply is limited (such as with a battery power supply), garbage collection at a particular point in time may consume too much power for the particular operating conditions of the device.

SUMMARY

In a particular embodiment, a controller is adapted to perform a garbage collection operation to remove redundant data from a storage media, to predict a performance parameter associated with performance of the garbage collection operation, and to abort the garbage collection operation when the predicted performance parameter exceeds a threshold.

In another particular embodiment, a storage device is disclosed that includes a solid-state memory adapted to store multiple data blocks including one or more redundant data blocks and a controller adapted to perform a garbage collection operation to remove redundant data when the storage device is an idle mode of operation. When the storage device is in an active mode of operation, the controller is adapted to predict a performance parameter associated with performance of the garbage collection operation and to abort the garbage collection operation when the predicted performance parameter exceeds a performance threshold.

In still another particular embodiment, a method is disclosed that includes initiating a garbage collection operation to remove redundant data from a storage media of a storage device. The method further includes predicting a performance parameter associated with execution of the garbage collection operation and aborting the garbage collection operation prior to execution when the performance parameter exceeds a performance threshold.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

FIG. 1is a block diagram of a particular illustrative embodiment of a system100including a storage device102with garbage collection logic. In a particular embodiment, the data storage device102is a solid-state memory device that is adapted to communicate with a host system104via an interface106. The host system104may be a computing system, such a personal computer, a personal digital assistant (PDA), processing logic, another electronic device, or any combination thereof.

The data storage device102includes a control circuit108that is adapted to communicate with a storage media110. In a particular embodiment, the control circuit108includes a processor adapted to execute processor-readable instructions. In a particular example, the storage media110is a solid-state storage media that is adapted to store both data blocks and meta-data related to the data blocks. Depending on the implementation, the solid-state memory can be a NAND flash memory, a NOR flash memory, other solid-solid state memory, or any combination thereof. The control circuit108also communicates with other memory114, which can include flash memory, such as NAND flash memory, NOR flash memory, other solid-state memory, or any combination thereof. Further, the control circuit108is adapted to communicate with firmware116, which may be a code NOR flash memory, such as the code NOR flash memory234illustrated inFIG. 2.

In a particular example, when the storage media110is a NAND flash solid-state memory, each flash page includes spare bytes. In a particular example, for single-level cell (SLC) NAND flash, there are 16 spare bytes for every 512 bytes of data or 64 spare bytes for each two-kilobyte page of data. Metadata, including logical block address (LBA) data, is stored in those spare bytes. In general, some solid-state storage devices, such as NAND flash memory, only allow write after erase operations and do not permit re-write operations. To improve write performance, the same logical block address (LBA) location is mapped to different physical locations inside of the NAND flash memory. However, such mappings introduce garbage, which is redundant data that has been overwritten but that still occupies physical space within the NAND flash. The term “garbage collection operation” refers to a process for removal of such stale or overwritten data.

The firmware116is adapted to store a plurality of instructions that are executable by the control circuit108, including operating instructions for the storage device102. The firmware116includes garbage collection power prediction logic122that is executable by the control circuit108to predict a garbage collection power needed to perform a garbage collection operation based on a number of pages to be copied during a garbage collection operation. Since a copy operation for each page uses a relatively consistent or known amount of power, a count of the pages to be copied provides an estimate of the amount of power needed to complete the operation. The firmware116also includes garbage collection time prediction logic124that is executable by the control circuit108to predict a garbage collection time needed to perform a garbage collection operation based on a number of pages to be copied during a garbage collection operation. In general, since copying of each page consumes a known amount of time, a count of the pages to be copied can be used to estimate the time needed to perform the operation.

The firmware116also includes device mode detection logic126that is adapted to detect an operating mode of the storage device102. In a particular example, the operating mode of the storage device102can be an “idle” operating mode where power is conserved by placing particular circuitry of the storage device102in a reduced power/reduced operating cycle state. The operating mode of the storage device102can also be a full-power operating mode, which reflects power consumption during normal operation. In a particular embodiment, the control circuit108is adapted to control the operating mode of the storage device102and to place the storage device102into the idle operating mode after a period of inactivity.

The firmware116further includes garbage collection data identification logic128that is executable by the control circuit108to identify overwritten, duplicate, or stale data to be removed from the storage media110. The garbage collection data identification logic128is also adapted to identify a particular data block to be copied, such as a largest redundant data block, a smallest redundant data block, another sized data block, or any combination thereof. The firmware116also includes garbage collection control logic130that is executable by the control circuit108to control a flow of a garbage collection process.

The control circuit108is also coupled to an auxiliary power component112. In a particular embodiment, the auxiliary power component112can be a capacitor or a battery that is adapted to supply power to the storage device102under certain operating conditions. In a particular example, the auxiliary power component112can provide a power supply to the control circuit108and to at least one of the storage media110, the other memory114, and the firmware116to record data when power is unexpectedly turned off.

The control circuit108is adapted to load garbage collection logic118from the firmware116. Further, the control circuit108is adapted to load a logical block address (LBA) lookup table120. On power up, power down, and at various times during operation, a garbage collection operation is initiated to delete overwritten or stale data stored at the storage media110. In a particular embodiment, the garbage collection operation can be initiated via an interrupt, based on a command received from the host system104, self-initiated based on instructions stored at the firmware116, or any combination thereof. Additionally, the control circuit108includes a write buffer121that is adapted to temporarily store data to be written to the storage media110. In a particular example, the control circuit108is a processor adapted to execute instructions, and the write buffer121is a buffer memory, such as a random access memory (RAM) associated with the processor.

In a particular embodiment, the control circuit108executes the garbage collection logic118to initiate a garbage collection operation to remove redundant data from a storage media110of the storage device102. In a particular embodiment, the control circuit108executes the device mode detection logic126to determine an operating mode of the storage device102. If the storage device102is in an idle mode, the control circuit108executes the garbage collection control logic130to begin the garbage collection operation. In a particular example, the garbage collection control logic130may begin the garbage collection operation at a smallest free available unit of the control circuit108of the storage media110. For example, if the control circuit108includes a multi-threaded processor, the garbage collection control logic130may initiate the garbage collection operation using one or more threads. In another example, if the control circuit108includes multiple processing cores, the garbage collection control logic130may initiate the garbage collection operation using a single processor core.

In another particular example, if the storage device102is in another mode, such as a full-power operating mode, the control circuit108is adapted to execute one of the garbage collection power prediction logic122and the garbage collection time prediction logic124to predict one of a power needed or a time needed to perform the garbage collection operation. The control circuit108uses the garbage collection control logic130to determine whether to abort the garbage collection operation. In a particular example, if the predicted power or the predicted time exceeds a corresponding threshold, the garbage collection operation can be aborted to conserve available resources for other operations. If the predicted power or the predicted time is less than the threshold, the control circuit108executes the garbage collection data identification logic128to identify a largest overwritten or stale data block for garbage collection. The control circuit108uses the garbage collection control logic130to copy the identified data block to a second location at the storage media110or to the write buffer121and to erase the freed block at the storage media110. When the identified data is written to the write buffer121, the write buffer121can be flushed at a next write operation.

In a particular embodiment, the firmware116can include one of the garbage collection power prediction logic122or the garbage collection time prediction logic124. In a particular example, execution of either the garbage collection power prediction logic122or the garbage collection time prediction logic124by the control circuit108causes the control circuit108to count a number of pages to be copied. The amount of time or power needed to copy the pages can be determined based on the page count. Accordingly, in a particular example, the firmware116may store only one of the garbage collection power prediction logic122or the garbage collection time prediction logic124, either of which can be used to determine processing cost of performing garbage collection.

In another particular embodiment, the device mode detection logic126may be omitted, and the power or time needed to perform a garbage collection operation may be predicted each time garbage collection is initiated. In another particular embodiment, the time and power needed may be predicted even if the device mode detection logic126determines that the storage device102is in an idle operating mode. In a particular example, when the storage device102is operating on battery power, it may be desirable to compare a predicted garbage collection power to available power to ensure that garbage collection is not initiated when there is insufficient power to complete the operation. In another particular example, it may be desirable to conserve power resources for core operations, rather than garbage collection, when available power is limited.

FIG. 2is a block diagram of a second particular illustrative embodiment of a system200including a hybrid storage device202with garbage collection logic. As used herein, the term “hybrid storage device” refers to a data storage device that includes both rotating storage media and solid-state storage media. The hybrid storage device202is adapted to communicate with a host system204. In a particular embodiment, the host system204can be a computer, a processor, a personal digital assistant (PDA), another electronic device, or any combination thereof. In a particular embodiment, the hybrid storage device202can be a stand-alone storage device that communicates with the host system204via a universal serial bus (USB) or other interface. In another particular embodiment, the stand-alone hybrid storage device202can communicate with the host system204via a network.

The hybrid storage device202includes recording subsystem circuitry206and a head-disc assembly208. The recording subsystem206includes storage device read/write control circuitry210and disc-head assembly control circuitry220. The recording subsystem circuitry206includes an interface circuit212, which includes a data buffer for temporarily buffering the data and a sequencer for directing the operation of the read/write channel216and the preamplifier250during data transfer operations. The interface circuit212is coupled to the host system204and to a control processor218, which is adapted to control operation of the hybrid storage device202. In a particular embodiment, the control processor218includes garbage collection logic238that is adapted to determine an operating mode of the storage device102and to initiate a garbage collection operation to remove redundant, stale, or overwritten data from a data NAND flash memory230or from one or more discs256when the storage device102is in an idle mode due to a period of inactivity. In a particular embodiment, the one or more discs256represent rotatable, non-volatile storage media adapted to store data, applications, metadata, or any combination thereof.

In a particular embodiment, the garbage collection logic238is adapted to predict a garbage collection power and/or a garbage collection time and to abort the garbage collection operation when the garbage collection power and/or garbage collection time exceeds corresponding threshold(s). Further, the garbage collection logic238is adapted to identify a block of data to be removed and to perform an erase (garbage collection process) on the identified block of data when the predicted garbage collection power and/or garbage collection time is less than the corresponding threshold(s). In a particular embodiment, the garbage collection logic238can include processor executable instructions that are stored at a code (NOR) flash234as garbage collection logic240. The garbage collection logic238can be loaded and executed by the control processor218.

The control processor218is coupled to a servo circuit222that is adapted to control the position of one or more read/write heads254relative to the one or more discs256as part of a servo loop established by the one or more read/write heads254. Generally, the one or more read/write heads254are mounted to a rotary actuator assembly to which a coil252of a voice coil motor (VCM) is attached. As is known in the art, a VCM includes a pair of magnetic flux paths between which the coil252is disposed so that the passage of current through the coil causes magnetic interaction between the coil252and the magnetic flux paths, resulting in the controlled rotation of the actuator assembly and the movement of the one or more heads254relative to the surfaces of the one or more discs256. The servo circuit222is used to control the application of current to the coil252, and hence the position of the heads254with respect to the tracks of the one or more discs256.

In general, the disc-head assembly control circuitry220includes the servo circuit222and includes a spindle circuit224that is coupled to a spindle motor258to control the rotation of the one or more discs256. The hybrid storage device202also includes an auxiliary power device228that is coupled to voltage regulator circuitry226of the disc-head assembly control circuitry220and that is adapted to operate as a power source when power to the hybrid storage device202is lost. In a particular embodiment, the auxiliary power device228can be a capacitor or a battery that is adapted to supply power to the hybrid storage device202under certain operating conditions. In a particular example, the auxiliary power device228can provide a power supply to the recording subsystem assembly206and to the disc-head assembly208to record data to the one or more discs256when power is turned off. Further, the auxiliary power device228may supply power to the recording subsystem assembly206to record data to the data (NAND) flash230or to the code (NOR) flash234when power is turned off.

Additionally, the hybrid storage device202includes the data (NAND) flash230, a dynamic random access memory (DRAM)232, the code (NOR) flash234, other memory236, or any combination thereof. In a particular embodiment, the code (NOR) flash234is accessible to the control processor218and is adapted to store the garbage collection logic instructions240. In a particular embodiment, the data (NAND) flash230may store a logical block address (LBA) lookup table231that represents a mapping of logical block addresses to physical memory locations within the one or more discs256.

In a particular embodiment, the control processor218is adapted to perform a garbage collection operation on redundant, stale, or overwritten data stored at the data (NAND) flash230, at the one or more discs256, or any combination thereof. In a particular example, the data collection operation can be initiated via an interrupt, based on a command received from the host system204, based on a self-initiated based on instructions stored at the code (NOR) flash234, based on another initiation signal, or any combination thereof.

In a particular illustrative embodiment, the control processor218is adapted to load the garbage collection logic240into a processor memory (not shown) from the code (NOR) flash234and to execute the garbage collection logic238. The garbage collection logic238is adapted to predict at least one of a garbage collection time and a garbage collection power needed to perform a garbage collection operation. The garbage collection logic238is adapted to compare the predicted time and/or power to corresponding thresholds and to abort the garbage collection operation if the predicted time and/or power exceeds the corresponding thresholds. In a particular example, by selectively aborting the garbage collection operation, access time to the one or more discs256and to the data (NAND) flash230can be enhanced, since processing power/cycles of the control processor218are not consumed if the time/power would interfere with other operations.

In a particular example, the garbage collection logic238includes an operating mode detection feature to determine an operating mode of the storage device202, such as an “idle” operating mode or a “full-power” operating mode. The garbage collection logic238may be adapted to skip the garbage collection operation when the storage device202is in a full-power operating mode and to perform garbage collection operations when the storage device202is in the idle mode, so that processing cycles of the control processor218are not consumed by garbage collection during normal operation. In an alternative embodiment, the garbage collection logic238is adapted to perform a first garbage collection operation when the storage device202is in an idle operating mode and to perform a second garbage collection operation when the storage device202is an operating mode other than the idle operating mode. For example, the first garbage collection operation may be a garbage collection operation without predicting a garbage collection parameter. The second garbage collection operation may include predicting a garbage collection parameter (such as time or power consumption) prior to performing garbage collection and aborting the garbage collection operation when the garbage collection parameter exceeds a threshold.

In a particular embodiment, when the power or time thresholds of the storage device202are not exceeded and/or the storage device202is in an idle mode of operation (i.e., a reduced power mode), the control processor218is adapted to locate a largest data block for garbage collection by searching a longest sequential data block in the data (NAND) flash230or the one or more discs256. The garbage collection process (including copying the identified block to a new memory location and erasure of the freed data block) can proceed according to a desired process.

In another particular embodiment, rather than copying data from one location to another within the data (NAND) flash230or the one or more discs256, the garbage collection logic238causes the control processor218to copy the overwritten data to a write buffer associated with the control processor218, with the interface212, or with the read/write channel216. During a next write operation, the write buffer can be flushed to erase the data. In a particular example, if garbage collection is to be performed at the one or more discs256, the predicted power or time may be determined as an average spindle power associated with the spindle motor258and the spindle circuit224or an average erase time associated with the one or more discs256.

In general, the storage devices102and202illustrated inFIGS. 1 and 2are adapted to predict garbage collection time and/or power before performing garbage collection operations. Further, instead of a need-based garbage collection process that is initiated only when the storage media110or the data (NAND) flash230, illustrated inFIGS. 1 and 2respectively, are full, the garbage collection logic118and238illustrated inFIGS. 1 and 2can be executed to perform a garbage collection operation when the storage device102or202are in an idle mode of operation. Further, in a particular embodiment, a write buffer, such as the write buffer121illustrated inFIG. 1, can be used to store the overwritten data until a next write operation, at which time the write buffer121can be flushed.

In a particular embodiment, the storage devices102and202illustrated inFIGS. 1 and 2can include two or more solid-state memory chips with single or multiple data paths. Further, the storage devices102and202illustrated inFIGS. 1 and 2can be hybrid hard disc storage devices, solid-state storage devices, universal serial bus (USB) flash storage devices, other data storage systems, or any combination thereof. In a particular example, the particular garbage collection logic118and238illustrated inFIGS. 1 and 2may also be applied to data synchronization when there is more than one level of cache included in the storage devices102and202. In a particular example, the more than one level of cache can include a second dynamic random access memory (DRAM) cache, a media cache, other levels of cache memory, or any combination thereof.

FIG. 3is a flow diagram of a particular illustrative embodiment of a method of performing a garbage collection operation. At302, a signal is received to initiate a garbage collection operation. In a particular example, the garbage collection operation includes one or more steps to identify and erase overwritten or stale data that is stored at a storage media. In a particular embodiment, the garbage collection operation can be initiated based on a received interrupt signal, based on a command received from a host system (such as the host systems104and204illustrated inFIGS. 1 and 2, respectively), based on a self-initiated instruction stored at a firmware of the storage device, based on another signal, or any combination thereof. Moving to304, a garbage collection time is predicted by counting a number of pages to be copied at a storage media. In a particular example, the garbage collection operation includes identifying data to be erased and predicting the time based on the identified data. In another particular example, the garbage collection operation includes predicting the time based on a total garbage collection process for the storage media.

Continuing to306, if the predicted garbage collection time exceeds a threshold time, the method advances to308and the garbage collection operation is aborted. In a particular example, the garbage collection operation may be performed at a later time, when more system resources are available. The method is terminated at310.

Returning to306, if the predicted garbage collection time does not exceed the threshold time, the method advances to312and a largest redundant (stale or overwritten) data block to be removed is identified from a first location of the storage media. Proceeding to314, valid data associated with the identified largest redundant data block is copied to a second location of the storage media. In an alternative embodiment, the valid data may be copied to a write buffer that is flushed at a next write operation. Advancing to316, the identified largest redundant data block is erased from the first location of the storage media. The method terminates at310.

FIG. 4is a flow diagram of a second particular illustrative embodiment of a method of performing a garbage collection operation. At402, a signal is received to initiate a garbage collection operation. In a particular example, the garbage collection operation includes one or more steps to identify and erase overwritten or stale data that is stored at a storage media. In a particular embodiment, the garbage collection operation can be initiated based on a received interrupt signal, based on a command received from a host system (such as the host system104illustrated inFIG. 1), based on an interrupt associated with a peripheral device, based on a self-initiated instruction stored at firmware of the storage device, based on another signal, or any combination thereof. Moving to404, a garbage collection power is predicted by counting a number of pages to be copied at a storage media. In a particular example, the garbage collection operation includes identifying data to be erased and predicting the power needed to perform the garbage collection operation based on the identified data. In another particular example, the garbage collection operation includes predicting the power based on a total garbage collection process for the storage media.

Continuing to406, if the predicted garbage collection power exceeds a threshold power, the method advances to408and the garbage collection operation is aborted. The method is terminated at410.

Returning to406, if the predicted garbage collection power does not exceed the threshold power, the method advances to412and a largest redundant (stale or overwritten) data block to be removed is identified from a first location of the storage media. Proceeding to414, valid data associated with the identified largest redundant data block is copied to a second location of the storage media. In an alternative embodiment, the valid data may be copied to a write buffer that is flushed at a next write operation. Advancing to416, the identified largest redundant data block is erased from the first location of the storage media. The method terminates at410.

FIG. 5is a flow diagram of a third particular illustrative embodiment of a method of performing a garbage collection operation. At502, a signal is received to initiate a garbage collection operation. In a particular example, the garbage collection operation includes one or more steps to identify and erase overwritten or stale data that is stored at a storage media. In a particular embodiment, the garbage collection operation can be initiated based on a received interrupt signal, based on a command received from a host system (such as the host system104illustrated inFIG. 1), based on an interrupt associated with a peripheral device, based on a self-initiated instruction stored at firmware of the storage device, based on another signal, or any combination thereof. Moving to504, an operating mode of the storage device is determined. The operating mode of the storage device can include an idle mode for reduced power consumption during periods of inactivity and a full-power mode for normal operation.

Continuing to506, if the operating mode is the idle mode of operation, the method advances to508and garbage collection is initiated at a smallest free unit of the control processor. Advancing to510, valid data associated with the largest redundant data block is copied to a second location of the storage media. In an alternative embodiment, the valid data may be copied to a write buffer that is flushed at a next write operation. Advancing to512, the identified largest redundant data block is erased from the first location of the storage media. The method terminates at514.

Returning to506, if the operating mode is not an idle mode of operation, the method proceeds to516and a number of pages to be copied is counted to determine a garbage collection parameter. In a particular embodiment, the garbage collection parameter can be a garbage collection power or a garbage collection time needed to complete the garbage collection operation. Continuing to518, if the garbage collection parameter exceeds a threshold, the method advances to520and the garbage collection operation is aborted. The method terminates at514.

FIG. 6is a flow diagram of a fourth particular illustrative embodiment of a method of performing a garbage collection operation. At602, a garbage collection operation is initiated to remove redundant data from a storage media of a storage device. In a particular embodiment, the garbage collection operation can be initiated based on a received interrupt signal, based on a command received from a host system (such as the host system104illustrated inFIG. 1), based on an interrupt associated with a peripheral device, based on a self-initiated instruction stored at firmware of the storage device, based on another signal, or any combination thereof.

Advancing to604, a performance parameter associated with execution of the garbage collection operation is predicted. In a particular example, the performance parameter is predicted by predicting a garbage collection time needed to perform the garbage collection operation, which includes counting a number of pages to be copied to a memory location, where a copy operation includes an associated average time for each page. In another particular example, the performance parameter is predicted by predicting a garbage collection power needed to perform the garbage collection operation, which includes counting a number of pages to be copied to a memory location, where a copy operation includes an associated average power required to copy each page. Continuing to606, the garbage collection operation is aborted prior to execution when the performance parameter exceeds a performance threshold. In a particular example, when the performance parameter does not exceed the performance threshold, the garbage collection operation is allowed to proceed. The method terminates at608.

In a particular embodiment, the method also includes determining an operating mode of the storage device, where the operating mode includes at least one of an active mode and an idle mode of operation. The method also includes executing the garbage collection operation without predicting the performance parameter when the storage device is in the idle mode.

In another particular embodiment, the garbage collection operation is performed by determining a redundant data block to remove from the storage media, copying valid data of the determined redundant data block to a free location, and removing the redundant data block from the storage media. In a particular example, the free location is a write buffer.

FIG. 7is a flow diagram of a fifth particular illustrative embodiment of a method of performing a garbage collection operation. At702, a signal is received to initiate a garbage collection operation. In a particular example, the garbage collection operation includes one or more steps to identify and erase overwritten or stale data that is stored at a storage media. In a particular embodiment, the garbage collection operation can be initiated based on a received interrupt signal, based on a command received from a host system, such as the host system104illustrated inFIG. 1, based on a self-initiated instruction stored at firmware of the storage device, or any combination thereof. Moving to704, a garbage collection power is predicted by counting a number of pages to be copied at a storage media. In a particular example, the garbage collection operation includes identifying data to be erased and predicting the power needed to perform the garbage collection operation based on the identified data. In another particular example, the garbage collection operation includes predicting the power based on a total garbage collection process for the storage media.

Continuing to706, if the predicted garbage collection power exceeds a threshold power, the method advances to708and the garbage collection operation is aborted. The method is terminated at710.

Returning to706, if the predicted garbage collection power does not exceed the threshold power, the method advances to712and a largest redundant (stale or overwritten) data block to be removed is identified from a first location of the storage media. Proceeding to714, valid data associated with the identified largest redundant data block is copied to a write buffer associated with a controller of the storage media. In a particular example, the write buffer may be a data buffer within a control processor, a data buffer within a read/write channel, a write buffer within an interface of the storage device, another temporary storage, or any combination thereof. Continuing to716, the write buffer is flushed during a next write operation. The method terminates at710.

In conjunction with the systems and methods illustrated inFIGS. 1-7and described above, a system is provided with garbage collection logic that selectively performs a garbage collection operation based on at least one of an operating mode of the storage device, a predicted garbage collection time, a predicted garbage collection power, or any combination thereof. In a particular example, the system is adapted to enhance performance of a storage device by selectively aborting a garbage collection operation when a garbage collection parameter (such as time or power) exceeds a performance threshold that would adversely impact performance of the storage device. For example, during operation, power consumption or time associated with garbage collection may usurp processes that might otherwise be needed by other processes, thereby impacting performance. Further, in a particular example, the storage device includes garbage collection logic that is adapted to utilize an available write buffer as a temporary storage for the data to be removed, so that the data can be flushed in a next write operation.