US 12,229,413 B2
Method and apparatus for performing data fragmentation reduction control of memory device in predetermined communications architecture with aid of fragmentation information detection, and associated computer-readable medium
Po-Yi Shih, Hsinchu County (TW)
Assigned to Silicon Motion, Inc., Hsinchu County (TW)
Filed by Silicon Motion, Inc., Hsinchu County (TW)
Filed on Oct. 27, 2022, as Appl. No. 17/974,546.
Claims priority of provisional application 63/392,463, filed on Jul. 26, 2022.
Prior Publication US 2024/0036739 A1, Feb. 1, 2024
Int. Cl. G06F 3/06 (2006.01)
CPC G06F 3/0619 (2013.01) [G06F 3/0659 (2013.01); G06F 3/0679 (2013.01)] 18 Claims
OG exemplary drawing
 
1. A method for performing data fragmentation reduction control of a memory device in a predetermined communications architecture with aid of fragmentation information detection, the method being applied to a memory controller of the memory device, the memory device comprising the memory controller and a non-volatile (NV) memory, the NV memory comprising at least one NV memory element, the method comprising:
utilizing the memory controller to receive a first command from a host device through a transmission interface circuit of the memory controller, wherein the first command carries at least one first logical address for indicating at least one first logical address region, and further carries a first indication for indicating that generating a data fragmentation degree of the at least one first logical address region is requested;
in response to the first command from the host device, utilizing the memory controller to perform discontinuity-related calculation according to a plurality of first physical addresses of at least one first physical address region to generate a discontinuity-related calculation result of the plurality of first physical addresses, and generate the data fragmentation degree according to the discontinuity-related calculation result, wherein the at least one first physical address region is associated with the at least one first logical address region, and the discontinuity-related calculation result indicates a degree of discontinuity of the plurality of first physical addresses;
after generating the data fragmentation degree is completed, utilizing the memory controller to send a first response to the host device through the transmission interface circuit, wherein the first response is sent to the host device in response to the first command;
utilizing the memory controller to receive a second command from the host device through the transmission interface circuit, wherein the second command is arranged to indicate that returning the data fragmentation degree to the host device is requested; and
in response to the second command from the host device, utilizing the memory controller to send a second response to the host device through the transmission interface circuit to return the data fragmentation degree to the host device, for selectively performing data fragmentation reduction according to a determination result of the host device, wherein the second response carries the data fragmentation degree, and the determination result is generated according to the data fragmentation degree returned to the host device.