JP2021144694A - Information processing device, memory control program, information processing program and information processing method - Google Patents

Information processing device, memory control program, information processing program and information processing method Download PDF

Info

Publication number
JP2021144694A
JP2021144694A JP2020206427A JP2020206427A JP2021144694A JP 2021144694 A JP2021144694 A JP 2021144694A JP 2020206427 A JP2020206427 A JP 2020206427A JP 2020206427 A JP2020206427 A JP 2020206427A JP 2021144694 A JP2021144694 A JP 2021144694A
Authority
JP
Japan
Prior art keywords
page
cpu core
cache
movement
thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2020206427A
Other languages
Japanese (ja)
Inventor
哲 風間
Satoru Kazama
哲 風間
慎哉 桑村
Shinya Kuwamura
慎哉 桑村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to US17/189,436 priority Critical patent/US11580023B2/en
Publication of JP2021144694A publication Critical patent/JP2021144694A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

To provide a technique for reducing a load of a processor by reducing the occurrence of a spinlock.SOLUTION: A computer system 1a includes: a primary memory 30 for storing data of a page unit; a secondary memory 20 for storing data of a page being a moving object from the primary memory; and a movement processing part for moving a first management information storage area 31 provided in each of a plurality of arithmetic cores 11 to store a plurality of first links 33 showing a movement order of each page in a page group allocated to each of the plurality of arithmetic cores 11 in a plurality of pages, a second management information storage area 31 provided for an operating system to store a second link 32 for managing a plurality of pages selected according to a movement order from the page group in the plurality of first links as a candidate page group to be moved to the secondary memory from the primary memory to the secondary memory.SELECTED DRAWING: Figure 1

Description

本発明は、情報処理装置,メモリ制御プログラム,情報処理プログラムおよび情報処理方法に関する。 The present invention relates to an information processing device, a memory control program, an information processing program, and an information processing method.

アプリケーションから見えるメモリ空間を高速なメモリと低速なメモリとに分けて階層化する階層メモリ制御が用いられることがある。階層メモリ制御においては、低速のメモリとしてSSD(Solid State Drive)等のストレージを用いることでDRAM(Dynamic Random Access Memory)の容量以上のメモリを利用可能にするメモリ拡張技術が知られている。
このようなメモリ拡張技術においては、DRAMの一部を低速メモリのキャッシュメモリとして利用することが一般に行なわれる。
Hierarchical memory control is sometimes used in which the memory space visible to the application is divided into high-speed memory and low-speed memory and layered. In tiered memory control, there is known a memory expansion technique that makes it possible to use a memory larger than the capacity of a DRAM (Dynamic Random Access Memory) by using a storage such as an SSD (Solid State Drive) as a low-speed memory.
In such a memory expansion technique, it is generally practiced to use a part of the DRAM as a cache memory of a low-speed memory.

キャッシュメモリはページ単位で管理される。ページのデータサイズは例えば4KBである。ページをキャッシュメモリからストレージに移動させる処理は、バックグラウンドスレッドにより実行される。
キャッシュメモリからストレージに移動させるデータ(ページ)はLRU(Least Recently Used)アルゴリズムによって選択される。
The cache memory is managed on a page-by-page basis. The data size of the page is, for example, 4KB. The process of moving a page from cache memory to storage is performed by a background thread.
The data (page) to be moved from the cache memory to the storage is selected by the LRU (Least Recently Used) algorithm.

ストレージに移動させるページの優先度を管理するためにLRUリストが用いられる。LRUリストには、ページの情報(アドレスなど)が格納されているページ構造体へのポインタと、ページにアクセスがあったことを示すアクセスフラグと、リストのリンク情報とが格納されている。 The LRU list is used to manage the priority of pages moved to storage. The LRU list stores a pointer to a page structure in which page information (address, etc.) is stored, an access flag indicating that the page has been accessed, and list link information.

そして、このように構成されたLRUリストを参照して、アクセスされていない時間が最も長いページをストレージに移動(キャッシュアウト)させるページとして決定する。 Then, referring to the LRU list configured in this way, the page that has not been accessed for the longest time is determined as the page to be moved (cached out) to the storage.

特開2008−27444号公報Japanese Unexamined Patent Publication No. 2008-27444 特開2019−95881号公報Japanese Unexamined Patent Publication No. 2019-95881

複数のCPU(Central Processing Unit)コアを備えるマルチコアCPUにおいては、複数のCPUコアによって実行される複数のスレッド(マルチスレッド)がLRUリストにアクセスする。また、キャッシュメモリからストレージに移動させるページを特定するスレッドもLRUリストを参照するためにアクセスする。 In a multi-core CPU including a plurality of CPU (Central Processing Unit) cores, a plurality of threads (multi-threads) executed by the plurality of CPU cores access the LRU list. In addition, the thread that identifies the page to be moved from the cache memory to the storage also accesses to refer to the LRU list.

そのため、あるスレッドがLRUリストにアクセスする時に、他のスレッドによりLRUリストが変更されないようにするために、LRUリストをロックする排他制御が必要となる。スレッドがLRUリストを参照しようとする際に、当該LRUリストがロック中の場合は、当該スレッドはLRUリストのロックが解放されるまでスピンロックを行ない待機する。 Therefore, when one thread accesses the LRU list, exclusive control that locks the LRU list is required to prevent the LRU list from being modified by another thread. When a thread tries to refer to the LRU list, if the LRU list is locked, the thread performs a spinlock and waits until the lock of the LRU list is released.

このような従来の階層メモリ制御手法においては、LRUリストのロックによる排他処理のためスピンロックによるCPU負荷が増大し、性能低下が起こるという課題がある。
1つの側面では、本発明は、スピンロックの発生を軽減することによりプロセッサの負荷を軽減する。
In such a conventional hierarchical memory control method, there is a problem that the CPU load due to the spinlock increases due to the exclusive processing by locking the LRU list, and the performance deteriorates.
In one aspect, the invention reduces the load on the processor by reducing the occurrence of spinlocks.

このため、この情報処理装置は、ページ単位のデータが格納される1次メモリと、前記1次メモリから移動対象となったページのデータを格納する2次メモリと、複数の演算コアを備えるプロセッサと、前記複数の演算コアそれぞれに対して設けられ、前記複数のページのうちの前記複数の演算コア毎に割当られたページ群における各ページの移動の順位を示す複数の第1リンクを格納する第1管理情報記憶領域と、オペレーティングシステムに対して設けられ、前記複数の第1リンクにおけるページ群の中から前記移動の順位に応じて選択された複数のページを、前記2次メモリへ移動される候補のページ群として管理する第2リンクを格納する第2管理情報記憶領域と、前記第2リンクのページ群の中から選択したページのデータを前記1次メモリから前記2次メモリに移動させる移動処理部とを備える。 Therefore, this information processing device is a processor having a plurality of arithmetic cores, a primary memory for storing page-based data, a secondary memory for storing data of a page to be moved from the primary memory, and a plurality of arithmetic cores. And, a plurality of first links provided for each of the plurality of arithmetic cores and indicating the order of movement of each page in the page group assigned to each of the plurality of arithmetic cores among the plurality of pages are stored. A plurality of pages provided for the first management information storage area and the operating system and selected according to the order of movement from the page group in the plurality of first links are moved to the secondary memory. The second management information storage area for storing the second link managed as the candidate page group and the data of the page selected from the page group of the second link are moved from the primary memory to the secondary memory. It is equipped with a movement processing unit.

一実施形態によれば、スピンロックの発生を軽減することによりプロセッサの負荷を軽減することができる。 According to one embodiment, the load on the processor can be reduced by reducing the occurrence of spinlock.

第1実施形態の一例としてのコンピュータシステムの構成を模式的に示す図である。It is a figure which shows typically the structure of the computer system as an example of 1st Embodiment. 第1実施形態の一例としてのコンピュータシステムにおける階層メモリ制御を説明するための図である。It is a figure for demonstrating the hierarchical memory control in the computer system as an example of 1st Embodiment. 第1実施形態の一例としてのコンピュータシステムにおけるCPUコア毎LRUリストとOS用LRUリストとの動作関係を説明するための図である。It is a figure for demonstrating the operation relation between the LRU list for every CPU core and the LRU list for OS in the computer system as an example of 1st Embodiment. 第1実施形態の一例としてのコンピュータシステムにおけるCPUコア毎LRUリストおよびOS用LRUリストがそれぞれ対象とするDRAM領域を説明するための図である。It is a figure for demonstrating the DRAM area which the LRU list for every CPU core and the LRU list for an OS respectively target in the computer system as an example of 1st Embodiment. 第1実施形態の一例としてのコンピュータシステムにおける移動情報テーブルを例示する図である。It is a figure which illustrates the movement information table in the computer system as an example of 1st Embodiment. 第1実施形態の一例としてのコンピュータシステムにおけるページ管理方法を説明するための図である。It is a figure for demonstrating the page management method in the computer system as an example of 1st Embodiment. 第1実施形態の一例としてのコンピュータシステムにおけるスレッドによるCPUコア毎LRUリストの更新処理を説明するためのフローチャートである。It is a flowchart for demonstrating the update process of the LRU list for every CPU core by a thread in the computer system as an example of 1st Embodiment. 第1実施形態の一例としてのコンピュータシステムにおけるページ移動スレッドによる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process by the page movement thread in the computer system as an example of 1st Embodiment. 第1実施形態の一例としてのコンピュータシステムにおけるOS付属ページ移動スレッドによる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process by the page movement thread attached to the OS in the computer system as an example of 1st Embodiment. 第1実施形態の一例としてのコンピュータシステムにおけるリスト削除スレッドによる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process by the list deletion thread in the computer system as an example of 1st Embodiment. 第2実施形態の一例としてのコンピュータシステムの構成を模式的に示す図である。It is a figure which shows typically the structure of the computer system as an example of 2nd Embodiment. 第2実施形態の一例としてのコンピュータシステムにおけるページ対応テーブルを例示する図である。It is a figure which illustrates the page correspondence table in the computer system as an example of 2nd Embodiment. 第2実施形態の一例としてのコンピュータシステムにおけるページ管理方法を説明するための図である。It is a figure for demonstrating the page management method in the computer system as an example of 2nd Embodiment. 第2実施形態の一例としてのコンピュータシステムにおけるスレッドによるCPUコア毎LRUリストの更新処理を説明するためのフローチャートである。It is a flowchart for demonstrating the update process of the LRU list for every CPU core by a thread in the computer system as an example of 2nd Embodiment. 第2実施形態の一例としてのコンピュータシステムにおけるページ移動スレッドによる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process by the page movement thread in the computer system as an example of 2nd Embodiment. 第2実施形態の一例としてのコンピュータシステムにおけるOS付属ページ移動スレッドによる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process by the page movement thread attached to OS in the computer system as an example of 2nd Embodiment. 第3実施形態の一例としてのコンピュータシステムの構成を模式的に示す図である。It is a figure which shows typically the structure of the computer system as an example of 3rd Embodiment. 第3実施形態の一例としてのコンピュータシステムにおけるページ管理方法を説明するための図である。It is a figure for demonstrating the page management method in the computer system as an example of 3rd Embodiment. 第3実施形態の一例としてのコンピュータシステムにおけるスレッドによるCPUコア毎LRUリストの更新処理を説明するためのフローチャートである。It is a flowchart for demonstrating the update process of the LRU list for every CPU core by a thread in the computer system as an example of 3rd Embodiment. 第3実施形態の一例としてのコンピュータシステムにおけるページ移動スレッドによる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process by the page movement thread in the computer system as an example of 3rd Embodiment. 第3実施形態の一例としてのコンピュータシステムにおけるOS付属ページ移動スレッドによる処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process by the page movement thread attached to the OS in the computer system as an example of 3rd Embodiment. 第4実施形態の一例としてのコンピュータシステムの機能構成を例示する図である。It is a figure which illustrates the functional structure of the computer system as an example of 4th Embodiment. 第4実施形態の一例としてのコンピュータシステムのキャッシュ再分配判定部の処理を説明するための図である。It is a figure for demonstrating the process of the cache redistribution determination part of the computer system as an example of 4th Embodiment. 第4実施形態の一例としてのコンピュータシステムにおけるページ移動処理を説明するためのフローチャートである。It is a flowchart for demonstrating the page movement process in the computer system as an example of 4th Embodiment.

以下、図面を参照して本情報処理装置,メモリ制御プログラム,情報処理プログラムおよび情報処理方法にかかる実施の形態を説明する。ただし、以下に示す実施形態はあくまでも例示に過ぎず、実施形態で明示しない種々の変形例や技術の適用を排除する意図はない。すなわち、本実施形態を、その趣旨を逸脱しない範囲で種々変形(実施形態および各変形例を組み合わせる等)して実施することができる。また、各図は、図中に示す構成要素のみを備えるという趣旨ではなく、他の機能等を含むことができる。 Hereinafter, embodiments relating to the information processing apparatus, the memory control program, the information processing program, and the information processing method will be described with reference to the drawings. However, the embodiments shown below are merely examples, and there is no intention of excluding the application of various modifications and techniques not specified in the embodiments. That is, the present embodiment can be implemented by various modifications (combining the embodiments and each modification) within a range that does not deviate from the purpose. Further, each figure does not mean that it includes only the components shown in the figure, but may include other functions and the like.

[1.第1実施形態の説明]
(A)構成
図1は第1実施形態の一例としてのコンピュータシステム1aの構成を模式的に示す図である。
図1に例示するコンピュータシステム1aは、プロセッサ10,SSD20およびDRAM30を備える。
[1. Description of the first embodiment]
(A) Configuration FIG. 1 is a diagram schematically showing a configuration of a computer system 1a as an example of the first embodiment.
The computer system 1a illustrated in FIG. 1 includes a processor 10, an SSD 20, and a DRAM 30.

プロセッサ10は、複数のCPUコア11−0,11−1,11−2・・・を備えるマルチコアプロセッサである。以下、CPUコア11−0,11−1,11−2・・・を特に区別しない場合には、CPUコア11と表記する。また、CPUコア11−0をCPUコア#0という場合がある。同様にCPUコア11−1をCPUコア#1と、CPUコア11−2をCPUコア#2と、それぞれいう場合がある。
各CPUコア11は、それぞれスレッドを実行する演算コアである。
The processor 10 is a multi-core processor including a plurality of CPU cores 11-0, 11-1, 11-2 .... Hereinafter, when the CPU cores 11-0, 11-1, 11-2, ... Are not particularly distinguished, they are referred to as CPU cores 11. Further, the CPU core 11-0 may be referred to as the CPU core # 0. Similarly, the CPU core 11-1 may be referred to as a CPU core # 1, and the CPU core 11-2 may be referred to as a CPU core # 2.
Each CPU core 11 is an arithmetic core that executes a thread.

また、プロセッサ10はPCIeルート(Peripheral Component Interconnect Express Root)ポート12とメモリコントローラ13とを備える。 Further, the processor 10 includes a PCIe root (Peripheral Component Interconnect Express Root) port 12 and a memory controller 13.

PCIeルートポート12にはSSD20が接続され、メモリコントローラ13にはDRAM30が接続される。なお、SSD20はNVMe(Non-Volatile Memory Express)の規格に従って接続されてもよく、種々変形して実施することができる。
本コンピュータシステム1aは階層メモリ制御を実現する。
図2は第1実施形態の一例としてのコンピュータシステム1aにおける階層メモリ制御を説明するための図である。
The SSD 20 is connected to the PCIe root port 12, and the DRAM 30 is connected to the memory controller 13. The SSD 20 may be connected according to the NVMe (Non-Volatile Memory Express) standard, and can be modified in various ways.
The computer system 1a realizes hierarchical memory control.
FIG. 2 is a diagram for explaining hierarchical memory control in the computer system 1a as an example of the first embodiment.

階層メモリ制御においては、DRAM30が高速メモリとして使用されるとともに、SSD20が低速メモリとして使用される。また、DRAM30の記憶領域の一部がキャッシュメモリ(以下、単にキャッシュという場合がある)30aとして使用される。 In the hierarchical memory control, the DRAM 30 is used as the high-speed memory and the SSD 20 is used as the low-speed memory. Further, a part of the storage area of the DRAM 30 is used as a cache memory (hereinafter, may be simply referred to as a cache) 30a.

キャッシュ30aはページ単位で管理される。ページのデータサイズは例えば4KBである。ページをキャッシュ30aからストレージに移動させる処理は、後述するページ移動スレッドにより実行される。キャッシュ30aは、ページ単位のデータが格納される1次メモリに相当する。 The cache 30a is managed on a page-by-page basis. The data size of the page is, for example, 4KB. The process of moving the page from the cache 30a to the storage is executed by the page movement thread described later. The cache 30a corresponds to a primary memory in which data for each page is stored.

本コンピュータシステム1aにおいては、キャッシュ30aからSSD20に移動させるデータ(ページ)は、LRUアルゴリズムによって選択され、この選択されたページがキャッシュ30aからSSD20へ移動される。 In the computer system 1a, the data (page) to be moved from the cache 30a to the SSD 20 is selected by the LRU algorithm, and the selected page is moved from the cache 30a to the SSD 20.

SSD20は、半導体素子メモリを使った記憶装置であり、上述の如く、その記憶領域の一部がメモリ(低速メモリ)として使用される。 The SSD 20 is a storage device using a semiconductor element memory, and as described above, a part of the storage area is used as a memory (low-speed memory).

また、SSD20の記憶領域における、低速メモリとして使用される領域以外の領域には、後述するキャッシュ30aから移動されたページが格納される。キャッシュ30a上のページをSSD20に移動させる処理をキャッシュアウトといってもよく、また、追い出し処理もしくは回収処理といってもよい。SSD20は、キャッシュ30aから移動対象となったページのデータを格納する2次メモリに相当する。 Further, in the storage area of the SSD 20, pages moved from the cache 30a, which will be described later, are stored in an area other than the area used as the low-speed memory. The process of moving the page on the cache 30a to the SSD 20 may be referred to as cache-out, or may be referred to as eviction process or collection process. The SSD 20 corresponds to a secondary memory for storing the data of the page to be moved from the cache 30a.

SSD20には、キャッシュ30aから追い出されたページが格納される。キャッシュ30aから追い出され、SSD20に移動されたページを移動データといってもよい。図1に示す例においては、キャッシュ30aから追い出された各CPUコア11のページが移動データ21として格納されている。
DRAM30は、半導体記憶メモリであり、SSD20よりも高速なデータアクセスが可能なメモリである。
The page ejected from the cache 30a is stored in the SSD 20. The page that has been expelled from the cache 30a and moved to the SSD 20 may be referred to as movement data. In the example shown in FIG. 1, the page of each CPU core 11 expelled from the cache 30a is stored as movement data 21.
The DRAM 30 is a semiconductor storage memory, which is a memory capable of faster data access than the SSD 20.

DRAM30の記憶領域の一部は、CPUコア11が実行するアプリケーションにより高速メモリとして使用され、その記憶領域の他の一部は、当該アプリケーションによりキャッシュメモリ(キャッシュ)30aとして使用される。
図1に示す例においては、DRAM30の記憶領域は、カーネル領域31とユーザ領域36とを備える。
A part of the storage area of the DRAM 30 is used as a high-speed memory by an application executed by the CPU core 11, and the other part of the storage area is used as a cache memory (cache) 30a by the application.
In the example shown in FIG. 1, the storage area of the DRAM 30 includes a kernel area 31 and a user area 36.

ユーザ領域36は、例えば、各CPUコア11によって実行されるアプリケーションが使用する記憶領域であり、各CPUコア11が使用するデータ37が格納される。 The user area 36 is, for example, a storage area used by an application executed by each CPU core 11, and data 37 used by each CPU core 11 is stored.

カーネル領域31は、CPUコア11が実行するOS(Operating System)のカーネルによって使用される記憶領域である。本実施形態においては、OSがLinux(登録商標)である例について示す。 The kernel area 31 is a storage area used by the kernel of the OS (Operating System) executed by the CPU core 11. In this embodiment, an example in which the OS is Linux (registered trademark) is shown.

図1に示す例においては、カーネル領域31には、OS用LRUリスト32,移動情報テーブル34およびCPUコア毎LRUリスト33−0,33−1,・・・が格納される。 In the example shown in FIG. 1, the LRU list 32 for the OS, the movement information table 34, and the LRU list 33-0, 33-1 for each CPU core are stored in the kernel area 31.

――CPUコア毎LRUリスト33――
CPUコア毎LRUリスト33−0,33−1,・・・は、CPUコア11毎に備えられたLRUリストである。
--LRU list 33 for each CPU core--
The LRU list 33-0, 33-1, ... For each CPU core is an LRU list provided for each CPU core 11.

CPUコア毎LRUリスト33は、例えば、構造体と呼ばれるリンク要素がポインタによって順番に連結されたデータ構造(リスト構造)をもつ。CPUコア毎LRUリスト33は、CPUコア11毎に備えられ、複数のページのうちの複数のCPUコア11毎に割当られたページ群における各ページの移動の順位を示す複数の第1リンクに相当する。また、CPUコア毎LRUリスト33を格納するDRAM30のカーネル領域31は、第1リンクを格納する第1管理情報記憶領域に相当する。 The LRU list 33 for each CPU core has, for example, a data structure (list structure) in which link elements called structures are sequentially concatenated by pointers. The LRU list 33 for each CPU core is provided for each CPU core 11 and corresponds to a plurality of first links indicating the order of movement of each page in the page group assigned to each of the plurality of CPU cores 11 among the plurality of pages. do. Further, the kernel area 31 of the DRAM 30 that stores the LRU list 33 for each CPU core corresponds to the first management information storage area that stores the first link.

図1に示す例においては、CPUコア毎LRUリスト33−0はCPUコア11−0用に備えられたものであり、CPUコア毎LRUリスト33−1はCPUコア11−1用に備えられたものである。CPUコア毎LRUリスト33はプロセッサ10に備えられたCPUコア11と同数備えられる。 In the example shown in FIG. 1, the LRU list 33-0 for each CPU core is provided for the CPU core 11-0, and the LRU list 33-1 for each CPU core is provided for the CPU core 11-1. It is a thing. The number of LRU lists 33 for each CPU core is the same as that of the CPU cores 11 provided in the processor 10.

以下、CPUコア毎LRUリスト33−0をCPUコア#0用LRUリスト33−0と表す場合がある。同様に、CPUコア毎LRUリスト33−1をCPUコア#1用LRUリスト33−1と表す場合がある。また、以下、これらのCPUコア毎LRUリスト33−0,33−1,・・・を特に区別しない場合には、CPUコア毎LRUリスト33と表記する。 Hereinafter, the LRU list 33-0 for each CPU core may be referred to as the LRU list 33-0 for CPU core # 0. Similarly, the LRU list 33-1 for each CPU core may be represented as the LRU list 33-1 for CPU core # 1. Further, hereinafter, when these CPU core LRU lists 33-0, 33-1, ... Are not particularly distinguished, they are referred to as CPU core LRU list 33.

本第1実施形態のコンピュータシステム1aにおいては、CPUコア11毎にCPUコア毎LRUリスト33が備えられる。CPUコア毎LRUリスト33には、CPUコア11がスレッドを実行するに際してデータアクセスが発生したページに関する情報が格納される。例えば、CPUコア毎LRUリスト33には、ページの情報(アドレスなど)が格納されているページ構造体へのポインタと、ページにアクセスがあったことを示すアクセスフラグと、リストのリンク情報とが格納されている。 In the computer system 1a of the first embodiment, an LRU list 33 for each CPU core is provided for each CPU core 11. The LRU list 33 for each CPU core stores information about the page on which data access occurred when the CPU core 11 executes a thread. For example, the LRU list 33 for each CPU core contains a pointer to a page structure in which page information (address, etc.) is stored, an access flag indicating that the page has been accessed, and list link information. It is stored.

CPUコア毎LRUリスト33は、CPUコア11によってデータアクセスが行なわれたページをLRUアルゴリズムに従って管理する。CPUコア毎LRUリスト33においては、データアクセスが発生したページが参照されていない時間に応じて管理される。CPUコア毎LRUリスト33を参照することで、CPUコア11が最も過去にアクセスしたページ、すなわち、CPUコア11から参照されていない時間が最も長いページを知ることができる。 The LRU list 33 for each CPU core manages the pages for which data has been accessed by the CPU core 11 according to the LRU algorithm. In the LRU list 33 for each CPU core, the page on which the data access has occurred is managed according to the time when the page is not referenced. By referring to the LRU list 33 for each CPU core, it is possible to know the page accessed by the CPU core 11 in the past, that is, the page that has not been referenced by the CPU core 11 for the longest time.

各CPUコア11により実行されるページ移動スレッド101(詳細は後述)が、このCPUコア毎LRUリスト33を参照して、当該ページ移動スレッド101を実行するCPUコア11(以下、自CPUコア11という場合がある)から参照されていない時間が最も長いページを特定する。そして、この特定したページを、キャッシュ30aからSSD20へ移動させる移動候補ページとして選択する。 The page moving thread 101 (details will be described later) executed by each CPU core 11 refers to the LRU list 33 for each CPU core, and the CPU core 11 (hereinafter referred to as own CPU core 11) that executes the page moving thread 101. Identify the page with the longest unreferenced time (may be). Then, the specified page is selected as a movement candidate page to be moved from the cache 30a to the SSD 20.

――OS用LRUリスト32―― --LRU list for OS 32--

OS用LRUリスト32は、各CPUコア毎LRUリスト33から選択された移動候補ページをLRUアルゴリズムで管理する。すなわち、OS用LRUリスト32は、各CPUコア11が実行するページ移動スレッド101が、自CPUコア11のCPUコア毎LRUリスト33から選択した移動候補ページを管理する。 The OS LRU list 32 manages the movement candidate pages selected from the LRU list 33 for each CPU core by the LRU algorithm. That is, in the OS LRU list 32, the page movement thread 101 executed by each CPU core 11 manages the movement candidate pages selected from the LRU list 33 for each CPU core of the own CPU core 11.

OS用LRUリスト32は、OSに標準機能として備えられるページ移動スレッド101(詳細は後述)によって用いられるLRUリストである。OS用LRUリスト32は、OSに対して設けられたLRUリストであると言える。OS用LRUリスト32をLinux用LRUリスト32といってもよい。OS用LRUリスト32は、オペレーティングシステムに対して設けられ、複数のCPUコア毎LRUリスト33におけるページ群の中から移動の順位に応じて選択された複数のページを、SSD20へ移動される候補のページ群として管理する第2リンクに相当する。また、OS用LRUリスト32を格納するDRAM30のカーネル領域31は、第2リンクを格納する第2管理情報記憶領域に相当する。 The OS LRU list 32 is an LRU list used by the page moving thread 101 (details will be described later) provided as a standard function in the OS. It can be said that the LRU list 32 for the OS is an LRU list provided for the OS. The OS LRU list 32 may be referred to as a Linux LRU list 32. The OS LRU list 32 is provided for the operating system, and is a candidate for moving a plurality of pages selected according to the movement order from the page groups in the plurality of CPU cores LRU list 33 to the SSD 20. It corresponds to the second link managed as a page group. Further, the kernel area 31 of the DRAM 30 that stores the OS LRU list 32 corresponds to the second management information storage area that stores the second link.

OS用LRUリスト32は、OSによって管理され、複数のCPUコア毎LRUリスト33のうちのいずれかから選択され、SSD20へ移動される候補のページ群を示す第2リンクに相当する。 The OS LRU list 32 corresponds to a second link indicating a candidate page group managed by the OS, selected from a plurality of CPU core LRU lists 33, and moved to the SSD 20.

ページ移動スレッド101は、このOS用LRUリスト32に登録された移動候補ページの中から、LRUアルゴリズムに従って、参照されていない時間が最も長い移動候補ページを特定し、移動対象ページとして選択する。ページ移動スレッド101は、この選択した移動対象ページをSSD20に格納する。 The page movement thread 101 identifies the movement candidate page having the longest unreferenced time from the movement candidate pages registered in the OS LRU list 32 according to the LRU algorithm, and selects the movement candidate page as the movement target page. The page movement thread 101 stores the selected movement target page in the SSD 20.

図3は第1実施形態の一例としてのコンピュータシステム1aにおけるCPUコア毎LRUリスト33とOS用LRUリスト32との動作関係を説明するための図である。 FIG. 3 is a diagram for explaining the operation relationship between the LRU list 33 for each CPU core and the LRU list 32 for the OS in the computer system 1a as an example of the first embodiment.

後述するページ移動スレッド101が、CPUコア毎LRUリスト33に管理される複数の移動候補ページの中から移動対象ページを選択し、この移動対象ページをSSD20に移動させるOS用LRUリスト32に投入する(図3の符号P1参照)。 The page movement thread 101, which will be described later, selects a movement target page from a plurality of movement candidate pages managed in the LRU list 33 for each CPU core, and inputs the movement target page to the OS LRU list 32 for moving the movement target page to the SSD 20. (See reference numeral P1 in FIG. 3).

後述するOS付属ページ移動スレッド102が、CPUコア毎LRUリスト33に管理される複数の移動候補ページの中から移動対象ページを選択し、この移動対象ページをSSD20に移動させる(図3の符号P2参照)。 The OS-attached page movement thread 102, which will be described later, selects a movement target page from a plurality of movement candidate pages managed in the LRU list 33 for each CPU core, and moves the movement target page to the SSD 20 (reference numeral P2 in FIG. 3). reference).

図4は第1実施形態の一例としてのコンピュータシステム1aにおけるCPUコア毎LRUリスト33およびOS用LRUリスト32がそれぞれ対象とするDRAM領域を説明するための図である。 FIG. 4 is a diagram for explaining a DRAM area targeted by the LRU list 33 for each CPU core and the LRU list 32 for the OS in the computer system 1a as an example of the first embodiment.

この図4に示すように、CPUコア毎LRUリスト33はキャッシュ30aのみを管理対象とする。すなわち、キャッシュ30a上のページのみがCPUコア毎LRUリスト33によって管理される。 As shown in FIG. 4, the LRU list 33 for each CPU core manages only the cache 30a. That is, only the pages on the cache 30a are managed by the LRU list 33 for each CPU core.

これに対して、OS用LRUリスト32は、DRAM30の記憶領域全体(全DRAM領域)を管理対象とする。すなわち、DRAM30の前記記憶領域上のページがOS用LRUリスト32によって管理される。
図5は第1実施形態の一例としてのコンピュータシステム1aにおける移動情報テーブル34を例示する図である。
On the other hand, the OS LRU list 32 manages the entire storage area (total DRAM area) of the DRAM 30. That is, the pages on the storage area of the DRAM 30 are managed by the OS LRU list 32.
FIG. 5 is a diagram illustrating a movement information table 34 in the computer system 1a as an example of the first embodiment.

移動情報テーブル34は、ページがSSD20へ移動済みであるか否かを管理する情報であり、ページ毎に、当該ページがSSD20へ移動されたか否かを表す情報を対応付けることで構成される。 The movement information table 34 is information for managing whether or not the page has been moved to the SSD 20, and is configured by associating each page with information indicating whether or not the page has been moved to the SSD 20.

図5に例示する移動情報テーブル34は、ページを識別する情報に対して移動フラグを対応付けて構成されている。ページを識別する情報は、ページのアドレスであってもよく、また、ページ毎に設定された識別情報であってもよく、種々変形して実施することができる。 The movement information table 34 illustrated in FIG. 5 is configured by associating a movement flag with information that identifies a page. The information for identifying the page may be the address of the page, or may be the identification information set for each page, and can be implemented by various modifications.

移動フラグは、ページがSSD20へ移動されたか否かを表す情報であり、例えば、ページがSSD20へ移動されていない(未移動)場合には“0”が、ページがSSD20へ移動された(移動済)場合には“1”が、それぞれ設定される。すなわち、移動情報テーブル34において移動フラグに“1”が設定されたページは移動済みページである。 The move flag is information indicating whether or not the page has been moved to SSD20. For example, if the page has not been moved to SSD20 (not moved), "0" is set, and the page has been moved to SSD20 (moved). In that case, "1" is set respectively. That is, the page in which the movement flag is set to "1" in the movement information table 34 is a moved page.

移動情報テーブル34は、OS付属ページ移動スレッド102によりSSD20に移動されたページを管理する移動管理情報に相当する。また、移動情報テーブル34を格納するDRAM30は、移動情報テーブル34を記憶する記憶部に相当する。
図6は第1実施形態の一例としてのコンピュータシステム1aにおけるページ管理方法を説明するための図である。
第1実施形態のコンピュータシステム1aにおいては、CPUコア11毎に、CPUコア毎LRUリスト33を備える。
図6に示す例においては、プロセッサ10はCPUコア#0〜#3を備える4コアプロセッサとして構成されている。
The movement information table 34 corresponds to the movement management information that manages the pages moved to the SSD 20 by the page movement thread 102 attached to the OS. Further, the DRAM 30 that stores the movement information table 34 corresponds to a storage unit that stores the movement information table 34.
FIG. 6 is a diagram for explaining a page management method in the computer system 1a as an example of the first embodiment.
In the computer system 1a of the first embodiment, each CPU core 11 is provided with an LRU list 33 for each CPU core.
In the example shown in FIG. 6, the processor 10 is configured as a 4-core processor including CPU cores # 0 to # 3.

本第1実施形態のコンピュータシステム1aにおいては、CPUコア11間でデータの共有がないものとする。また、CPUコア毎LRUリスト33の制御はCPUコア11毎に独立して行なわれ、OS付属ページ移動スレッド102からCPUコア毎LRUリスト33へのアクセスは行なわれない。 In the computer system 1a of the first embodiment, it is assumed that no data is shared between the CPU cores 11. Further, the control of the LRU list 33 for each CPU core is performed independently for each CPU core 11, and the page moving thread 102 attached to the OS does not access the LRU list 33 for each CPU core.

本第1実施形態のコンピュータシステム1aにおいては、各CPUコア#0〜#3が、それぞれスレッド104,ページ移動スレッド101およびリスト削除スレッド103を実行する。
また、CPUコア#0〜#3のうち、例えば、予めプライマリとして設定されたいずれかのCPUコア11が、OS付属ページ移動スレッド102を実行する。
また、移動情報テーブル34およびOS用LRUリスト32がDRAM30のカーネル領域31に格納されている(図1参照)。
In the computer system 1a of the first embodiment, each CPU core # 0 to # 3 executes a thread 104, a page movement thread 101, and a list deletion thread 103, respectively.
Further, among the CPU cores # 0 to # 3, for example, any CPU core 11 preset as the primary executes the OS-attached page movement thread 102.
Further, the movement information table 34 and the OS LRU list 32 are stored in the kernel area 31 of the DRAM 30 (see FIG. 1).

上述の如く、各CPUコア11に対応させて、CPUコア毎LRUリスト33がそれぞれ備えられる。すなわち、CPUコア#0に対応させてCPUコア#0用LRUリスト33−0が、CPUコア#1に対応させてCPUコア#1用LRUリスト33−1が、CPUコア#2に対応させてCPUコア#2用LRUリスト33−2が、CPUコア#3に対応させてCPUコア#3用LRUリスト33−3が、それぞれ備えられる。 As described above, the LRU list 33 for each CPU core is provided corresponding to each CPU core 11. That is, the LRU list 33-0 for CPU core # 0 corresponds to CPU core # 0, and the LRU list 33-1 for CPU core # 1 corresponds to CPU core # 1 and corresponds to CPU core # 2. The LRU list 33-2 for CPU core # 2 is provided, and the LRU list 33-3 for CPU core # 3 is provided corresponding to the CPU core # 3.

そして、例えば、CPUコア#0用LRUリスト33−0には、CPUコア#0が実行するスレッド104,ページ移動スレッド101およびリスト削除スレッド103からのみアクセスが行なわれる。
すなわち、CPUコア毎LRUリスト33−0には、CPUコア#0からのみアクセスが行なわれ、他のCPUコア#1〜#3からのアクセスは発生しない。
Then, for example, the LRU list 33-0 for CPU core # 0 is accessed only from the thread 104, the page moving thread 101, and the list deletion thread 103 executed by the CPU core # 0.
That is, the LRU list 33-0 for each CPU core is accessed only from the CPU core # 0, and is not accessed from the other CPU cores # 1 to # 3.

同様に、CPUコア毎LRUリスト33−1には、CPUコア#1が実行するスレッド104,ページ移動スレッド101およびリスト削除スレッド103からのみアクセスが行なわれる。すなわち、CPUコア毎LRUリスト33−1には、CPUコア#1からのみアクセスが行なわれ、他のCPUコア#0,#2,#3からのアクセスは発生しない。 Similarly, the LRU list 33-1 for each CPU core is accessed only from the thread 104 executed by the CPU core # 1, the page moving thread 101, and the list deletion thread 103. That is, the LRU list 33-1 for each CPU core is accessed only from the CPU core # 1, and is not accessed from the other CPU cores # 0, # 2, and # 3.

また、CPUコア毎LRUリスト33−2には、CPUコア#2が実行するスレッド104,ページ移動スレッド101およびリスト削除スレッド103からのみアクセスが行なわれる。すなわち、CPUコア毎LRUリスト33−2には、CPUコア#2からのみアクセスが行なわれ、他のCPUコア#0,#1,#3からのアクセスは発生しない。 Further, the LRU list 33-2 for each CPU core is accessed only from the thread 104 executed by the CPU core # 2, the page moving thread 101, and the list deletion thread 103. That is, the LRU list 33-2 for each CPU core is accessed only from the CPU core # 2, and is not accessed from the other CPU cores # 0, # 1, and # 3.

さらに、CPUコア毎LRUリスト33−3には、CPUコア#3が実行するスレッド104,ページ移動スレッド101およびリスト削除スレッド103からのみアクセスが行なわれる。すなわち、CPUコア毎LRUリスト33−3には、CPUコア#3からのみアクセスが行なわれ、他のCPUコア#0〜#2からのアクセスは発生しない。
ここで、第1実施形態のコンピュータシステム1aにおけるページ管理手法を、CPUコア#0において行なわれる処理を例に説明する。
Further, the LRU list 33-3 for each CPU core is accessed only from the thread 104 executed by the CPU core # 3, the page moving thread 101, and the list deletion thread 103. That is, the LRU list 33-3 for each CPU core is accessed only from the CPU core # 3, and the access from the other CPU cores # 0 to # 2 does not occur.
Here, the page management method in the computer system 1a of the first embodiment will be described by taking the processing performed in the CPU core # 0 as an example.

CPUコア#0は、スレッド104を実行することで演算処理を実現する。スレッド104は、CPUコア#0用LRUリスト33−0に対してアクセスフラグの更新や新規ページの追加等の処理を行なう(図6の符号S1参照)。
なお、以下、CPUコア11がスレッド104を実行することで何らかの処理を実現することを、スレッド104が処理を実現すると表現する場合がある。
CPU core # 0 realizes arithmetic processing by executing thread 104. Thread 104 performs processing such as updating the access flag and adding a new page to the LRU list 33-0 for CPU core # 0 (see reference numeral S1 in FIG. 6).
Hereinafter, the fact that the CPU core 11 realizes some processing by executing the thread 104 may be expressed as the thread 104 realizing the processing.

CPUコア#0は、ページ移動スレッド101を実行することで、CPUコア#0用LRUリスト33−0を参照し、このCPUコア#0用LRUリスト33に登録されたページの中から、LRUアルゴリズムに基づき移動候補ページを選択する(図6の符号S2参照)。 The CPU core # 0 refers to the LRU list 33-0 for the CPU core # 0 by executing the page movement thread 101, and the LRU algorithm is selected from the pages registered in the LRU list 33 for the CPU core # 0. Select a move candidate page based on (see reference numeral S2 in FIG. 6).

なお、以下、CPUコア11がページ移動スレッド101を実行することで何らかの処理を実現することを、ページ移動スレッド101が処理を実現すると表現する場合がある。
ページ移動スレッド101は、選択した移動候補ページをOS用LRUリスト32に追加する(図6の符号S3参照)。
Hereinafter, the fact that the CPU core 11 realizes some processing by executing the page movement thread 101 may be expressed as the page movement thread 101 realizing the processing.
The page movement thread 101 adds the selected movement candidate page to the OS LRU list 32 (see reference numeral S3 in FIG. 6).

CPUコア11は、OS付属ページ移動スレッド102を実行することで、OS用LRUリスト32を参照し、このOS用LRUリスト32に登録された移動候補ページの中から、LRUアルゴリズムに基づき移動対象ページを選択する(図6の符号S4参照)。なお、以下、CPUコア11がOS付属ページ移動スレッド102を実行することで何らかの処理を実現することを、OS付属ページ移動スレッド102が処理を実現すると表現する場合がある。
そして、OS付属ページ移動スレッド102は、選択した移動対象ページをSSD20に移動させる(図6の符号S5参照)。
The CPU core 11 refers to the LRU list 32 for the OS by executing the page movement thread 102 attached to the OS, and among the movement candidate pages registered in the LRU list 32 for the OS, the movement target page based on the LRU algorithm. Is selected (see reference numeral S4 in FIG. 6). Hereinafter, the fact that the CPU core 11 realizes some processing by executing the OS-attached page movement thread 102 may be expressed as the OS-attached page movement thread 102 realizing the processing.
Then, the OS-attached page movement thread 102 moves the selected movement target page to the SSD 20 (see reference numeral S5 in FIG. 6).

OS付属ページ移動スレッド102を実行するCPUコア11は、OS用LRUリスト32のページ群の中から選択したページのデータを、キャッシュ30aからSSD20に移動させる移動処理部に相当する。 The CPU core 11 that executes the OS-attached page movement thread 102 corresponds to a movement processing unit that moves the data of the page selected from the page group of the OS LRU list 32 from the cache 30a to the SSD 20.

また、OS付属ページ移動スレッド102は、SSD20に移動させたページ(移動済みページ)を移動情報テーブル34に登録する(図6の符号S6参照)。例えば、OS付属ページ移動スレッド102は、移動情報テーブル34における当該ページの移動フラグに“1”を設定する(フラグを立てる)。 Further, the page movement thread 102 attached to the OS registers the page (moved page) moved to the SSD 20 in the movement information table 34 (see reference numeral S6 in FIG. 6). For example, the page movement thread 102 attached to the OS sets (sets a flag) “1” in the movement flag of the page in the movement information table 34.

CPUコア#0は、リスト削除スレッド103を実行することで、自身のCPUコア毎LRUリスト33にあるページの中で、移動情報テーブル34において移動フラグに“1”が立っているページを削除する。なお、以下、CPUコア11がリスト削除スレッド103を実行することで何らかの処理を実現することを、リスト削除スレッド103が処理を実現すると表現する場合がある。 By executing the list deletion thread 103, the CPU core # 0 deletes the page in the movement information table 34 in which the movement flag is "1" among the pages in the LRU list 33 for each CPU core. .. Hereinafter, the fact that the CPU core 11 realizes some processing by executing the list deletion thread 103 may be expressed as the list deletion thread 103 realizing the processing.

具体的には、リスト削除スレッド103は、移動情報テーブル34を参照し、この移動情報テーブル34に登録された移動済みページと、自身が管理するCPUコア#0用LRUリスト33−0に登録された移動候補ページとを比較する。そして、CPUコア#0用LRUリスト33−0に登録された移動候補ページのうち、移動情報テーブル34に登録された移動済みページと一致するページを削除する。 Specifically, the list deletion thread 103 refers to the movement information table 34, and is registered in the moved page registered in the movement information table 34 and the LRU list 33-0 for CPU core # 0 managed by itself. Compare with the move candidate page. Then, among the movement candidate pages registered in the LRU list 33-0 for CPU core # 0, the page matching the moved page registered in the movement information table 34 is deleted.

リスト削除スレッド103は、移動情報テーブル34を参照することで移動済みテーブルを知り、CPUコア毎LRUリスト33から移動済みページを削除する(図6の符号S7参照)。なお、上述したリスト削除スレッド103による処理をページ移動スレッド101が実行してもよい。移動情報テーブル34へのアクセスは、軽量な排他処理で実現す
ることができ、アトミックアクセスを実現できる。
The list deletion thread 103 knows the moved table by referring to the movement information table 34, and deletes the moved page from the LRU list 33 for each CPU core (see reference numeral S7 in FIG. 6). The page movement thread 101 may execute the process by the list deletion thread 103 described above. Access to the movement information table 34 can be realized by lightweight exclusive processing, and atomic access can be realized.

リスト削除スレッド103を実行するCPUコア11は、複数のCPUコア11毎に備えられ、移動情報テーブル34を参照して、SSD20に移動させたページをCPUコア毎LRUリスト33から削除する、削除処理部に相当する。
他のCPUコア11においても同様の処理が行なわれる。
The CPU core 11 that executes the list deletion thread 103 is provided for each of the plurality of CPU cores 11, and refers to the movement information table 34 to delete the page moved to the SSD 20 from the LRU list 33 for each CPU core. Corresponds to the department.
Similar processing is performed on the other CPU core 11.

(B)動作
上述の如く構成された第1実施形態の一例としてのコンピュータシステム1aにおけるスレッド104によるCPUコア毎LRUリスト33の更新処理を、図7に示すフローチャート(ステップA1〜A6)に従って説明する。
(B) Operation The update process of the LRU list 33 for each CPU core by the thread 104 in the computer system 1a as an example of the first embodiment configured as described above will be described with reference to the flowcharts (steps A1 to A6) shown in FIG. ..

ステップA1において、スレッド104は、メモリ領域においてページを確保するかを確認する。確認の結果、ページを確保する場合には(ステップA1のYESルート参照)、ステップA2に移行する。
ステップA2において、スレッド104は、ページをスレッド104に割り当て、CPUコア毎LRUリスト33を更新する。
In step A1, the thread 104 confirms whether to allocate a page in the memory area. As a result of the confirmation, if the page is secured (see the YES route in step A1), the process proceeds to step A2.
In step A2, thread 104 allocates pages to thread 104 and updates the LRU list 33 for each CPU core.

ステップA3において、スレッド104は、メモリ使用量が所定の閾値(一定量)を超えたかを確認する。確認の結果、一定量を超えた場合には(ステップA3のYESルート参照)、ステップA4において、スレッド104はページ移動スレッド101を起動する。 In step A3, the thread 104 confirms whether the memory usage exceeds a predetermined threshold value (constant amount). As a result of the confirmation, when the amount exceeds a certain amount (see the YES route in step A3), the thread 104 activates the page movement thread 101 in step A4.

その後、ステップA5に移行する。また、ステップA1における確認の結果、スレッド104がメモリ領域においてページを確保しない場合も(ステップA1のNOルート参照)、ステップA5に移行する。 After that, the process proceeds to step A5. Further, as a result of the confirmation in step A1, even if the thread 104 does not allocate a page in the memory area (see the NO route in step A1), the process proceeds to step A5.

ステップA5において、スレッド104は、メモリをアクセスしたかを確認する。確認の結果、メモリアクセスがあった場合に(ステップA5のYESルート参照)、ステップA6に移行し、CPUコア毎LRUリスト33を更新する。その後、処理はステップA1に戻る。
また、ステップA3における確認の結果、メモリ使用量が一定量を超えていない場合には(ステップA3のNOルート参照)、ステップA5に移行する。
また、ステップA5における確認の結果、スレッド104によるメモリアクセスがない場合には(ステップA5のNOルート参照)、ステップA1に戻る。
In step A5, thread 104 confirms whether the memory has been accessed. As a result of the confirmation, when there is a memory access (see the YES route in step A5), the process proceeds to step A6, and the LRU list 33 for each CPU core is updated. After that, the process returns to step A1.
If, as a result of the confirmation in step A3, the memory usage does not exceed a certain amount (see the NO route in step A3), the process proceeds to step A5.
If, as a result of the confirmation in step A5, there is no memory access by the thread 104 (see the NO route in step A5), the process returns to step A1.

次に、第1実施形態の一例としてのコンピュータシステム1aにおけるページ移動スレッド101による処理を、図8に示すフローチャート(ステップA11〜A13)に従って説明する。なお、ページ移動スレッド101の起動とともに図示しないタイマによる計時が開始される。 Next, the process by the page movement thread 101 in the computer system 1a as an example of the first embodiment will be described with reference to the flowcharts (steps A11 to A13) shown in FIG. At the same time as the page movement thread 101 is activated, time counting by a timer (not shown) is started.

ステップA11において、ページ移動スレッド101は、自身が、当該ページ移動スレッド101を実行しているCPUコア11と同一のCPUコア11(自CPUコア11)によって実行されたスレッド104から起動されたかを確認する。確認の結果、スレッド104から当該ページ移動スレッド101が起動された場合には(ステップA11のYESルート参照)、ステップA13に移行する。 In step A11, the page movement thread 101 confirms whether or not it has been started from the thread 104 executed by the same CPU core 11 (own CPU core 11) as the CPU core 11 executing the page movement thread 101. do. As a result of the confirmation, when the page movement thread 101 is started from the thread 104 (see the YES route in step A11), the process proceeds to step A13.

ステップA13において、ページ移動スレッド101は、CPUコア毎LRUリスト33を参照して、LRUアルゴリズムに基づき移動候補ページを選択する。また、ページ移動スレッド101は、選択した移動候補ページをOS用LRUリスト32に追加する。また、このタイミングでタイマをリセットしてもよい。
ページ移動スレッド101は、OS付属ページ移動スレッド102を起動させる。その後、処理はステップA11に戻る。
In step A13, the page movement thread 101 refers to the LRU list 33 for each CPU core and selects a movement candidate page based on the LRU algorithm. Further, the page movement thread 101 adds the selected movement candidate page to the OS LRU list 32. Further, the timer may be reset at this timing.
The page movement thread 101 activates the page movement thread 102 attached to the OS. After that, the process returns to step A11.

また、ステップA11における確認の結果、例えば、スリープ解除のように、スレッド104から起動されたのではなく起動された場合には(ステップA11のNOルート参照)、ステップA12に移行する。 Further, as a result of the confirmation in step A11, for example, when the thread 104 is activated instead of being activated as in wakeup (see the NO route in step A11), the process proceeds to step A12.

ステップA12において、ページ移動スレッド101は、タイマにより計時された時間を参照して、一定時間が経過しているかを確認する。ここで、一定時間が経過していない場合には(ステップA12のNOルート参照)、ステップA11に戻る。
一方、一定時間が経過している場合には(ステップA12のYESルート参照)、ステップA13に移行する。
In step A12, the page movement thread 101 refers to the time clocked by the timer and confirms whether a certain time has elapsed. Here, if a certain time has not passed (see the NO route in step A12), the process returns to step A11.
On the other hand, when a certain time has passed (see the YES route in step A12), the process proceeds to step A13.

次に、第1実施形態の一例としてのコンピュータシステム1aにおけるOS付属ページ移動スレッド102による処理を、図9に示すフローチャート(ステップA21〜A23)に従って説明する。なお、OS付属ページ移動スレッド102の起動とともに図示しないタイマによる計時が開始される。 Next, the processing by the OS-attached page movement thread 102 in the computer system 1a as an example of the first embodiment will be described with reference to the flowcharts (steps A21 to A23) shown in FIG. When the page movement thread 102 attached to the OS is activated, time counting by a timer (not shown) is started.

ステップA21において、OS付属ページ移動スレッド102は、自身が、ページ移動スレッド101から起動されたかを確認する。確認の結果、ページ移動スレッド101から当該OS付属ページ移動スレッド102が起動された場合には(ステップA21のYESルート参照)、ステップA23に移行する。 In step A21, the OS-attached page movement thread 102 confirms whether or not it has been started from the page movement thread 101. As a result of the confirmation, when the page movement thread 102 attached to the OS is started from the page movement thread 101 (see the YES route in step A21), the process proceeds to step A23.

ステップA23において、OS付属ページ移動スレッド102は、OS用LRUリスト32を参照して、LRUアルゴリズムに基づき移動対象ページを選択する。また、OS付属ページ移動スレッド102は、選択した移動対象ページをSSD20に格納し、さらに、SSD20へ移動済みのページをOS用LRUリスト32から削除する。 In step A23, the OS-attached page move thread 102 selects the move target page based on the LRU algorithm with reference to the OS LRU list 32. Further, the OS-attached page movement thread 102 stores the selected movement target page in the SSD 20, and further deletes the page that has been moved to the SSD 20 from the OS LRU list 32.

また、OS付属ページ移動スレッド102は、SSD20へ移動したページについて、移動情報テーブル34の移動フラグに、当該ページが移動済みである旨を表す値を設定する。また、このタイミングでタイマをリセットしてもよい。
ページ移動スレッド101は、OS付属ページ移動スレッド102を起動させる。その後、処理はステップA21に戻る。
Further, the page movement thread 102 attached to the OS sets a value indicating that the page has been moved in the movement flag of the movement information table 34 for the page moved to the SSD 20. Further, the timer may be reset at this timing.
The page movement thread 101 activates the page movement thread 102 attached to the OS. After that, the process returns to step A21.

また、ステップA21における確認の結果、例えば、スリープ解除のように、ページ移動スレッド101から起動されたのではなく起動された場合には(ステップA21のNOルート参照)、ステップA22に移行する。 Further, as a result of the confirmation in step A21, for example, when the page movement thread 101 is activated instead of being activated (see the NO route in step A21), as in the case of waking from sleep, the process proceeds to step A22.

ステップA22において、OS付属ページ移動スレッド102は、タイマにより計時された時間を参照して、一定時間が経過しているかを確認する。ここで、一定時間が経過していない場合には(ステップA22のNOルート参照)、ステップA21に戻る。
一方、一定時間が経過している場合には(ステップA22のYESルート参照)、ステップA23に移行する。
In step A22, the page movement thread 102 attached to the OS refers to the time clocked by the timer and confirms whether a certain time has elapsed. Here, if a certain time has not passed (see the NO route in step A22), the process returns to step A21.
On the other hand, when a certain time has passed (see the YES route in step A22), the process proceeds to step A23.

次に、第1実施形態の一例としてのコンピュータシステム1aにおけるリスト削除スレッド103による処理を、図10に示すフローチャート(ステップA31〜A33)に従って説明する。なお、リスト削除スレッド103の起動とともに図示しないタイマによる計時が開始される。 Next, the process by the list deletion thread 103 in the computer system 1a as an example of the first embodiment will be described with reference to the flowcharts (steps A31 to A33) shown in FIG. When the list deletion thread 103 is activated, time counting by a timer (not shown) is started.

ステップA31において、リスト削除スレッド103は、タイマにより計時された時間を参照して、一定時間が経過しているかを確認する。ここで、一定時間が経過していない場合には(ステップA31のNOルート参照)、ステップA31に戻る。
一方、一定時間が経過している場合には(ステップA31のYESルート参照)、ステップA32に移行する。
In step A31, the list deletion thread 103 refers to the time clocked by the timer and confirms whether a certain time has elapsed. Here, if a certain time has not passed (see the NO route in step A31), the process returns to step A31.
On the other hand, when a certain time has passed (see the YES route in step A31), the process proceeds to step A32.

ステップA32において、リスト削除スレッド103は、自CPUコア11のCPUコア毎LRUリスト33にあるページの中で、移動情報テーブル34において移動フラグに“1”が立っているページがあるかを確認する。確認の結果、自CPUコア11のCPU コア毎LRUリスト33にあるページの中で、移動情報テーブル34において移動フラグに“1”が立っているページが無い場合には(ステップA32のNOルート参照)、ステップA31に戻る。 In step A32, the list deletion thread 103 confirms whether or not there is a page in the movement information table 34 in which "1" is set in the movement flag among the pages in the LRU list 33 for each CPU core of the own CPU core 11. .. As a result of the confirmation, if there is no page in the movement information table 34 in which "1" is set in the movement flag among the pages in the LRU list 33 for each CPU core of the own CPU core 11 (refer to the NO route in step A32). ), Return to step A31.

一方、ステップA32における確認の結果、自CPUコア11のCPUコア毎LRUリスト33にあるページの中で、移動情報テーブル34において移動フラグに“1”が立っているページがある場合には(ステップA32のYESルート参照)、ステップA33に移行する。 On the other hand, as a result of the confirmation in step A32, if there is a page in the movement information table 34 in which "1" is set in the movement flag among the pages in the LRU list 33 for each CPU core of the own CPU core 11 (step). (Refer to the YES route of A32), the process proceeds to step A33.

ステップA33において、リスト削除スレッド103は、自CPUコア11のCPUコア毎LRUリスト33から、移動情報テーブル34において移動フラグに“1”が立っているページ(移動済みページ)を削除する。その後、処理はステップA31に戻る。
他のCPUコア11においても同様の処理が行なわれる。
In step A33, the list deletion thread 103 deletes a page (moved page) in which "1" is set in the movement flag in the movement information table 34 from the LRU list 33 for each CPU core of the own CPU core 11. After that, the process returns to step A31.
Similar processing is performed on the other CPU core 11.

(C)効果
このように、第1実施形態の一例としてのコンピュータシステム1aによれば、CPUコア11毎にCPUコア毎LRUリスト33を分散して備えるとともに、各CPUコア毎LRUリスト33の制御をCPUコア11毎に独立して行なう。これにより、CPUコア毎LRUリスト33に対しては、自CPUコア11からのみアクセスが行なわれ、他のCPUコア11からのアクセスがない。これにより、CPUコア毎LRUリスト33に対する排他制御を行なう必要がなく、スピンロックが不要となる。これにより、ページ移動処理によるプロセッサ10の負荷を軽減し、アプリケーションの処理性能が向上する。
(C) Effect As described above, according to the computer system 1a as an example of the first embodiment, the LRU list 33 for each CPU core is distributed and provided for each CPU core 11, and the LRU list 33 for each CPU core is controlled. Is performed independently for each CPU core 11. As a result, the LRU list 33 for each CPU core is accessed only from the own CPU core 11, and is not accessed from other CPU cores 11. As a result, it is not necessary to perform exclusive control on the LRU list 33 for each CPU core, and spinlock is not required. As a result, the load on the processor 10 due to the page movement processing is reduced, and the processing performance of the application is improved.

各CPUコア11においてリスト削除スレッド103が実行移動情報テーブル34の移動フラグを参照することで、SSD20への移動済みページを容易に知ることができ、CPUコア毎LRUリスト33から移動済みのページを削除することができる。 By referring to the move flag of the execution movement information table 34 by the list deletion thread 103 in each CPU core 11, the moved page to the SSD 20 can be easily known, and the moved page can be easily known from the LRU list 33 for each CPU core. Can be deleted.

[2.第2実施形態の説明]
(A)構成
図11は第2実施形態の一例としてのコンピュータシステム1bの構成を模式的に示す図である。
[2. Description of the second embodiment]
(A) Configuration FIG. 11 is a diagram schematically showing a configuration of a computer system 1b as an example of the second embodiment.

この図11に示すように、第2実施形態のコンピュータシステム1bは、第1実施形態のDRAM30の移動情報テーブル34に代えてページ対応テーブル35をそなえるものであり、その他の部分は第1実施形態のコンピュータシステム1aと同様に構成されている。以下、図中、既述の符号と同一の符号は同様の部分を示しているので、その説明は省略する。
図12は第2実施形態の一例としてのコンピュータシステム1bにおけるページ対応テーブル35を例示する図である。
As shown in FIG. 11, the computer system 1b of the second embodiment includes a page correspondence table 35 in place of the movement information table 34 of the DRAM 30 of the first embodiment, and the other parts include the first embodiment. It is configured in the same manner as the computer system 1a of the above. Hereinafter, in the drawings, the same reference numerals as those described above indicate the same parts, and thus the description thereof will be omitted.
FIG. 12 is a diagram illustrating a page correspondence table 35 in the computer system 1b as an example of the second embodiment.

――ページ対応テーブル35――
ページ対応テーブル35は、ページとCPUコア11とを対応付ける情報であり、ページ移動スレッド101により選択された移動候補ページがいずれのCPUコア11のCPUコア毎LRUリスト33に登録されているかを表す。
--Page correspondence table 35--
The page correspondence table 35 is information for associating a page with the CPU core 11, and represents which movement candidate page selected by the page movement thread 101 is registered in the LRU list 33 for each CPU core of which CPU core 11.

図12に例示するページ対応テーブル35は、ページ毎に、当該ページをCPUコア毎LRUリスト33によって管理するCPUコア11(CPUコア番号)を対応付けることで構成される。 The page correspondence table 35 illustrated in FIG. 12 is configured by associating a CPU core 11 (CPU core number) for managing the page with the LRU list 33 for each CPU core for each page.

OS付属ページ移動スレッド102は、このページ対応テーブル35を参照することで、SSD20へ移動した移動済みのページに対応するCPUコア11を特定し、当該CPUコア11のCPUコア毎LRUリスト33から、移動候補ページを削除する。 The page movement thread 102 attached to the OS identifies the CPU core 11 corresponding to the moved page moved to the SSD 20 by referring to the page correspondence table 35, and from the LRU list 33 for each CPU core of the CPU core 11 Delete the move candidate page.

例えばプライマリのCPUコア11によって実行されるOS付属ページ移動スレッド102は、ページ対応テーブル35を参照することで、他のCPUコア11によって管理されるCPUコア毎LRUリスト33にアクセスすることができる。なお、ページ対応テーブル35へのアクセスは、軽量な排他処理で実現することができ、アトミックアクセスを実現できる。 For example, the OS-attached page moving thread 102 executed by the primary CPU core 11 can access the LRU list 33 for each CPU core managed by another CPU core 11 by referring to the page correspondence table 35. Access to the page correspondence table 35 can be realized by a lightweight exclusive process, and atomic access can be realized.

ページ対応テーブル35において、ページに対応付けられたCPUコア番号は、移動候補ページに対応するCPUコア毎LRUリスト33の位置情報に相当する。 In the page correspondence table 35, the CPU core number associated with the page corresponds to the position information of the LRU list 33 for each CPU core corresponding to the movement candidate page.

ページ対応テーブル35は、SSD20に移動されたページとCPUコア11とを対応付けるページ対応情報に相当する。また、このページ対応テーブル35を記憶するDRAM30は、記憶部に相当する。 The page correspondence table 35 corresponds to the page correspondence information that associates the page moved to the SSD 20 with the CPU core 11. Further, the DRAM 30 that stores the page correspondence table 35 corresponds to a storage unit.

図13は第2実施形態の一例としてのコンピュータシステム1bにおけるページ管理方法を説明するための図である。
第2実施形態のコンピュータシステム1bにおいても、CPUコア11毎に、CPUコア毎LRUリスト33を備える。
図13に示す例においては、プロセッサ10はCPUコア#0〜#3を備える4コアプロセッサとして構成されている。
FIG. 13 is a diagram for explaining a page management method in the computer system 1b as an example of the second embodiment.
The computer system 1b of the second embodiment also includes an LRU list 33 for each CPU core for each CPU core 11.
In the example shown in FIG. 13, the processor 10 is configured as a 4-core processor including CPU cores # 0 to # 3.

本第2実施形態のコンピュータシステム1bにおいては、CPUコア11間でデータの共有がないものとする。
本第2実施形態のコンピュータシステム1bにおいては、各CPUコア#0〜#3が、それぞれスレッド104およびページ移動スレッド101を実行する。
また、CPUコア#0〜#3のうち、例えば、予めプライマリとして設定されたいずれかのCPUコア11が、OS付属ページ移動スレッド102を実行する。
また、ページ対応テーブル35およびOS用LRUリスト32がDRAM30のカーネル領域31に格納されている。
In the computer system 1b of the second embodiment, it is assumed that no data is shared between the CPU cores 11.
In the computer system 1b of the second embodiment, each CPU core # 0 to # 3 executes a thread 104 and a page movement thread 101, respectively.
Further, among the CPU cores # 0 to # 3, for example, any CPU core 11 preset as the primary executes the OS-attached page movement thread 102.
Further, the page correspondence table 35 and the OS LRU list 32 are stored in the kernel area 31 of the DRAM 30.

さらに、各CPUコア11に対応させて、CPUコア毎LRUリスト33がそれぞれ備えられる。すなわち、CPUコア#0に対応させてCPUコア#0用LRUリスト33−0が、CPUコア#1に対応させてCPUコア#1用LRUリスト33−1が、CPUコア#2に対応させてCPUコア#2用LRUリスト33−2が、CPUコア#3に対応させてCPUコア#3用LRUリスト33−3が、それぞれ備えられる。 Further, an LRU list 33 for each CPU core is provided corresponding to each CPU core 11. That is, the LRU list 33-0 for CPU core # 0 corresponds to CPU core # 0, and the LRU list 33-1 for CPU core # 1 corresponds to CPU core # 1 and corresponds to CPU core # 2. The LRU list 33-2 for CPU core # 2 is provided, and the LRU list 33-3 for CPU core # 3 is provided corresponding to the CPU core # 3.

そして、例えば、CPUコア#0用LRUリスト33−0には、CPUコア#0が実行するスレッド104およびページ移動スレッド101からアクセスが行なわれる。また、このCPUコア#0用LRUリスト33−0には、OS付属ページ移動スレッド102から移動候補ページを削除するためのアクセスが行なわれる。 Then, for example, the LRU list 33-0 for CPU core # 0 is accessed from the thread 104 executed by the CPU core # 0 and the page movement thread 101. Further, the LRU list 33-0 for CPU core # 0 is accessed to delete the movement candidate page from the page movement thread 102 attached to the OS.

同様に、CPUコア毎LRUリスト33−1には、CPUコア#1が実行するスレッド104およびページ移動スレッド101からのアクセスと、OS付属ページ移動スレッド102から移動候補ページを削除するためのアクセスとが行なわれる。 Similarly, the LRU list 33-1 for each CPU core is accessed from the thread 104 and the page movement thread 101 executed by the CPU core # 1 and the access for deleting the movement candidate page from the page movement thread 102 attached to the OS. Is done.

また、CPUコア毎LRUリスト33−2には、CPUコア#2が実行するスレッド104およびページ移動スレッド101からのアクセスと、OS付属ページ移動スレッド102から移動候補ページを削除するためのアクセスとが行なわれる。 Further, the LRU list 33-2 for each CPU core includes access from the thread 104 and the page movement thread 101 executed by the CPU core # 2 and access for deleting the movement candidate page from the page movement thread 102 attached to the OS. It is done.

さらに、CPUコア毎LRUリスト33−3には、CPUコア#3が実行するスレッド104およびページ移動スレッド101からのアクセスと、OS付属ページ移動スレッド102から移動候補ページを削除するためのアクセスとが行なわれる。
ここで、第2実施形態のコンピュータシステム1bにおけるページ管理手法を、CPUコア#0において行なわれる処理を例に説明する。
Further, the LRU list 33-3 for each CPU core has an access from the thread 104 and the page movement thread 101 executed by the CPU core # 3 and an access for deleting the movement candidate page from the page movement thread 102 attached to the OS. It is done.
Here, the page management method in the computer system 1b of the second embodiment will be described by taking the processing performed in the CPU core # 0 as an example.

CPUコア#0は、スレッド104を実行することで演算処理を実現する。スレッド104は、CPUコア#0用LRUリスト33−0に対してアクセスフラグの更新や新規ページの追加等の処理を行なう(図13の符号S11参照)。 CPU core # 0 realizes arithmetic processing by executing thread 104. Thread 104 performs processing such as updating the access flag and adding a new page to the LRU list 33-0 for CPU core # 0 (see reference numeral S11 in FIG. 13).

CPUコア#0は、ページ移動スレッド101を実行することで、CPUコア#0用LRUリスト33−0を参照し、このCPUコア#0用LRUリスト33に登録されたページの中から、LRUアルゴリズムに基づき移動候補ページを選択する(図13の符号S12参照)。
ページ移動スレッド101は、選択した移動候補ページをOS用LRUリスト32に追加する(図13の符号S13参照)。
The CPU core # 0 refers to the LRU list 33-0 for the CPU core # 0 by executing the page movement thread 101, and the LRU algorithm is selected from the pages registered in the LRU list 33 for the CPU core # 0. Select a move candidate page based on (see reference numeral S12 in FIG. 13).
The page movement thread 101 adds the selected movement candidate page to the OS LRU list 32 (see reference numeral S13 in FIG. 13).

また、ページ移動スレッド101は、ページ対応テーブル35に対して、移動候補ページに対応するCPUコア番号(OS用LRUリスト32の位置情報)を登録する(図13の符号S14参照)。 Further, the page movement thread 101 registers the CPU core number (position information of the OS LRU list 32) corresponding to the movement candidate page in the page correspondence table 35 (see reference numeral S14 in FIG. 13).

CPUコア11は、OS付属ページ移動スレッド102を実行することで、OS用LRUリスト32を参照し、このOS用LRUリスト32に登録された移動候補ページの中から、LRUアルゴリズムに基づき移動対象ページを選択する(図13の符号S15参照)。 そして、OS付属ページ移動スレッド102は、選択した移動対象ページをSSD20に移動させる(図13の符号S16参照)。 The CPU core 11 refers to the LRU list 32 for the OS by executing the page movement thread 102 attached to the OS, and among the movement candidate pages registered in the LRU list 32 for the OS, the movement target page based on the LRU algorithm. Is selected (see reference numeral S15 in FIG. 13). Then, the OS-attached page movement thread 102 moves the selected movement target page to the SSD 20 (see reference numeral S16 in FIG. 13).

OS付属ページ移動スレッド102は、ページ対応テーブル35を参照して、移動済みページに対応するCPUコア番号(OS用LRUリスト32の位置情報)を取得する(図13の符号S17参照)。そして、OS付属ページ移動スレッド102は、ページ対応テーブル35から取得したCPUコア番号が表すCPUコア11のCPUコア毎LRUリスト33から、移動済みページを削除する(図13の符号S18参照)。 The OS-attached page movement thread 102 refers to the page correspondence table 35 and acquires the CPU core number (position information of the OS LRU list 32) corresponding to the moved page (see reference numeral S17 in FIG. 13). Then, the page movement thread 102 attached to the OS deletes the moved page from the LRU list 33 for each CPU core of the CPU core 11 represented by the CPU core number acquired from the page correspondence table 35 (see reference numeral S18 in FIG. 13).

第2実施形態のコンピュータシステム1bにおいて、OS付属ページ移動スレッド102は、ページ対応テーブル35を参照して、SSD20に移動させたページをCPUコア毎LRUリスト33から削除する、削除処理部に相当する。
他のCPUコア11においても同様の処理が行なわれる。
In the computer system 1b of the second embodiment, the page movement thread 102 attached to the OS refers to the page correspondence table 35 and corresponds to a deletion processing unit that deletes the page moved to the SSD 20 from the LRU list 33 for each CPU core. ..
Similar processing is performed on the other CPU core 11.

(B)動作
上述の如く構成された第2実施形態の一例としてのコンピュータシステム1bにおけるスレッド104によるCPUコア毎LRUリスト33の更新処理を、図14に示すフローチャート(ステップB1〜B6)に従って説明する。
(B) Operation The update process of the LRU list 33 for each CPU core by the thread 104 in the computer system 1b as an example of the second embodiment configured as described above will be described with reference to the flowcharts (steps B1 to B6) shown in FIG. ..

ステップB1において、スレッド104は、メモリ領域においてページを確保するかを確認する。確認の結果、ページを確保する場合には(ステップB1のYESルート参照)、ステップB2に移行する。
ステップB2において、スレッド104は、ページをスレッド104に割り当て、CPUコア毎LRUリスト33を更新する。
In step B1, thread 104 confirms whether to allocate a page in the memory area. As a result of the confirmation, if the page is secured (see the YES route in step B1), the process proceeds to step B2.
In step B2, thread 104 allocates pages to thread 104 and updates the LRU list 33 for each CPU core.

ステップB3において、スレッド104は、メモリ使用量が所定の閾値(一定量)を超えたかを確認する。確認の結果、一定量を超えた場合には(ステップB3のYESルート参照)、ステップB4において、スレッド104はページ移動スレッド101を起動する。 In step B3, the thread 104 confirms whether the memory usage exceeds a predetermined threshold value (constant amount). As a result of the confirmation, when the amount exceeds a certain amount (see the YES route in step B3), the thread 104 activates the page movement thread 101 in step B4.

その後、ステップB5に移行する。また、ステップB1における確認の結果、スレッド104がメモリ領域においてページを確保しない場合も(ステップB1のNOルート参照)、ステップB5に移行する。 After that, the process proceeds to step B5. Further, as a result of the confirmation in step B1, even if the thread 104 does not allocate a page in the memory area (see the NO route in step B1), the process proceeds to step B5.

ステップB5において、スレッド104は、メモリをアクセスしたかを確認する。確認の結果、メモリアクセスがあった場合に(ステップB5のYESルート参照)、ステップB6に移行し、CPUコア毎LRUリスト33を更新する。その後、処理はステップB1に戻る。
また、ステップB3における確認の結果、メモリ使用量が一定量を超えていない場合には(ステップB3のNOルート参照)、ステップB5に移行する。
また、ステップB5における確認の結果、スレッド104によるメモリアクセスがない場合には(ステップB5のNOルート参照)、ステップB1に戻る。
In step B5, thread 104 confirms whether the memory has been accessed. As a result of the confirmation, when there is a memory access (see the YES route in step B5), the process proceeds to step B6, and the LRU list 33 for each CPU core is updated. After that, the process returns to step B1.
If, as a result of the confirmation in step B3, the memory usage does not exceed a certain amount (see the NO route in step B3), the process proceeds to step B5.
Further, as a result of the confirmation in step B5, if there is no memory access by the thread 104 (see the NO route in step B5), the process returns to step B1.

次に、第2実施形態の一例としてのコンピュータシステム1bにおけるページ移動スレッド101による処理を、図15に示すフローチャート(ステップB11〜B13)に従って説明する。なお、ページ移動スレッド101の起動とともに図示しないタイマによる計時が開始される。 Next, the process by the page movement thread 101 in the computer system 1b as an example of the second embodiment will be described with reference to the flowcharts (steps B11 to B13) shown in FIG. At the same time as the page movement thread 101 is activated, time counting by a timer (not shown) is started.

ステップB11において、ページ移動スレッド101は、自身が、当該ページ移動スレッド101を実行しているCPUコア11と同一のCPUコア11(自CPUコア11)によって実行されたスレッド104から起動されたかを確認する。確認の結果、スレッド104から当該ページ移動スレッド101が起動された場合には(ステップB11のYESルート参照)、ステップB13に移行する。 In step B11, the page movement thread 101 confirms whether or not it has been started from the thread 104 executed by the same CPU core 11 (own CPU core 11) as the CPU core 11 executing the page movement thread 101. do. As a result of the confirmation, when the page movement thread 101 is started from the thread 104 (see the YES route in step B11), the process proceeds to step B13.

ステップB13において、ページ移動スレッド101は、CPUコア毎LRUリスト33を参照して、LRUアルゴリズムに基づき移動候補ページを選択する。また、ページ移動スレッド101は、ページ対応テーブル35に対して、移動候補ページに対応するCPUコア番号(OS用LRUリスト32の位置情報)を登録する。
さらに、ページ移動スレッド101は、選択した移動候補ページをOS用LRUリスト32に追加する。また、このタイミングでタイマをリセットしてもよい。
ページ移動スレッド101は、OS付属ページ移動スレッド102を起動させる。その後、処理はステップB11に戻る。
In step B13, the page movement thread 101 refers to the LRU list 33 for each CPU core and selects a movement candidate page based on the LRU algorithm. Further, the page movement thread 101 registers the CPU core number (position information of the OS LRU list 32) corresponding to the movement candidate page in the page correspondence table 35.
Further, the page movement thread 101 adds the selected movement candidate page to the OS LRU list 32. Further, the timer may be reset at this timing.
The page movement thread 101 activates the page movement thread 102 attached to the OS. After that, the process returns to step B11.

また、ステップB11における確認の結果、例えば、スリープ解除のように、スレッド104から起動されたのではなく起動された場合には(ステップB11のNOルート参照)、ステップB12に移行する。 Further, as a result of the confirmation in step B11, for example, when the thread 104 is activated instead of being activated (see the NO route in step B11), as in the case of waking from sleep, the process proceeds to step B12.

ステップB12において、ページ移動スレッド101は、タイマにより計時された時間を参照して、一定時間が経過しているかを確認する。ここで、一定時間が経過していない場合には(ステップB12のNOルート参照)、ステップB11に戻る。
一方、一定時間が経過している場合には(ステップB12のYESルート参照)、ステップB13に移行する。
In step B12, the page movement thread 101 refers to the time clocked by the timer and confirms whether a certain time has elapsed. Here, if a certain time has not passed (see the NO route in step B12), the process returns to step B11.
On the other hand, when a certain time has passed (see the YES route in step B12), the process proceeds to step B13.

次に、第2実施形態の一例としてのコンピュータシステム1bにおけるOS付属ページ移動スレッド102による処理を、図16に示すフローチャート(ステップB21〜B23)に従って説明する。なお、OS付属ページ移動スレッド102の起動とともに図示しないタイマによる計時が開始される。 Next, the processing by the OS-attached page movement thread 102 in the computer system 1b as an example of the second embodiment will be described according to the flowchart (steps B21 to B23) shown in FIG. When the page movement thread 102 attached to the OS is activated, time counting by a timer (not shown) is started.

ステップB21において、OS付属ページ移動スレッド102は、自身が、ページ移動スレッド101から起動されたかを確認する。確認の結果、ページ移動スレッド101から当該OS付属ページ移動スレッド102が起動された場合には(ステップB21のYESルート参照)、ステップB23に移行する。 In step B21, the OS-attached page movement thread 102 confirms whether or not it has been started from the page movement thread 101. As a result of the confirmation, when the page movement thread 102 attached to the OS is started from the page movement thread 101 (see the YES route in step B21), the process proceeds to step B23.

ステップB23において、OS付属ページ移動スレッド102は、OS用LRUリスト32を参照して、LRUアルゴリズムに基づき移動対象ページを選択する。また、OS付属ページ移動スレッド102は、選択した移動対象ページをSSD20に格納する。さらに、OS付属ページ移動スレッド102は、SSD20へ移動済みのページをOS用LRUリスト32から削除する。 In step B23, the OS-attached page move thread 102 selects the move target page based on the LRU algorithm with reference to the OS LRU list 32. Further, the OS-attached page movement thread 102 stores the selected movement target page in the SSD 20. Further, the OS-attached page movement thread 102 deletes the page that has been moved to the SSD 20 from the OS LRU list 32.

また、OS付属ページ移動スレッド102は、SSD20へ移動したページについて、ページ対応テーブル35を参照して、移動済みページに対応するCPUコア番号(OS用LRUリスト32の位置情報)を取得する。そして、OS付属ページ移動スレッド102は、取得したCPUコア番号によって管理されるCPUコア毎LRUリスト33から移動済みページを削除する。また、このタイミングでタイマをリセットしてもよい。その後、処理はステップB21に戻る。 Further, the page movement thread 102 attached to the OS refers to the page correspondence table 35 for the page moved to the SSD 20, and acquires the CPU core number (position information of the LRU list 32 for the OS) corresponding to the moved page. Then, the OS-attached page movement thread 102 deletes the moved page from the LRU list 33 for each CPU core managed by the acquired CPU core number. Further, the timer may be reset at this timing. After that, the process returns to step B21.

また、ステップB21における確認の結果、例えば、スリープ解除のように、ページ移動スレッド101から起動されたのではなく起動された場合には(ステップB21のNOルート参照)、ステップB22に移行する。 Further, as a result of the confirmation in step B21, for example, when the page movement thread 101 is activated instead of being activated (see the NO route in step B21), as in the case of waking from sleep, the process proceeds to step B22.

ステップB22において、OS付属ページ移動スレッド102は、タイマにより計時された時間を参照して、一定時間が経過しているかを確認する。ここで、一定時間が経過していない場合には(ステップB22のNOルート参照)、ステップB21に戻る。
一方、一定時間が経過している場合には(ステップB22のYESルート参照)、ステップB23に移行する。
In step B22, the page movement thread 102 attached to the OS refers to the time clocked by the timer and confirms whether a certain time has elapsed. Here, if a certain time has not passed (see the NO route in step B22), the process returns to step B21.
On the other hand, when a certain time has passed (see the YES route in step B22), the process proceeds to step B23.

(C)効果
このように、第2実施形態の一例としてのコンピュータシステム1bによれば、CPUコア11毎にCPUコア毎LRUリスト33を分散して備えることで、各CPUコア毎LRUリスト33にアクセスするスレッドの数を減少させる。例えば、図13に示す例においては、各CPUコア毎LRUリスト33に対して、自CPUコア11のスレッド104およびページ移動スレッド101と、OS付属ページ移動スレッド102だけがアクセスする。これにより、CPUコア毎LRUリスト33における排他制御のためのロック時間を短縮することができ、スピンロックによるCPUコア11の負荷を軽減させ、アプリケーション性能を向上させることができる。
(C) Effect As described above, according to the computer system 1b as an example of the second embodiment, by providing the LRU list 33 for each CPU core in a distributed manner for each CPU core 11, the LRU list 33 for each CPU core is provided. Reduce the number of threads to access. For example, in the example shown in FIG. 13, only the thread 104 and the page moving thread 101 of the own CPU core 11 and the page moving thread 102 attached to the OS access the LRU list 33 for each CPU core. As a result, the lock time for exclusive control in the LRU list 33 for each CPU core can be shortened, the load on the CPU core 11 due to the spinlock can be reduced, and the application performance can be improved.

OS付属ページ移動スレッド102がページ対応テーブル35を参照することで、移動済みページを削除するCPUコア毎LRUリスト33を容易に知ることができ、CPUコア毎LRUリスト33から移動済みのページを削除することができる。 By referring to the page correspondence table 35, the page movement thread 102 attached to the OS can easily know the LRU list 33 for each CPU core to delete the moved page, and delete the moved page from the LRU list 33 for each CPU core. can do.

[3.第3実施形態の説明]
(A)構成
図17は第3実施形態の一例としてのコンピュータシステム1cの構成を模式的に示す図である。
[3. Explanation of the third embodiment]
(A) Configuration FIG. 17 is a diagram schematically showing a configuration of a computer system 1c as an example of the third embodiment.

この図17に示すように、第3実施形態のコンピュータシステム1cは、第1実施形態のDRAM30において、移動情報テーブル34を削除するものであり、その他の部分は第1実施形態のコンピュータシステム1aと同様に構成されている。
なお、図中、既述の符号と同一の符号は同様の部分を示しているので、その説明は省略する。
図18は第3実施形態の一例としてのコンピュータシステム1cにおけるページ管理方法を説明するための図である。
第3実施形態のコンピュータシステム1cにおいても、CPUコア11毎に、CPUコア毎LRUリスト33を備える。
図18に示す例においては、プロセッサ10に備えらえたCPUコア#0〜#2を図示している。
本第3実施形態のコンピュータシステム1cにおいても、CPUコア11間でデータの共有がないものとする。
As shown in FIG. 17, the computer system 1c of the third embodiment deletes the movement information table 34 in the DRAM 30 of the first embodiment, and the other parts are the computer system 1a of the first embodiment. It is configured in the same way.
In the figure, the same reference numerals as those described above indicate the same parts, and thus the description thereof will be omitted.
FIG. 18 is a diagram for explaining a page management method in the computer system 1c as an example of the third embodiment.
The computer system 1c of the third embodiment also includes an LRU list 33 for each CPU core for each CPU core 11.
In the example shown in FIG. 18, CPU cores # 0 to # 2 provided in the processor 10 are illustrated.
Even in the computer system 1c of the third embodiment, it is assumed that no data is shared between the CPU cores 11.

本第3実施形態のコンピュータシステム1cにおいては、各CPUコア#0〜#2が、それぞれスレッド104,ページ移動スレッド101およびOS付属ページ移動スレッド102を実行する。 In the computer system 1c of the third embodiment, each CPU core # 0 to # 2 executes a thread 104, a page movement thread 101, and an OS-attached page movement thread 102, respectively.

また、各CPUコア#0〜#2が、それぞれOS用LRUリスト32を備える。CPUコア11毎のOS用LRUリスト32は、DRAM30のカーネル領域31に格納されている。 Further, each CPU core # 0 to # 2 includes an OS LRU list 32, respectively. The OS LRU list 32 for each CPU core 11 is stored in the kernel area 31 of the DRAM 30.

さらに、各CPUコア11に対応させて、CPUコア毎LRUリスト33がそれぞれ備えられる。すなわち、CPUコア#0に対応させてCPUコア#0用LRUリスト33−0が、CPUコア#1に対応させてCPUコア#1用LRUリスト33−1が、CPUコア#2に対応させてCPUコア#2用LRUリスト33−2が、それぞれ備えられる。 Further, an LRU list 33 for each CPU core is provided corresponding to each CPU core 11. That is, the LRU list 33-0 for CPU core # 0 corresponds to CPU core # 0, and the LRU list 33-1 for CPU core # 1 corresponds to CPU core # 1 and corresponds to CPU core # 2. LRU list 33-2 for CPU core # 2 is provided respectively.

そして、例えば、CPUコア#0用LRUリスト33−0には、CPUコア#0が実行するスレッド104,ページ移動スレッド101およびOS付属ページ移動スレッド102からアクセスが行なわれる。 Then, for example, the LRU list 33-0 for CPU core # 0 is accessed from the thread 104 executed by the CPU core # 0, the page movement thread 101, and the page movement thread 102 attached to the OS.

すなわち、CPUコア#0用LRUリスト33−0には、CPUコア#0からのみアクセスが行なわれ、他のCPUコア#1〜,#2からのアクセスは発生しない。 That is, the LRU list 33-0 for CPU core # 0 is accessed only from CPU core # 0, and is not accessed from other CPU cores # 1 and # 2.

同様に、CPUコア毎LRUリスト33−1には、CPUコア#1が実行するスレッド104,ページ移動スレッド101およびOS付属ページ移動スレッド102からのアクセスが行なわれる。 Similarly, the LRU list 33-1 for each CPU core is accessed from the thread 104 executed by the CPU core # 1, the page movement thread 101, and the page movement thread 102 attached to the OS.

すなわち、CPUコア#1用LRUリスト33−1には、CPUコア#1からのみアクセスが行なわれ、他のCPUコア#0,#2からのアクセスは発生しない。 That is, the LRU list 33-1 for CPU core # 1 is accessed only from CPU core # 1, and access from other CPU cores # 0 and # 2 does not occur.

また、CPUコア毎LRUリスト33−2には、CPUコア#2が実行するスレッド104,ページ移動スレッド101およびOS付属ページ移動スレッド102からのアクセスが行なわれる。 Further, the LRU list 33-2 for each CPU core is accessed from the thread 104 executed by the CPU core # 2, the page movement thread 101, and the page movement thread 102 attached to the OS.

すなわち、CPUコア#2用LRUリスト33−2には、CPUコア#2からのみアクセスが行なわれ、他のCPUコア#0,#1からのアクセスは発生しない。
ここで、第3実施形態のコンピュータシステム1cにおけるページ管理手法を、CPUコア#0において行なわれる処理を例に説明する。
That is, the LRU list 33-2 for CPU core # 2 is accessed only from CPU core # 2, and access from other CPU cores # 0 and # 1 does not occur.
Here, the page management method in the computer system 1c of the third embodiment will be described by taking the processing performed in the CPU core # 0 as an example.

CPUコア#0は、スレッド104を実行することで演算処理を実現する。スレッド104は、CPUコア#0用LRUリスト33−0に対してアクセスフラグの更新や新規ページの追加等の処理を行なう(図18の符号S21参照)。 CPU core # 0 realizes arithmetic processing by executing thread 104. Thread 104 performs processing such as updating the access flag and adding a new page to the LRU list 33-0 for CPU core # 0 (see reference numeral S21 in FIG. 18).

CPUコア#0は、ページ移動スレッド101を実行することで、CPUコア#0用LRUリスト33−0を参照し、このCPUコア#0用LRUリスト33に登録されたページの中から、LRUアルゴリズムに基づき移動候補ページを選択する(図18の符号S22参照)。
ページ移動スレッド101は、選択した移動候補ページを、CPUコア#0が管理するOS用LRUリスト32に追加する(図18の符号S23参照)。
The CPU core # 0 refers to the LRU list 33-0 for the CPU core # 0 by executing the page movement thread 101, and the LRU algorithm is selected from the pages registered in the LRU list 33 for the CPU core # 0. Select a move candidate page based on (see reference numeral S22 in FIG. 18).
The page movement thread 101 adds the selected movement candidate page to the OS LRU list 32 managed by the CPU core # 0 (see reference numeral S23 in FIG. 18).

CPUコア#0は、OS付属ページ移動スレッド102を実行することで、OS用LRUリスト32を参照し、このOS用LRUリスト32に登録された移動候補ページの中から、LRUアルゴリズムに基づき移動対象ページを選択する(図18の符号S24参照)。 そして、OS付属ページ移動スレッド102は、選択した移動対象ページをSSD20に移動させる(図18の符号S25参照)。 The CPU core # 0 refers to the LRU list 32 for the OS by executing the page movement thread 102 attached to the OS, and is a movement target based on the LRU algorithm from the movement candidate pages registered in the LRU list 32 for the OS. Select a page (see reference numeral S24 in FIG. 18). Then, the OS-attached page movement thread 102 moves the selected movement target page to the SSD 20 (see reference numeral S25 in FIG. 18).

OS付属ページ移動スレッド102は、自CPUコア#0が管理するCPUコア毎LRUリスト33から、移動済みページ対応テーブル35を削除する(図18の符号S26参照)。
他のCPUコア11においても同様の処理が行なわれる。
The OS-attached page movement thread 102 deletes the moved page correspondence table 35 from the LRU list 33 for each CPU core managed by the own CPU core # 0 (see reference numeral S26 in FIG. 18).
Similar processing is performed on the other CPU core 11.

第3実施形態のコンピュータシステム1cにおいて、OS付属ページ移動スレッド102は、複数のCPUコア11毎に、OS用LRUリスト32と、SSD20に移動させたページをCPUコア毎LRUリスト33から削除する削除処理部に相当する。 In the computer system 1c of the third embodiment, the OS-attached page moving thread 102 deletes the OS LRU list 32 and the page moved to the SSD 20 from the CPU core LRU list 33 for each of the plurality of CPU cores 11. Corresponds to the processing unit.

(B)動作
上述の如く構成された第3実施形態の一例としてのコンピュータシステム1cにおけるスレッド104によるCPUコア毎LRUリスト33の更新処理を、図19に示すフローチャート(ステップC1〜C6)に従って説明する。
(B) Operation The update process of the LRU list 33 for each CPU core by the thread 104 in the computer system 1c as an example of the third embodiment configured as described above will be described with reference to the flowcharts (steps C1 to C6) shown in FIG. ..

ステップC1において、スレッド104は、メモリ領域においてページを確保するかを確認する。確認の結果、ページを確保する場合には(ステップC1のYESルート参照)、ステップC2に移行する。
ステップC2において、スレッド104は、ページをスレッド104に割り当て、CPUコア毎LRUリスト33を更新する。
In step C1, thread 104 confirms whether to allocate a page in the memory area. As a result of the confirmation, when the page is secured (see the YES route in step C1), the process proceeds to step C2.
In step C2, thread 104 allocates pages to thread 104 and updates the LRU list 33 for each CPU core.

ステップC3において、スレッド104は、メモリ使用量が所定の閾値(一定量)を超えたかを確認する。確認の結果、一定量を超えた場合には(ステップC3のYESルート参照)、ステップC4において、スレッド104はページ移動スレッド101を起動する。 In step C3, the thread 104 confirms whether the memory usage exceeds a predetermined threshold value (constant amount). As a result of the confirmation, when the amount exceeds a certain amount (see the YES route in step C3), the thread 104 activates the page movement thread 101 in step C4.

その後、ステップC5に移行する。また、ステップC1における確認の結果、スレッド104がメモリ領域においてページを確保しない場合も(ステップC1のNOルート参照)、ステップC5に移行する。 After that, the process proceeds to step C5. Further, as a result of the confirmation in step C1, even if the thread 104 does not allocate a page in the memory area (see the NO route in step C1), the process proceeds to step C5.

ステップC5において、スレッド104は、メモリをアクセスしたかを確認する。確認の結果、メモリアクセスがあった場合に(ステップC5のYESルート参照)、ステップC6に移行し、CPUコア毎LRUリスト33を更新する。その後、処理はステップC1に戻る。
また、ステップC3における確認の結果、メモリ使用量が一定量を超えていない場合には(ステップC3のNOルート参照)、ステップC5に移行する。
また、ステップC5における確認の結果、スレッド104によるメモリアクセスがない場合には(ステップC5のNOルート参照)、ステップC1に戻る。
In step C5, thread 104 confirms whether the memory has been accessed. As a result of the confirmation, when there is a memory access (see the YES route in step C5), the process proceeds to step C6, and the LRU list 33 for each CPU core is updated. After that, the process returns to step C1.
If, as a result of the confirmation in step C3, the memory usage does not exceed a certain amount (see the NO route in step C3), the process proceeds to step C5.
Further, as a result of the confirmation in step C5, if there is no memory access by the thread 104 (see the NO route in step C5), the process returns to step C1.

次に、第3実施形態の一例としてのコンピュータシステム1cにおけるページ移動スレッド101による処理を、図20に示すフローチャート(ステップC11〜C13)に従って説明する。なお、ページ移動スレッド101の起動とともに図示しないタイマによる計時が開始される。 Next, the process by the page movement thread 101 in the computer system 1c as an example of the third embodiment will be described with reference to the flowcharts (steps C11 to C13) shown in FIG. At the same time as the page movement thread 101 is activated, time counting by a timer (not shown) is started.

ステップC11において、ページ移動スレッド101は、自身が、当該ページ移動スレッド101を実行しているCPUコア11と同一のCPUコア11(自CPUコア11)によって実行されたスレッド104から起動されたかを確認する。確認の結果、スレッド104から当該ページ移動スレッド101が起動された場合には(ステップC11のYESルート参照)、ステップC13に移行する。 In step C11, the page movement thread 101 confirms whether or not it has been started from the thread 104 executed by the same CPU core 11 (own CPU core 11) as the CPU core 11 executing the page movement thread 101. do. As a result of the confirmation, when the page movement thread 101 is started from the thread 104 (see the YES route in step C11), the process proceeds to step C13.

ステップC13において、ページ移動スレッド101は、CPUコア毎LRUリスト33を参照して、LRUアルゴリズムに基づき移動候補ページを選択する。また、ページ移動スレッド101は、選択した移動候補ページをOS用LRUリスト32に追加する。さらに、ページ移動スレッド101は、自CPUコア11のOS付属ページ移動スレッド102を起動させる。また、このタイミングでタイマをリセットしてもよい。その後、処理はステップC11に戻る。 In step C13, the page movement thread 101 refers to the LRU list 33 for each CPU core and selects a movement candidate page based on the LRU algorithm. Further, the page movement thread 101 adds the selected movement candidate page to the OS LRU list 32. Further, the page movement thread 101 activates the OS-attached page movement thread 102 of the own CPU core 11. Further, the timer may be reset at this timing. After that, the process returns to step C11.

また、ステップC11における確認の結果、例えば、スリープ解除のように、スレッド104から起動されたのではなく起動された場合には(ステップC11のNOルート参照)、ステップC12に移行する。 Further, as a result of the confirmation in step C11, for example, when the thread 104 is started instead of being started as in the case of waking up from sleep (see the NO route in step C11), the process proceeds to step C12.

ステップC12において、ページ移動スレッド101は、タイマにより計時された時間を参照して、一定時間が経過しているかを確認する。ここで、一定時間が経過していない場合には(ステップC12のNOルート参照)、ステップC11に戻る。
一方、一定時間が経過している場合には(ステップC12のYESルート参照)、ステップC13に移行する。
In step C12, the page movement thread 101 refers to the time clocked by the timer and confirms whether a certain time has elapsed. Here, if a certain time has not passed (see the NO route in step C12), the process returns to step C11.
On the other hand, when a certain time has passed (see the YES route in step C12), the process proceeds to step C13.

次に、第3実施形態の一例としてのコンピュータシステム1cにおけるOS付属ページ移動スレッド102による処理を、図21に示すフローチャート(ステップC21〜C23)に従って説明する。なお、OS付属ページ移動スレッド102の起動とともに図示しないタイマによる計時が開始される。 Next, the processing by the OS-attached page movement thread 102 in the computer system 1c as an example of the third embodiment will be described with reference to the flowcharts (steps C21 to C23) shown in FIG. When the page movement thread 102 attached to the OS is activated, time counting by a timer (not shown) is started.

ステップC21において、OS付属ページ移動スレッド102は、自身が、ページ移動スレッド101から起動されたかを確認する。確認の結果、ページ移動スレッド101から当該OS付属ページ移動スレッド102が起動された場合には(ステップC21のYESルート参照)、ステップC23に移行する。 In step C21, the OS-attached page movement thread 102 confirms whether or not it has been started from the page movement thread 101. As a result of the confirmation, when the page movement thread 102 attached to the OS is started from the page movement thread 101 (see the YES route in step C21), the process proceeds to step C23.

ステップC23において、OS付属ページ移動スレッド102は、自CPUコア11のOS用LRUリスト32を参照して、LRUアルゴリズムに基づき移動対象ページを選択する。また、OS付属ページ移動スレッド102は、選択した移動対象ページをSSD20に格納する。さらに、OS付属ページ移動スレッド102は、SSD20へ移動済みのページを自CPUコア11のOS用LRUリスト32から削除する。また、このタイミングでタイマをリセットしてもよい。その後、処理はステップC21に戻る。 In step C23, the OS-attached page move thread 102 selects the move target page based on the LRU algorithm with reference to the OS LRU list 32 of the own CPU core 11. Further, the OS-attached page movement thread 102 stores the selected movement target page in the SSD 20. Further, the OS-attached page movement thread 102 deletes the page that has been moved to the SSD 20 from the OS LRU list 32 of the own CPU core 11. Further, the timer may be reset at this timing. After that, the process returns to step C21.

また、ステップC21における確認の結果、例えば、スリープ解除のように、ページ移動スレッド101から起動されたのではなく起動された場合には(ステップC21のNOルート参照)、ステップC22に移行する。 Further, as a result of the confirmation in step C21, for example, when the page movement thread 101 is activated instead of being activated (see the NO route in step C21), as in the case of waking from sleep, the process proceeds to step C22.

ステップC22において、OS付属ページ移動スレッド102は、タイマにより計時された時間を参照して、一定時間が経過しているかを確認する。ここで、一定時間が経過していない場合には(ステップC22のNOルート参照)、ステップC21に戻る。
一方、一定時間が経過している場合には(ステップC22のYESルート参照)、ステップC23に移行する。
In step C22, the page movement thread 102 attached to the OS refers to the time clocked by the timer and confirms whether a certain time has elapsed. Here, if a certain time has not elapsed (see the NO route in step C22), the process returns to step C21.
On the other hand, when a certain time has passed (see the YES route in step C22), the process proceeds to step C23.

(C)効果
このように、第3実施形態の一例としてのコンピュータシステム1cによれば、CPUコア11毎にCPUコア毎LRUリスト33を分散して備えるとともに、各CPUコア毎LRUリスト33の制御をCPUコア11毎に独立して行なう。これにより、CPUコア毎LRUリスト33に対しては、自CPUコア11からのみアクセスが行なわれ、他のCPUコア11からのアクセスがない。これにより、CPUコア毎LRUリスト33に対する排他制御を行なう必要がなく、スピンロックが不要となる。これにより、ページ移動処理によるプロセッサ10の負荷を軽減し、アプリケーションの処理性能が向上する。
(C) Effect As described above, according to the computer system 1c as an example of the third embodiment, the LRU list 33 for each CPU core is distributed and provided for each CPU core 11, and the LRU list 33 for each CPU core is controlled. Is performed independently for each CPU core 11. As a result, the LRU list 33 for each CPU core is accessed only from the own CPU core 11, and is not accessed from other CPU cores 11. As a result, it is not necessary to perform exclusive control on the LRU list 33 for each CPU core, and spinlock is not required. As a result, the load on the processor 10 due to the page movement processing is reduced, and the processing performance of the application is improved.

[4.その他]
開示の技術は上述した実施形態に限定されるものではなく、本実施形態の趣旨を逸脱しない範囲で種々変形して実施することができる。本実施形態の各構成および各処理は、必要に応じて取捨選択することができ、あるいは適宜組み合わせてもよい。
[4. others]
The disclosed technique is not limited to the above-described embodiment, and can be variously modified and implemented without departing from the spirit of the present embodiment. Each configuration and each process of the present embodiment can be selected as necessary, or may be combined as appropriate.

例えば、上述した実施形態においては、コンピュータシステム1がSSD20を備え、このSSD20を低速メモリとして用いているが、これに限定されるものではない。低速メモリとしてSSD20以外のストレージ装置を用いてもよく、種々変形して実施することができる。 For example, in the above-described embodiment, the computer system 1 includes an SSD 20 and uses the SSD 20 as a low-speed memory, but the present invention is not limited to this. A storage device other than the SSD 20 may be used as the low-speed memory, and various modifications can be made.

また、上述した実施形態においては、SSD20に移動させるページをLRUアルゴリズムに基づいて選択する例を示したが、これに限定されるものではない。SSD20に移動させるページは、例えば、FIFO(First In, First Out)等の他のアルゴリズムに
基づいて選択してもよい。
Further, in the above-described embodiment, an example in which the page to be moved to the SSD 20 is selected based on the LRU algorithm is shown, but the present invention is not limited to this. The page to be moved to SSD 20 may be selected based on other algorithms such as FIFO (First In, First Out).

さらに、上述した実施形態においては、OS用LRUリスト32およびCPUコア毎LRUリスト33をDRAM30のカーネル領域31に格納している。すなわち、DRAM30のカーネル領域31が、第1管理情報記憶領域および第2管理情報記憶領域として機能しているが、これに限定されるものではない。例えば、OS用LRUリスト32およびCPUコア毎LRUリスト33の少なくともいずれかをDRAM30のユーザ領域36やSSD20等他の記憶領域に格納しもよく、種々変形して実施することができる。
また、上述した開示により本実施形態を当業者によって実施・製造することが可能である。
Further, in the above-described embodiment, the OS LRU list 32 and the CPU core LRU list 33 are stored in the kernel area 31 of the DRAM 30. That is, the kernel area 31 of the DRAM 30 functions as the first management information storage area and the second management information storage area, but is not limited thereto. For example, at least one of the OS LRU list 32 and the CPU core LRU list 33 may be stored in another storage area such as the user area 36 of the DRAM 30 or the SSD 20, and can be modified in various ways.
Further, according to the above-mentioned disclosure, it is possible for a person skilled in the art to carry out and manufacture the present embodiment.

[4.第4実施形態の説明]
上述した各実施形態のコンピュータシステム1a〜1cにおいては、CPUコア11毎にCPUコア毎LRUリスト33が備えられている。そして、各CPUコア毎LRUリスト33には、自身が備えられたCPUコア11からのみアクセスが行なわれ、他のCPUコア11からのアクセスは発生しない。これにより、CPUコア11間でキャッシュの容量の再分配ができない。
[4. Description of Fourth Embodiment]
In the computer systems 1a to 1c of each of the above-described embodiments, the LRU list 33 for each CPU core is provided for each CPU core 11. Then, the LRU list 33 for each CPU core is accessed only from the CPU core 11 provided with the LRU list 33, and access from other CPU cores 11 does not occur. As a result, the cache capacity cannot be redistributed between the CPU cores 11.

例えば、CPUコア#0とCPUコア#2とを備える2CPUコア構成において、CPUコア#0のメモリアクセス頻度が低いとする。このような場合に、CPUコア#1が新たにキャッシュを確保するとき、キャッシュ30aに空きがなかった場合にはいずれかのページをSSD20に移動させることになる。 For example, in a two-CPU core configuration including CPU core # 0 and CPU core # 2, it is assumed that the memory access frequency of CPU core # 0 is low. In such a case, when the CPU core # 1 newly secures the cache, if there is no free space in the cache 30a, one of the pages is moved to the SSD 20.

しかしながら、CPUコア#0にアクセス頻度が低いページがあったとしても、CPUコア#1はCPUコア#0のCPUコア毎LRUリスト33を操作することができないためCPUコア#0のキャッシュをSSD20に移動させることができず、CPU#1のキャッシュからページをSSD20に移動させることになる。 However, even if the CPU core # 0 has a page with a low access frequency, the CPU core # 1 cannot operate the LRU list 33 for each CPU core of the CPU core # 0, so that the cache of the CPU core # 0 is set to the SSD 20. It cannot be moved, and the page is moved from the cache of CPU # 1 to SSD20.

CPUコア#0およびCPUコア#1のキャッシュ容量は、サーバ起動時はそれぞれゼロである。サーバ起動後、各CPUコア#0,#1がそれぞれ早い者勝ちでキャッシュを取りに行き、最終的にキャッシュの空き容量が枯渇した時点でのCPUコア#0,#1の各キャッシュ確保量が各CPUコア#0,#1の初期のキャッシュ容量となる。なお、初期状態が最適な割合ではない場合には、キャッシュ再分配を行なうことが望ましい。
なお、CPUコア間のキャッシュ容量の再分配を行なう従来方法として、各CPUコアのキャッシュミス頻度を指標として用いる手法が知られている。
The cache capacities of CPU core # 0 and CPU core # 1 are zero when the server is started. After the server is started, each CPU core # 0 and # 1 goes to get the cache on a first-come, first-served basis, and when the free space of the cache is finally exhausted, the amount of each cache secured by the CPU cores # 0 and # 1 is increased. This is the initial cache capacity of each CPU core # 0 and # 1. If the initial state is not the optimum ratio, it is desirable to redistribute the cache.
As a conventional method for redistributing the cache capacity between CPU cores, a method using the cache miss frequency of each CPU core as an index is known.

すなわち、キャッシュミス頻度が低いCPUコアのキャッシュを1ページ分解放し、キャッシュミス頻度が高いCPUコアのキャッシュを1ページ分増やすことを繰り返すことで、最適なキャッシュ容量に徐々に近づけるようにキャッシュの再分配を行なう。
しかし、このような従来手法においては、最適なキャッシュ容量になるまでに長い時間がかかり、その間の性能低下が問題になる。
本第4実施形態に示すコンピュータシステム1dにおいては、キャッシュ容量の再分配の時間の短縮を実現する。
That is, by repeatedly releasing the cache of the CPU core having a low cache miss frequency for one page and increasing the cache of the CPU core having a high cache miss frequency by one page, the cache is gradually approached to the optimum cache capacity. Redistribute.
However, in such a conventional method, it takes a long time to reach the optimum cache capacity, and the performance deterioration during that period becomes a problem.
In the computer system 1d shown in the fourth embodiment, the time for redistributing the cache capacity can be shortened.

(A)構成
図22は第4実施形態の一例としてのコンピュータシステム1dの機能構成を例示する図である。
(A) Configuration FIG. 22 is a diagram illustrating a functional configuration of a computer system 1d as an example of the fourth embodiment.

この図22に例示するコンピュータシステム1dは、図6に示した第1実施形態のコンピュータシステム1aに加えて、キャッシュ再分配処理部40を備える。なお、図22においては、図6に示したコンピュータシステム1aの一部の構成の図示を省略している。
また、本第4実施形態のコンピュータシステム1dは、図1に例示した第1実施形態のコンピュータシステム1aと同様のハードウェア構成を有する。
――キャッシュ再分配処理部40――
キャッシュ再分配処理部40は、各CPUコア11の要求メモリ容量とキャッシュミス頻度の情報とを用いてキャッシュ容量を再分配する。
キャッシュ再分配処理部40は、要求メモリ容量集計部41,キャッシュミス頻度集計部42およびキャッシュ再分配判定部43としての機能を備える。
キャッシュ再分配処理部40としての機能は、例えば、CPUコア#0〜#3のうち、予めプライマリとして設定されたいずれかのCPUコア11が実現する。
――キャッシュ容量テーブル44――
The computer system 1d illustrated in FIG. 22 includes a cache redistribution processing unit 40 in addition to the computer system 1a of the first embodiment shown in FIG. In FIG. 22, the illustration of a part of the configuration of the computer system 1a shown in FIG. 6 is omitted.
Further, the computer system 1d of the fourth embodiment has the same hardware configuration as the computer system 1a of the first embodiment illustrated in FIG.
--Cache redistribution processing unit 40--
The cache redistribution processing unit 40 redistributes the cache capacity using the requested memory capacity of each CPU core 11 and the information on the cache miss frequency.
The cache redistribution processing unit 40 has functions as a request memory capacity totaling unit 41, a cache miss frequency totaling unit 42, and a cache redistribution determination unit 43.
The function as the cache redistribution processing unit 40 is realized by, for example, any CPU core 11 preset as the primary among the CPU cores # 0 to # 3.
--Cache capacity table 44--

キャッシュ容量テーブル44は、各CPUコア11のキャッシュ容量の値(キャッシュ容量値)を保持する。キャッシュ容量値は、キャッシュ30aにおける各CPUコア11に割り当てられた記憶領域のサイズであり、キャッシュ30aにおける各CPUコア11が使用可能なメモリサイズを示す。
各CPUコア11のページ移動スレッド101は、このキャッシュ容量テーブル44から読み出したキャッシュ容量値を用いて移動候補ページを管理する。
The cache capacity table 44 holds a value (cache capacity value) of the cache capacity of each CPU core 11. The cache capacity value is the size of the storage area allocated to each CPU core 11 in the cache 30a, and indicates the memory size that can be used by each CPU core 11 in the cache 30a.
The page movement thread 101 of each CPU core 11 manages movement candidate pages using the cache capacity value read from the cache capacity table 44.

ページ移動スレッド101は、キャッシュ容量テーブル44から自身が備えられたCPUコア11(自CPUコア11)に対応するキャッシュ容量値を読み出し、自CPUコア11のキャッシュ容量がこのキャッシュ容量値を超えることがないように、ページ移動処理を行なう。
キャッシュ容量テーブル44を構成する情報は、例えば、DRAM30のカーネル領域31に格納される。
――要求メモリ容量集計部41――
The page movement thread 101 reads the cache capacity value corresponding to the CPU core 11 (own CPU core 11) provided by itself from the cache capacity table 44, and the cache capacity of the own CPU core 11 may exceed this cache capacity value. Perform page movement processing so that there is no such thing.
The information constituting the cache capacity table 44 is stored in, for example, the kernel area 31 of the DRAM 30.
--Required memory capacity totaling unit 41--

要求メモリ容量集計部41には、各CPUコア11のスレッド104がメモリ確保要求やメモリ解放要求(APIの読み出し)を行なうと、これらの情報が入力される。APIはApplication Programming Interfaceの略語である。 When the thread 104 of each CPU core 11 makes a memory allocation request or a memory release request (reading the API), the requested memory capacity totaling unit 41 is input with such information. API is an abbreviation for Application Programming Interface.

要求メモリ容量集計部41は、CPUコア11毎の要求メモリ容量を積算する。要求メモリ容量集計部41は、スレッドからメモリを確保するAPIが呼ばれたときのメモリ容量の情報を用いて、CPUコア11毎の要求メモリ容量を積算していく。
メモリ容量の情報としては、例えば、動的メモリを確保するmalloc関数の引数に含まれるメモリサイズを用いてもよい。なお、要求メモリ容量の情報の取得は、malloc関数の引数を用いる手法に限定されるものではなく、適宜変形して実施することができる。
要求メモリ容量集計部41は、スレッドがメモリを解放するAPIを呼んだときは、当該スレッドが解放するメモリ容量を要求メモリ容量から減算する。
要求メモリ容量集計部41が算出するCPUコア11毎の要求メモリ容量は、例えば、DRAM30のカーネル領域31に格納される。
――キャッシュミス頻度集計部42――
The request memory capacity totaling unit 41 integrates the request memory capacity for each CPU core 11. The requested memory capacity totaling unit 41 integrates the requested memory capacity for each CPU core 11 by using the information of the memory capacity when the API for securing the memory is called from the thread.
As the memory capacity information, for example, the memory size included in the argument of the malloc function that allocates the dynamic memory may be used. The acquisition of the requested memory capacity information is not limited to the method using the argument of the malloc function, and can be appropriately modified and executed.
When the thread calls the API to release the memory, the requested memory capacity totaling unit 41 subtracts the memory capacity released by the thread from the requested memory capacity.
The requested memory capacity for each CPU core 11 calculated by the requested memory capacity totaling unit 41 is stored in, for example, the kernel area 31 of the DRAM 30.
--Cash miss frequency totaling unit 42--

キャッシュミス頻度集計部42は、CPUコア11毎のキャッシュミス数をカウントする。キャッシュミス頻度集計部42は、例えば、スレッドによるメモリアクセス時にページフォールト(page fault)割り込みが発生すると、キャッシュミスが発生した旨の判定(キャッシュミス判定)を行なう。キャッシュミス頻度集計部42は、キャッシュミス判定を行なうと、当該キャッシュミスが生じたCPUコア11に対してキャッシュミス数をカウントアップ(インクリメント)する。 The cache miss frequency totaling unit 42 counts the number of cache misses for each CPU core 11. For example, when a page fault interrupt occurs during memory access by a thread, the cache miss frequency totaling unit 42 determines that a cache miss has occurred (cache miss determination). When the cache miss frequency totaling unit 42 determines the cache miss, the cache miss frequency totaling unit 42 counts up (increments) the number of cache misses with respect to the CPU core 11 in which the cache miss has occurred.

キャッシュミス頻度集計部42は、CPUコア11毎に、所定時間毎のキャッシュミス数(キャッシュミス頻度)を集計する。なお、キャッシュミス頻度は、後述するキャッシュ再分配判定部43により所定時間が経過毎にクリアされる。 The cache miss frequency totaling unit 42 totals the number of cache misses (cache miss frequency) for each predetermined time for each CPU core 11. The cache miss frequency is cleared every time a predetermined time elapses by the cache redistribution determination unit 43 described later.

キャッシュミス頻度集計部42によって計数されるCPUコア11毎のキャッシュミス数(キャッシュミス頻度)は、例えば、DRAM30のカーネル領域31に格納される。 The number of cache misses (cache miss frequency) for each CPU core 11 counted by the cache miss frequency totaling unit 42 is stored in, for example, the kernel area 31 of the DRAM 30.

――キャッシュ再分配判定部43――
キャッシュ再分配判定部43は、各CPUコア11の要求メモリ容量とキャッシュミス頻度の情報とに基づき、再分配するキャッシュ容量(再分配キャッシュサイズ)を判定する。
--Cash redistribution judgment unit 43--
The cache redistribution determination unit 43 determines the cache capacity to be redistributed (redistribution cache size) based on the requested memory capacity of each CPU core 11 and the information on the cache miss frequency.

キャッシュ再分配判定部43は、例えば、一定時間毎に、複数のCPUコア11間において、キャッシュミス頻度の最大値と最小値との比を確認し、この比が一定値(閾値)以上である場合にキャッシュの再分配を実施する。 The cache redistribution determination unit 43 confirms the ratio of the maximum value and the minimum value of the cache miss frequency among the plurality of CPU cores 11 at regular time intervals, and this ratio is equal to or higher than the constant value (threshold value). If so, redistribute the cache.

キャッシュ再分配判定部43は、キャッシュの再分配を行なうCPUコア11と、再分配するメモリ容量を決定し、この決定したメモリ容量を用いてキャッシュ容量テーブル44を更新する。一定時間ごとにキャッシュミス頻度集計部42が集計するキャッシュミス頻度の値をクリアする。
図23は第4実施形態の一例としてのコンピュータシステム1dのキャッシュ再分配判定部43の処理を説明するための図である。
図23においては、CPUコア#0〜#2のそれぞれについて、キャッシュ容量,要求メモリ容量およびキャッシュミス頻度を例示している。
キャッシュ再分配判定部43は、キャッシュミス頻度の最大値と最小値の比が一定以上(例えば、3以上)のときにキャッシュ再分配を実行する。
The cache redistribution determination unit 43 determines the CPU core 11 that redistributes the cache and the memory capacity to be redistributed, and updates the cache capacity table 44 using the determined memory capacity. The value of the cache miss frequency totaled by the cache miss frequency totaling unit 42 is cleared at regular time intervals.
FIG. 23 is a diagram for explaining the processing of the cache redistribution determination unit 43 of the computer system 1d as an example of the fourth embodiment.
In FIG. 23, the cache capacity, the requested memory capacity, and the cache miss frequency are illustrated for each of the CPU cores # 0 to # 2.
The cache redistribution determination unit 43 executes cache redistribution when the ratio of the maximum value and the minimum value of the cache miss frequency is a certain value or more (for example, 3 or more).

図23に示す例においては、CPUコア#0のキャッシュミス頻度“400”が最大値であり、CPUコア#1のキャッシュミス頻度“100”が最小値である。これらのキャッシュミス頻度の比4(=400÷100)は閾値“3”以上であるので、キャッシュ再分配判定部43は、キャッシュ再分配を実施すると決定する。 In the example shown in FIG. 23, the cache miss frequency “400” of CPU core # 0 is the maximum value, and the cache miss frequency “100” of CPU core # 1 is the minimum value. Since the ratio 4 (= 400 ÷ 100) of these cache miss frequencies is equal to or higher than the threshold value “3”, the cache redistribution determination unit 43 determines that the cache redistribution is to be performed.

また、キャッシュ再分配判定部43は、キャッシュ再分配において、キャッシュミス頻度が最も低いCPUコア11(CPU_L)をキャッシュ容量の移動元と決定し、キャッシュミス頻度が最も高いCPUコア11(CPU_H)をキャッシュ容量の移動先と決定する。 Further, the cache redistribution determination unit 43 determines that the CPU core 11 (CPU_L) having the lowest cache miss frequency is the transfer source of the cache capacity in the cache redistribution, and the CPU core 11 (CPU_H) having the highest cache miss frequency is used. Determine the destination to move the cache capacity.

図23に示す例においては、キャッシュ再分配判定部43は、キャッシュミス頻度が最も低いCPUコア#1をキャッシュ容量の移動元と決定し、キャッシュミス頻度が最も高いCPUコア#0をキャッシュ容量の移動先と決定する。
キャッシュ再分配判定部43は、キャッシュ再分配において、キャッシュミス頻度が最も低いCPUコア11(CPU_L)から、キャッシュミス頻度が最も高いCPUコア11(CPU_H)にキャッシュ容量を移動する。
In the example shown in FIG. 23, the cache redistribution determination unit 43 determines that the CPU core # 1 having the lowest cache miss frequency is the transfer source of the cache capacity, and the CPU core # 0 having the highest cache miss frequency is the cache capacity. Determine the destination.
In cache redistribution, the cache redistribution determination unit 43 moves the cache capacity from the CPU core 11 (CPU_L) having the lowest cache miss frequency to the CPU core 11 (CPU_H) having the highest cache miss frequency.

また、キャッシュ再分配判定部43は、再分配により移動元のCPUコア11から移動先のCPUコア11へ移動させるキャッシュ容量(再分配キャッシュサイズ)を決定する。 Further, the cache redistribution determination unit 43 determines the cache capacity (redistribution cache size) to be moved from the movement source CPU core 11 to the movement destination CPU core 11 by redistribution.

キャッシュ再分配判定部43は、移動元のCPUコア11の要求メモリ容量と移動先のCPUコア11の要求メモリ容量との比(要求メモリ容量比)に基づいて、再分配により移動させるデータのページ数(移動ページ数)を決定する。例えば、キャッシュ再分配判定部43は、以下に示す式(1)に基づいて、移動ページ数を算出する。
移動ページ数 =移動先の要求メモリ容量 /移動元の要求メモリ容量 ・・・(1)
The cache redistribution determination unit 43 is a page of data to be moved by redistribution based on the ratio (required memory capacity ratio) between the required memory capacity of the CPU core 11 of the movement source and the required memory capacity of the CPU core 11 of the movement destination. Determine the number (number of pages moved). For example, the cache redistribution determination unit 43 calculates the number of moved pages based on the following equation (1).
Number of pages to move = Required memory capacity of move destination / Required memory capacity of move source ・ ・ ・ (1)

図23に示す例においては、移動先のCPUコア11の要求メモリ容量が“20G”であり、移動先のCPUコア11の要求メモリ容量が“2G”であるので、キャッシュ再分配判定部43は、移動ページ数を、式(1)に基づき以下に示すように算出する。
移動ページ数 =20/2 = 10(ページ)
In the example shown in FIG. 23, since the required memory capacity of the destination CPU core 11 is “20G” and the required memory capacity of the destination CPU core 11 is “2G”, the cache redistribution determination unit 43 , The number of moved pages is calculated as shown below based on the equation (1).
Number of pages moved = 20/2 = 10 (pages)

そして、キャッシュ再分配判定部43は、算出した移動ページ数(例えば、10ページ)にページのデータサイズ(例えば、4KB)を乗算することで、再分配キャッシュサイズ(例えば、40KB)を決定する。 Then, the cache redistribution determination unit 43 determines the redistribution cache size (for example, 40KB) by multiplying the calculated number of moved pages (for example, 10 pages) by the page data size (for example, 4KB).

キャッシュ再分配判定部43は算出した再分配キャッシュサイズを用いてキャッシュ容量テーブル44を更新する。具体的には、キャッシュ再分配判定部43は、キャッシュ容量テーブル44における移動元のCPUコア11のキャッシュ容量値から算出した再分配キャッシュサイズを減算するとともに、移動先のCPUコア11のキャッシュ容量値に当該再分配キャッシュサイズを加算する。 The cache redistribution determination unit 43 updates the cache capacity table 44 using the calculated redistribution cache size. Specifically, the cache redistribution determination unit 43 subtracts the redistribution cache size calculated from the cache capacity value of the move source CPU core 11 in the cache capacity table 44, and also subtracts the cache capacity value of the move destination CPU core 11. Add the redistribution cache size to.

すなわち、キャッシュ再分配判定部43は、移動元のCPUコア11と移動先のCPUコア11との要求メモリ容量の比率に応じて、再分配キャッシュサイズを決定する。
ページ移動スレッド101は、移動ページ分の移動対象ページを選択し、この移動ページ分の移動対象ページを一度にSSD20に格納する。
これにより、キャッシュ容量を1ページずつ移動するよりも短時間で再分配を完了することができる。
That is, the cache redistribution determination unit 43 determines the redistribution cache size according to the ratio of the requested memory capacity of the CPU core 11 of the movement source and the CPU core 11 of the movement destination.
The page movement thread 101 selects the movement target page for the movement page, and stores the movement target page for the movement page in the SSD 20 at a time.
As a result, the redistribution can be completed in a shorter time than moving the cache capacity page by page.

(B)動作
上述の如く構成された第4実施形態の一例としてのコンピュータシステム1dにおけるページ移動処理を図24に示すフローチャート(ステップD1〜D9)に従って説明する。なお、ページ移動スレッド101の起動とともに図示しないタイマによる計時が開始される。
(B) Operation The page movement process in the computer system 1d as an example of the fourth embodiment configured as described above will be described with reference to the flowcharts (steps D1 to D9) shown in FIG. At the same time as the page movement thread 101 is activated, time counting by a timer (not shown) is started.

ステップD1において、要求メモリ容量集計部41は、スレッド104がメモリを要求(メモリ確保要求)したかを確認する。スレッド104がメモリ確保を要求しない場合には(ステップD1のNOルート参照)、ステップD3に移行する。
また、スレッド104がメモリを要求した場合には(ステップD1のYESルート参照)、ステップD2に移行する。
In step D1, the request memory capacity totaling unit 41 confirms whether the thread 104 has requested the memory (memory allocation request). If thread 104 does not request memory allocation (see NO route in step D1), the process proceeds to step D3.
Further, when the thread 104 requests the memory (see the YES route in step D1), the process proceeds to step D2.

ステップD2において、要求メモリ容量集計部41は、当該スレッド104を実行するCPUコア11の要求メモリ容量に、当該スレッド104が要求したメモリ容量を加算する。その後、ステップD3に移行する。 In step D2, the request memory capacity totaling unit 41 adds the memory capacity requested by the thread 104 to the request memory capacity of the CPU core 11 that executes the thread 104. After that, the process proceeds to step D3.

ステップD3において、要求メモリ容量集計部41は、スレッド104がメモリを解放したかを確認する。スレッド104がメモリを解放していない場合には(ステップD3のNOルート参照)、ステップD5に移行する。
また、スレッド104がメモリを解放した場合には(ステップD3のYESルート参照)、ステップD4に移行する。
In step D3, the request memory capacity totaling unit 41 confirms whether the thread 104 has released the memory. If the thread 104 has not released the memory (see the NO route in step D3), the process proceeds to step D5.
When the thread 104 releases the memory (see the YES route in step D3), the process proceeds to step D4.

ステップD4において、要求メモリ容量集計部41は、当該スレッド104を実行するCPUコア11の要求メモリ容量から、当該スレッド104が解放したメモリ容量を減算する。その後、ステップD5に移行する。 In step D4, the request memory capacity totaling unit 41 subtracts the memory capacity released by the thread 104 from the request memory capacity of the CPU core 11 that executes the thread 104. After that, the process proceeds to step D5.

ステップD5において、キャッシュミス頻度集計部42が、スレッド104のメモリアクセスでページフォールトが発生したかを確認する。ページフォールトが発生していない場合には(ステップD5のNOルート参照)、ステップD7に移行する。
また、ページフォールトが発生している場合には(ステップD5のYESルート参照)、ステップD6に移行する。
In step D5, the cache miss frequency totaling unit 42 confirms whether a page fault has occurred in the memory access of the thread 104. If no page fault has occurred (see the NO route in step D5), the process proceeds to step D7.
If a page fault has occurred (see the YES route in step D5), the process proceeds to step D6.

ステップD6において、キャッシュミス頻度集計部42は、当該スレッド104を実行するCPUコア11のキャッシュミス数(キャッシュミス頻度)を加算(インクリメント)する。その後、ステップD7に移行する。 In step D6, the cache miss frequency totaling unit 42 adds (increments) the number of cache misses (cache miss frequency) of the CPU core 11 that executes the thread 104. After that, the process proceeds to step D7.

ステップD7において、キャッシュ再分配判定部43が、タイマにより計時された時間を参照して、一定時間が経過しているかを確認する。ここで、一定時間が経過していない場合には(ステップD7のNOルート参照)、ステップD1に戻る。
一方、一定時間が経過している場合には(ステップD7のYESルート参照)、ステップD8に移行する。
In step D7, the cache redistribution determination unit 43 refers to the time clocked by the timer and confirms whether a certain time has elapsed. Here, if a certain time has not elapsed (see the NO route in step D7), the process returns to step D1.
On the other hand, when a certain time has passed (see the YES route in step D7), the process proceeds to step D8.

ステップD8において、キャッシュ再分配判定部43は、本コンピュータシステム1dに備えられた複数のCPUコア11間における、キャッシュミス頻度の最大値と最小値の比が一定以上であるかを確認する。確認の結果、キャッシュミス頻度の最大値と最小値の比が一定以上でない場合には(ステップD8のNOルート参照)、ステップD1に戻る。
一方、キャッシュミス頻度の最大値と最小値の比が一定以上である場合には(ステップD8のYESルート参照)、ステップD9に移行する。
In step D8, the cache redistribution determination unit 43 confirms whether the ratio of the maximum value and the minimum value of the cache miss frequency among the plurality of CPU cores 11 provided in the computer system 1d is a certain value or more. As a result of the confirmation, if the ratio of the maximum value and the minimum value of the cache miss frequency is not more than a certain value (see the NO route in step D8), the process returns to step D1.
On the other hand, when the ratio of the maximum value and the minimum value of the cache miss frequency is equal to or higher than a certain value (see the YES route in step D8), the process proceeds to step D9.

ステップD9において、キャッシュ再分配判定部43は、移動元のCPUコア11と移動先のCPUコア11との要求メモリ容量の比率に応じて、再分配キャッシュサイズを決定する。 In step D9, the cache redistribution determination unit 43 determines the redistribution cache size according to the ratio of the requested memory capacity of the CPU core 11 of the movement source and the CPU core 11 of the movement destination.

また、キャッシュ再分配判定部43は、算出した再分配キャッシュサイズを用いてキャッシュ容量テーブル44を更新する。さらに、キャッシュ再分配判定部43は、キャッシュミス頻度集計部42により集計されたキャッシュミス頻度をクリアさせる。その後、処理はステップD1に戻る。 Further, the cache redistribution determination unit 43 updates the cache capacity table 44 using the calculated redistribution cache size. Further, the cache redistribution determination unit 43 clears the cache miss frequency aggregated by the cache miss frequency aggregation unit 42. After that, the process returns to step D1.

(C)効果
第4実施形態の一例としてのコンピュータシステム1dによれば、上述した第1実施形態のコンピュータシステム1aと同様の効果が得られる他、キャッシュ再分配処理部40がCPUコア11間においてキャッシュ容量の再分配を行なうことで、CPUコア11毎にキャッシュのLRUリスト(CPUコア毎LRUリスト33)を分離した構成においても、CPUコア11間でキャッシュの容量再分配を行なうことができる。
(C) Effect According to the computer system 1d as an example of the fourth embodiment, the same effect as that of the computer system 1a of the first embodiment described above can be obtained, and the cache redistribution processing unit 40 is placed between the CPU cores 11. By redistributing the cache capacity, the cache capacity can be redistributed among the CPU cores 11 even in a configuration in which the LRU list of the cache (LRU list 33 for each CPU core) is separated for each CPU core 11.

キャッシュ再分配処理部40において、キャッシュ再分配判定部43が、キャッシュミス頻度の最大値と最小値の比が一定以上のときにキャッシュ再分配を実行する。すなわち、複数のCPUコア11間において、キャッシュミス頻度に偏りが生じた場合に、キャッシュ再分配処理部40がキャッシュ再分配処理を行なうことでキャッシュミス頻度の偏りを解消し、平均性能を向上することができる。 In the cache redistribution processing unit 40, the cache redistribution determination unit 43 executes cache redistribution when the ratio of the maximum value and the minimum value of the cache miss frequency is a certain value or more. That is, when the cache miss frequency is biased among the plurality of CPU cores 11, the cache redistribution processing unit 40 performs the cache redistribution process to eliminate the bias in the cache miss frequency and improve the average performance. be able to.

また、キャッシュ再分配判定部43が、キャッシュミス頻度が最も低いCPUコア#1をキャッシュ容量の移動元と決定し、キャッシュミス頻度が最も高いCPUコア#0をキャッシュ容量の移動先と決定する。これにより、キャッシュミス頻度の偏りを効率的に解消することができ、平均性能を向上することができる。 Further, the cache redistribution determination unit 43 determines that the CPU core # 1 having the lowest cache miss frequency is the transfer source of the cache capacity, and the CPU core # 0 having the highest cache miss frequency is the move destination of the cache capacity. As a result, the bias of the cache miss frequency can be efficiently eliminated, and the average performance can be improved.

また、キャッシュ再分配判定部43は、移動元のCPUコア11と移動先のCPUコア11との要求メモリ容量の比率に応じて、再分配キャッシュサイズを決定する。これにより、キャッシュミス頻度が低いCPUコアのキャッシュを1ページ分解放し、キャッシュミス頻度が高いCPUコアのキャッシュを1ページ分増やすことを繰り返す従来手法に比べて、キャッシュ容量の再分配の時間を短縮することができる。また、キャッシュ容量の再分配の時間を短縮することにより、キャッシュ容量アンバランスによる性能低下の時間を短縮することができ、平均性能を向上することができる。 Further, the cache redistribution determination unit 43 determines the redistribution cache size according to the ratio of the required memory capacity of the CPU core 11 of the movement source and the CPU core 11 of the movement destination. As a result, the time for redistributing the cache capacity is reduced as compared with the conventional method in which the cache of the CPU core having a low cache miss frequency is released by one page and the cache of the CPU core having a high cache miss frequency is repeatedly increased by one page. Can be shortened. Further, by shortening the time for redistributing the cache capacity, the time for performance deterioration due to the cache capacity imbalance can be shortened, and the average performance can be improved.

なお、上述した第4実施形態のコンピュータシステム1dにおいては、図6に示した第1実施形態のコンピュータシステム1aにキャッシュ再分配処理部40を備えることで構成されているが、これに限定されるものではない。例えば、上述した第2実施形態のコンピュータシステム1bや第3実施形態のコンピュータシステム1cにキャッシュ再分配処理部40を備えることで構成してもよく、種々変形して実施することができる。 The computer system 1d of the fourth embodiment described above is configured to include the cache redistribution processing unit 40 in the computer system 1a of the first embodiment shown in FIG. 6, but is limited to this. It's not a thing. For example, the computer system 1b of the second embodiment and the computer system 1c of the third embodiment described above may be provided with the cache redistribution processing unit 40, and may be modified in various ways.

[5.付記]
以上の実施形態に関し、さらに以下の付記を開示する。
(付記1)
ページ単位のデータが格納される1次メモリと、
前記1次メモリから移動対象となったページのデータを格納する2次メモリと、
複数の演算コアを備えるプロセッサと、
前記複数の演算コアそれぞれに対して設けられ、前記複数のページのうちの前記複数の演算コア毎に割当られたページ群における各ページの移動の順位を示す複数の第1リンクを格納する第1管理情報記憶領域と、
オペレーティングシステムに対して設けられ、前記複数の第1リンクにおけるページ群の中から前記移動の順位に応じて選択された複数のページを、前記2次メモリへ移動される候補のページ群として管理する第2リンクを格納する第2管理情報記憶領域と、
前記第2リンクのページ群の中から選択したページのデータを前記1次メモリから前記2次メモリに移動させる移動処理部と
を備えることを特徴とする、情報処理装置。
[5. Addendum]
Regarding the above embodiments, the following additional notes will be further disclosed.
(Appendix 1)
Primary memory for storing page-by-page data and
A secondary memory that stores the data of the page to be moved from the primary memory, and
A processor with multiple arithmetic cores and
A first link provided for each of the plurality of arithmetic cores and storing a plurality of first links indicating the order of movement of each page in the page group assigned to each of the plurality of arithmetic cores among the plurality of pages. Management information storage area and
A plurality of pages provided for the operating system and selected according to the order of movement from the page group in the plurality of first links are managed as a candidate page group to be moved to the secondary memory. A second management information storage area for storing the second link, and
An information processing device including a movement processing unit that moves data of a page selected from the page group of the second link from the primary memory to the secondary memory.

(付記2)
前記移動処理部により前記2次メモリに移動されたページを管理する移動管理情報を記憶する記憶部と、
前記複数の演算コア毎に備えられ、前記移動管理情報を参照して、前記2次メモリに移動させたページを前記第1リンクから削除する、削除処理部と
を備えることを特徴とする、付記1記載の情報処理装置。
(Appendix 2)
A storage unit that stores movement management information that manages pages moved to the secondary memory by the movement processing unit, and a storage unit.
A supplementary note, which is provided for each of the plurality of arithmetic cores, and includes a deletion processing unit that deletes a page moved to the secondary memory from the first link by referring to the movement management information. 1. The information processing apparatus according to 1.

(付記3)
前記2次メモリに移動されたページと前記演算コアとを対応付けるページ対応情報を記憶する記憶部と、
前記ページ対応情報を参照して、前記2次メモリに移動させたページを前記第1リンクから削除する、削除処理部と
を備えることを特徴とする、付記1記載の情報処理装置。
(Appendix 3)
A storage unit that stores page correspondence information that associates a page moved to the secondary memory with the arithmetic core, and a storage unit.
The information processing apparatus according to Appendix 1, further comprising a deletion processing unit that deletes a page moved to the secondary memory from the first link with reference to the page correspondence information.

(付記4)
前記複数の演算コア毎に、前記第2リンクと、前記2次メモリに移動させたページを前記第1リンクから削除する削除処理部と
を備えることを特徴とする、付記1記載の情報処理装置。
(Appendix 4)
The information processing apparatus according to Appendix 1, wherein each of the plurality of arithmetic cores includes the second link and a deletion processing unit that deletes a page moved to the secondary memory from the first link. ..

(付記5)
ページ単位のデータが格納される1次メモリと、
前記1次メモリから移動対象となったページのデータを格納する2次メモリと、
複数の演算コアを備えるプロセッサと、
を備える情報処理装置において、
前記複数の演算コアのうち前記1次メモリを利用する演算コアに、
当該演算コアがデータアクセスを行なったページを、当該演算コアに割当られたページ群における各ページの移動の順位を示す複数の第1リンクに登録させる処理を実行させ、
前記複数の演算コアのうちのいずれか一つに、
オペレーティングシステムに対して設けられ、前記複数の第1リンクにおけるページ群の中から前記移動の順位に応じて選択された複数のページを前記2次メモリへ移動される候補のページ群として登録する第2リンクを参照させ、前記第2リンクのページ群の中から選択したページのデータを前記1次メモリから前記2次メモリに移動させる処理を実行させる
ことを特徴とする、メモリ制御プログラム。
(Appendix 5)
Primary memory for storing page-by-page data and
A secondary memory that stores the data of the page to be moved from the primary memory, and
A processor with multiple arithmetic cores and
In an information processing device equipped with
Among the plurality of arithmetic cores, the arithmetic core that uses the primary memory
A process of registering the page for which the arithmetic core has accessed data in a plurality of first links indicating the order of movement of each page in the page group assigned to the arithmetic core is executed.
In any one of the plurality of arithmetic cores,
A second page group provided for the operating system and selected from the page groups in the plurality of first links according to the order of movement is registered as a candidate page group to be moved to the secondary memory. A memory control program comprising referring to two links and executing a process of moving data of a page selected from the page group of the second link from the primary memory to the secondary memory.

(付記6)
前記2次メモリに移動されたページを管理する移動管理情報を記憶部に記憶させる処理を、前記複数の演算コアのいずれか一つに実行させ、
前記複数の演算コアのそれぞれに、前記移動管理情報を参照させて、前記2次メモリに移動させたページを前記第1リンクから削除する処理を実行させる
ことを特徴とする、付記5記載のメモリ制御プログラム。
(Appendix 6)
One of the plurality of arithmetic cores is made to execute the process of storing the movement management information for managing the pages moved to the secondary memory in the storage unit.
The memory according to Appendix 5, wherein each of the plurality of arithmetic cores is referred to the movement management information to execute a process of deleting the page moved to the secondary memory from the first link. Control program.

(付記7)
前記2次メモリに移動されたページと前記演算コアとを対応付けるページ対応情報を記憶部に記憶させ、
前記ページ対応情報を参照させて、前記2次メモリに移動させたページを前記第1リンクから削除する
処理を前記複数の演算コアのいずれか一つに実行させることを特徴とする、付記5記載のメモリ制御プログラム。
(Appendix 7)
The page correspondence information for associating the page moved to the secondary memory with the arithmetic core is stored in the storage unit.
Addendum 5 is characterized in that any one of the plurality of arithmetic cores is made to execute a process of deleting a page moved to the secondary memory from the first link by referring to the page correspondence information. Memory control program.

(付記8)
前記複数の演算コアのそれぞれに、前記第2リンクと、前記2次メモリに移動させたページを前記第1リンクから削除する処理を実行させる
ことを特徴とする、付記5記載のメモリ制御プログラム。
(Appendix 8)
The memory control program according to Appendix 5, wherein each of the plurality of arithmetic cores is made to execute a process of deleting the second link and the page moved to the secondary memory from the first link.

(付記9)
複数の演算コアを備えるプロセッサを備える情報処理装置において、
前記複数の演算コア毎の要求メモリ容量を積算する要求メモリ容量集計部と、
前記複数の演算コア毎のキャッシュミス数をカウントするキャッシュミス頻度集計部と、
各演算コアの要求メモリ容量に基づいて、再分配するキャッシュ容量を判定するキャッシュ再分配判定部と
を備えることを特徴とする情報処理装置。
(Appendix 9)
In an information processing device having a processor having a plurality of arithmetic cores,
A request memory capacity totaling unit that integrates the required memory capacity for each of the plurality of arithmetic cores,
A cache miss frequency totaling unit that counts the number of cache misses for each of the plurality of arithmetic cores,
An information processing apparatus including a cache redistribution determination unit that determines the cache capacity to be redistributed based on the required memory capacity of each arithmetic core.

(付記10)
前記キャッシュ再分配判定部は、前記再分配における移動元の演算コアの要求メモリ容量と移動先の演算コアの要求メモリ容量との比率に応じて、前記再分配するキャッシュ容量を決定する
ことを特徴とする、付記9記載の情報処理装置。
(Appendix 10)
The cache redistribution determination unit is characterized in that the cache redistribution determination unit determines the cache capacity to be redistributed according to the ratio of the required memory capacity of the transfer source arithmetic core and the required memory capacity of the migration destination arithmetic core in the redistribution. The information processing apparatus according to Appendix 9.

(付記11)
前記キャッシュ再分配判定部が、前記複数の演算コアにおけるキャッシュミス頻度の最大値と最小値の比が閾値以上の場合に、前記キャッシュ容量の再分配を行なう
ことを特徴とする、付記9または10に記載の情報処理装置。
(Appendix 11)
Appendix 9 or 10 is characterized in that the cache redistribution determination unit redistributes the cache capacity when the ratio of the maximum value and the minimum value of the cache miss frequency in the plurality of arithmetic cores is equal to or greater than a threshold value. The information processing device described in.

(付記12)
前記キャッシュ再分配判定部が、キャッシュミス頻度が最も低い演算コアをキャッシュ容量の移動元と決定し、キャッシュミス頻度が最も高い演算コアをキャッシュ容量の移動先と決定する
ことを特徴とする、付記11記載の情報処理装置。
(Appendix 12)
The cache redistribution determination unit determines the calculation core having the lowest cache miss frequency as the transfer source of the cache capacity, and determines the calculation core having the highest cache miss frequency as the move destination of the cache capacity. 11. The information processing apparatus according to 11.

(付記13)
複数の演算コアを備えるプロセッサを備える情報処理装置において、
前記複数の演算コアのうちのいずれか一つに、
前記複数の演算コア毎の要求メモリ容量を積算し、
前記複数の演算コア毎のキャッシュミス数をカウントし、
各演算コアの要求メモリ容量に基づいて、再分配するキャッシュ容量を判定する
処理を実行させることを特徴とする情報処理プログラム。
(Appendix 13)
In an information processing device having a processor having a plurality of arithmetic cores,
In any one of the plurality of arithmetic cores,
The required memory capacity for each of the plurality of arithmetic cores is integrated, and the required memory capacity is integrated.
The number of cache misses for each of the plurality of arithmetic cores is counted, and the number of cache misses is counted.
An information processing program characterized by executing a process of determining the cache capacity to be redistributed based on the required memory capacity of each arithmetic core.

(付記14)
前記再分配における移動元の演算コアの要求メモリ容量と移動先の演算コアの要求メモリ容量との比率に応じて、前記再分配するキャッシュ容量を決定する処理
を前記複数の演算コアのいずれか一つに実行させることを特徴とする、付記13記載の情報処理プログラム。
(Appendix 14)
One of the plurality of arithmetic cores performs a process of determining the cache capacity to be redistributed according to the ratio of the required memory capacity of the migration source arithmetic core and the required memory capacity of the migration destination arithmetic core in the redistribution. The information processing program according to Appendix 13, characterized in that it is executed at one time.

(付記15)
前記複数の演算コアにおけるキャッシュミス頻度の最大値と最小値の比が閾値以上の場合に、前記キャッシュ容量の再分配を行なう処理
を前記複数の演算コアのいずれか一つに実行させることを特徴とする、付記13または14に記載の情報処理プログラム。
(Appendix 15)
When the ratio of the maximum value and the minimum value of the cache miss frequency in the plurality of arithmetic cores is equal to or greater than the threshold value, the process of redistributing the cache capacity is executed by any one of the plurality of arithmetic cores. The information processing program according to Appendix 13 or 14.

(付記16)
キャッシュミス頻度が最も低い演算コアをキャッシュ容量の移動元と決定し、キャッシュミス頻度が最も高い演算コアをキャッシュ容量の移動先と決定する処理
を前記複数の演算コアのいずれか一つに実行させることを特徴とする、付記15記載の情報処理プログラム。
(Appendix 16)
One of the plurality of arithmetic cores is made to execute the process of determining the arithmetic core having the lowest cache miss frequency as the transfer source of the cache capacity and determining the arithmetic core having the highest cache miss frequency as the migration destination of the cache capacity. The information processing program according to Appendix 15, wherein the information processing program is characterized by the above.

(付記17)
複数の演算コアを備えるプロセッサを備える情報処理装置において、
前記複数の演算コア毎の要求メモリ容量を積算する処理と、
前記複数の演算コア毎のキャッシュミス数をカウントする処理と、
各演算コアの要求メモリ容量に基づいて、再分配するキャッシュ容量を判定する処理と
を有することを特徴とする情報処理方法。
(Appendix 17)
In an information processing device having a processor having a plurality of arithmetic cores,
The process of accumulating the required memory capacity for each of the plurality of arithmetic cores, and
The process of counting the number of cache misses for each of the plurality of arithmetic cores,
An information processing method comprising a process of determining a cache capacity to be redistributed based on a required memory capacity of each arithmetic core.

(付記18)
前記再分配における移動元の演算コアの要求メモリ容量と移動先の演算コアの要求メモリ容量との比率に応じて、前記再分配するキャッシュ容量を決定する処理
を備えることを特徴とする、付記17記載の情報処理方法。
(Appendix 18)
The appendix 17 is characterized by comprising a process of determining the cache capacity to be redistributed according to the ratio of the required memory capacity of the transfer source arithmetic core and the required memory capacity of the migration destination arithmetic core in the redistribution. The information processing method described.

(付記19)
前記複数の演算コアにおけるキャッシュミス頻度の最大値と最小値の比が閾値以上の場合に、前記キャッシュ容量の再分配を行なう処理
を備えることを特徴とする、付記17または18に記載の情報処理方法。
(Appendix 19)
The information processing according to Appendix 17 or 18, further comprising a process of redistributing the cache capacity when the ratio of the maximum value and the minimum value of the cache miss frequency in the plurality of arithmetic cores is equal to or greater than a threshold value. Method.

(付記20)
キャッシュミス頻度が最も低い演算コアをキャッシュ容量の移動元と決定し、キャッシュミス頻度が最も高い演算コアをキャッシュ容量の移動先と決定する処理
を備えることを特徴とする、付記19記載の情報処理方法。
(Appendix 20)
The information processing according to Appendix 19, wherein the calculation core having the lowest cache miss frequency is determined as the transfer source of the cache capacity, and the calculation core having the highest cache miss frequency is determined as the move destination of the cache capacity. Method.

1a,1b,1c コンピュータシステム
10 プロセッサ
11−0,11−1,11−2・・・,11 CPUコア
12 PCIeルートポート
13 メモリコントローラ
20 SSD
21 移動データ
30 DRAM
30a キャッシュ
31 カーネル領域
32 OS用LRUリスト(Linux用LRUリスト)
33−0,33−1,・・・,33 CPUコア毎LRUリスト
34 移動情報テーブル
35 ページ対応テーブル
40 キャッシュ再分配処理部
41 要求メモリ容量集計部
42 キャッシュミス頻度集計部
43 キャッシュ再分配判定部
44 キャッシュ容量テーブル
101 ページ移動スレッド
102 OS付属ページ移動スレッド
103 リスト削除スレッド
104 スレッド
1a, 1b, 1c Computer system 10 Processor 11-0, 11-1, 11-2 ..., 11 CPU core 12 PCIe root port 13 Memory controller 20 SSD
21 Mobile data 30 DRAM
30a cache 31 kernel area 32 LRU list for OS (LRU list for Linux)
33-0, 33-1, ..., 33 LRU list for each CPU core 34 Movement information table 35 page correspondence table 40 Cache redistribution processing unit 41 Request memory capacity totaling unit 42 Cache miss frequency totaling unit 43 Cache redistribution judgment unit 44 Cache capacity table 101 Page move thread 102 OS attached page move thread 103 List delete thread 104 thread

Claims (11)

ページ単位のデータが格納される1次メモリと、
前記1次メモリから移動対象となったページのデータを格納する2次メモリと、
複数の演算コアを備えるプロセッサと、
前記複数の演算コアそれぞれに対して設けられ、前記複数のページのうちの前記複数の演算コア毎に割当られたページ群における各ページの移動の順位を示す複数の第1リンクを格納する第1管理情報記憶領域と、
オペレーティングシステムに対して設けられ、前記複数の第1リンクにおけるページ群の中から前記移動の順位に応じて選択された複数のページを、前記2次メモリへ移動される候補のページ群として管理する第2リンクを格納する第2管理情報記憶領域と、
前記第2リンクのページ群の中から選択したページのデータを前記1次メモリから前記2次メモリに移動させる移動処理部と
を備えることを特徴とする、情報処理装置。
Primary memory for storing page-by-page data and
A secondary memory that stores the data of the page to be moved from the primary memory, and
A processor with multiple arithmetic cores and
A first link provided for each of the plurality of arithmetic cores and storing a plurality of first links indicating the order of movement of each page in the page group assigned to each of the plurality of arithmetic cores among the plurality of pages. Management information storage area and
A plurality of pages provided for the operating system and selected according to the order of movement from the page group in the plurality of first links are managed as a candidate page group to be moved to the secondary memory. A second management information storage area for storing the second link, and
An information processing device including a movement processing unit that moves data of a page selected from the page group of the second link from the primary memory to the secondary memory.
前記移動処理部により前記2次メモリに移動されたページを管理する移動管理情報を記憶する記憶部と、
前記複数の演算コア毎に備えられ、前記移動管理情報を参照して、前記2次メモリに移動させたページを前記第1リンクから削除する、削除処理部と
を備えることを特徴とする、請求項1記載の情報処理装置。
A storage unit that stores movement management information that manages pages moved to the secondary memory by the movement processing unit, and a storage unit.
The claim is provided for each of the plurality of arithmetic cores, and is provided with a deletion processing unit that deletes the page moved to the secondary memory from the first link with reference to the movement management information. Item 1. The information processing apparatus according to item 1.
前記2次メモリに移動されたページと前記演算コアとを対応付けるページ対応情報を記憶する記憶部と、
前記ページ対応情報を参照して、前記2次メモリに移動させたページを前記第1リンクから削除する、削除処理部と
を備えることを特徴とする、請求項1記載の情報処理装置。
A storage unit that stores page correspondence information that associates a page moved to the secondary memory with the arithmetic core, and a storage unit.
The information processing apparatus according to claim 1, further comprising a deletion processing unit that deletes a page moved to the secondary memory from the first link with reference to the page correspondence information.
前記複数の演算コア毎に、前記第2リンクと、前記2次メモリに移動させたページを前記第1リンクから削除する削除処理部と
を備えることを特徴とする、請求項1記載の情報処理装置。
The information processing according to claim 1, wherein each of the plurality of arithmetic cores includes the second link and a deletion processing unit that deletes a page moved to the secondary memory from the first link. Device.
ページ単位のデータが格納される1次メモリと、
前記1次メモリから移動対象となったページのデータを格納する2次メモリと、
複数の演算コアを備えるプロセッサと、
を備える情報処理装置において、
前記複数の演算コアのうち前記1次メモリを利用する演算コアに、
当該演算コアがデータアクセスを行なったページを、当該演算コアに割当られたページ群における各ページの移動の順位を示す複数の第1リンクに登録させる処理を実行させ、
前記複数の演算コアのうちのいずれか一つに、
オペレーティングシステムに対して設けられ、前記複数の第1リンクにおけるページ群の中から前記移動の順位に応じて選択された複数のページを前記2次メモリへ移動される候補のページ群として登録する第2リンクを参照させ、前記第2リンクのページ群の中から選択したページのデータを前記1次メモリから前記2次メモリに移動させる処理を実行させる
ことを特徴とする、メモリ制御プログラム。
Primary memory for storing page-by-page data and
A secondary memory that stores the data of the page to be moved from the primary memory, and
A processor with multiple arithmetic cores and
In an information processing device equipped with
Among the plurality of arithmetic cores, the arithmetic core that uses the primary memory
A process of registering the page for which the arithmetic core has accessed data in a plurality of first links indicating the order of movement of each page in the page group assigned to the arithmetic core is executed.
In any one of the plurality of arithmetic cores,
A second page group provided for the operating system and selected from the page groups in the plurality of first links according to the order of movement is registered as a candidate page group to be moved to the secondary memory. A memory control program comprising referring to two links and executing a process of moving data of a page selected from the page group of the second link from the primary memory to the secondary memory.
複数の演算コアを備えるプロセッサを備える情報処理装置において、
前記複数の演算コア毎の要求メモリ容量を積算する要求メモリ容量集計部と、
前記複数の演算コア毎のキャッシュミス数をカウントするキャッシュミス頻度集計部と、
各演算コアの要求メモリ容量に基づいて、再分配するキャッシュ容量を判定するキャッシュ再分配判定部と
を備えることを特徴とする情報処理装置。
In an information processing device having a processor having a plurality of arithmetic cores,
A request memory capacity totaling unit that integrates the required memory capacity for each of the plurality of arithmetic cores,
A cache miss frequency totaling unit that counts the number of cache misses for each of the plurality of arithmetic cores,
An information processing apparatus including a cache redistribution determination unit that determines the cache capacity to be redistributed based on the required memory capacity of each arithmetic core.
前記キャッシュ再分配判定部は、前記再分配における移動元の演算コアの要求メモリ容量と移動先の演算コアの要求メモリ容量との比率に応じて、前記再分配するキャッシュ容量を決定する
ことを特徴とする、請求項6記載の情報処理装置。
The cache redistribution determination unit is characterized in that the cache redistribution determination unit determines the cache capacity to be redistributed according to the ratio of the required memory capacity of the transfer source arithmetic core and the required memory capacity of the migration destination arithmetic core in the redistribution. 6. The information processing apparatus according to claim 6.
前記キャッシュ再分配判定部が、前記複数の演算コアにおけるキャッシュミス頻度の最大値と最小値の比が閾値以上の場合に、前記キャッシュ容量の再分配を行なう
ことを特徴とする、請求項6または7に記載の情報処理装置。
6. The information processing apparatus according to 7.
前記キャッシュ再分配判定部が、キャッシュミス頻度が最も低い演算コアをキャッシュ容量の移動元と決定し、キャッシュミス頻度が最も高い演算コアをキャッシュ容量の移動先と決定する
ことを特徴とする、請求項8記載の情報処理装置。
The claim is characterized in that the cache redistribution determination unit determines the calculation core having the lowest cache miss frequency as the transfer source of the cache capacity, and determines the calculation core having the highest cache miss frequency as the move destination of the cache capacity. Item 8. The information processing apparatus according to item 8.
複数の演算コアを備えるプロセッサを備える情報処理装置において、
前記複数の演算コアのうちのいずれか一つに、
前記複数の演算コア毎の要求メモリ容量を積算し、
前記複数の演算コア毎のキャッシュミス数をカウントし、
各演算コアの要求メモリ容量に基づいて、再分配するキャッシュ容量を判定する
処理を実行させることを特徴とする情報処理プログラム。
In an information processing device having a processor having a plurality of arithmetic cores,
In any one of the plurality of arithmetic cores,
The required memory capacity for each of the plurality of arithmetic cores is integrated, and the required memory capacity is integrated.
The number of cache misses for each of the plurality of arithmetic cores is counted, and the number of cache misses is counted.
An information processing program characterized by executing a process of determining the cache capacity to be redistributed based on the required memory capacity of each arithmetic core.
複数の演算コアを備えるプロセッサを備える情報処理装置において、
前記複数の演算コア毎の要求メモリ容量を積算する処理と、
前記複数の演算コア毎のキャッシュミス数をカウントする処理と、
各演算コアの要求メモリ容量に基づいて、再分配するキャッシュ容量を判定する処理と
を有することを特徴とする情報処理方法。
In an information processing device having a processor having a plurality of arithmetic cores,
The process of accumulating the required memory capacity for each of the plurality of arithmetic cores, and
The process of counting the number of cache misses for each of the plurality of arithmetic cores,
An information processing method comprising a process of determining a cache capacity to be redistributed based on a required memory capacity of each arithmetic core.
JP2020206427A 2020-03-11 2020-12-14 Information processing device, memory control program, information processing program and information processing method Pending JP2021144694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/189,436 US11580023B2 (en) 2020-03-11 2021-03-02 Information processing apparatus, computer-readable recording medium having stored therein memory control program, and computer-readable recording medium having stored therein information processing program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020042130 2020-03-11
JP2020042130 2020-03-11

Publications (1)

Publication Number Publication Date
JP2021144694A true JP2021144694A (en) 2021-09-24

Family

ID=77766914

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020206427A Pending JP2021144694A (en) 2020-03-11 2020-12-14 Information processing device, memory control program, information processing program and information processing method

Country Status (1)

Country Link
JP (1) JP2021144694A (en)

Similar Documents

Publication Publication Date Title
US10176057B2 (en) Multi-lock caches
JP5401676B2 (en) Performing concurrent rehashing of hash tables for multithreaded applications
CN111344684B (en) Multi-layer cache placement mechanism
US9639469B2 (en) Coherency controller with reduced data buffer
CN103198025B (en) For the method and system that form near neighbor data cache is shared
US9304936B2 (en) Bypassing a store-conditional request around a store queue
US8271550B2 (en) Memory piece categorization
CN108804031A (en) Best titime is searched
US9021206B2 (en) Use of cache statistics to ration cache hierarchy access
US9836406B2 (en) Dynamic victim cache policy
JP6429262B2 (en) Load balancing for large in-memory databases
KR20150053702A (en) Hybrid buffer pool
JP2008510258A (en) System, apparatus, and method for predicting various types of access to memory and for managing predictions associated with cache memory
TW201717004A (en) Method for simplified task-based runtime for efficient parallel computing
US8954969B2 (en) File system object node management
JP6687845B2 (en) Arithmetic processing device and method for controlling arithmetic processing device
CN114830101A (en) Cache management based on access type priority
US20160350215A1 (en) Distributed hang recovery logic
US20080276045A1 (en) Apparatus and Method for Dynamic Cache Management
JP2021144694A (en) Information processing device, memory control program, information processing program and information processing method
US20090320036A1 (en) File System Object Node Management
CN116027982A (en) Data processing method, device and readable storage medium
US20090183156A1 (en) Intelligent Pre-Started Job Affinity for Non-Uniform Memory Access Computer Systems
US20070101064A1 (en) Cache controller and method
US11580023B2 (en) Information processing apparatus, computer-readable recording medium having stored therein memory control program, and computer-readable recording medium having stored therein information processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230608

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240402