EP4492246B1

Memory management method based on compressed memory and apparatus using the same

Abstract

This record has no abstract on file.

EP4492246B1, drawing sheet 1
Sheet 1 of 16

Term

17.8 yearsleft in the term

Expires 8 July 2044.

  1. Priority and filed
  2. Granted
  3. Today
  4. Expires

15 claims: 6 independent, 9 dependent

  1. 1
    A memory device (120) comprising:(122, 372) a memory comprising a normal memory area for storing uncompressed data and a compressed memory area for storing compressed data;and a near memory processing unit (121) configured to: receive (1510) a first command to frontswap-store a huge page, which is stored in the normal memory area, in the compressed memory area, wherein a size of the huge page is larger than a regular page, identify (1520) addresses of sub-pages of the huge page based on an address of the huge page, compress (1530) the sub-pages using the addresses of the sub-pages to generate compressed sub-pages, and store (1540) the compressed sub-pages in the compressed memory area.
  2. 4
    The memory device of one of claims 1 to 3, wherein the near memory processing unit is configured to:when the sub-pages are stored in a non-consecutive address space, obtain a page frame number of a following sub-page of the sub-pages by performing a page table walk, and determine an address of the following sub-page by adding a page offset of the following sub-page to the page frame number of the following sub-page.
  3. 5
    The memory device of one of claims 1 to 4, wherein the near memory processing unit is configured to:receive a second command to request a target sub-page of the huge page after the huge page is frontswap-stored in the compressed memory area, determine a target frame number based on a difference between the address of the huge page and an address of the target sub-page, determine an address of a compressed target sub-page in the compressed memory area based on the target frame number, decompress the compressed target sub-page using the address of the compressed target sub-page to generate a decompressed target sub-page, and store the decompressed target sub-page in the normal memory area.
  4. 7
    The memory device of one of claims 1 to 6, wherein the memory comprises a first memory channel and a second memory channel.
  5. 12
    A memory management method of a memory device, the memory management method comprising:receiving (1510) a first command to frontswap-store a huge page, which is stored in a normal memory area of a memory, in a compressed memory area of the memory, wherein a size of the huge page is larger than a regular page;identifying (1520) addresses of sub-pages of the huge page based on an address of the huge page;compressing (1530) the sub-pages using the addresses of the sub-pages to generate compressed sub-pages;and storing (1540) the compressed sub-pages in the compressed memory area.
  6. 15
    The memory management method of one of claims 12 to 14, further comprising:receiving a second command to request a target sub-page of the huge page after the huge page is frontswap-stored in the compressed memory area;determining a target frame number based on a difference between the address of the huge page and an address of the target sub-page;determining an address of a compressed target sub-page in the compressed memory area based on the target frame number;decompressing the compressed target sub-page using the address of the compressed target sub-page to generate a decompressed target sub-page;and storing the decompressed target sub-page in the normal memory area.