├── .gitattributes
├── .gitignore
├── LICENSE
├── MQSim.exe
├── MQSim.sln
├── MQSim.vcxproj
├── MQSim.vcxproj.filters
├── Makefile
├── README.md
├── README.txt
├── config.txt
├── examples
├── real world workloads
│ ├── config.txt
│ ├── ssdconfig.xml
│ └── workload.xml
└── synthetic workloads
│ ├── config.txt
│ ├── ssdconfig.xml
│ └── workload.xml
├── flush_interval(us).txt
├── free_block_log.txt
├── src
├── cxl
│ ├── CFLRU.cpp
│ ├── CFLRU.h
│ ├── CXL_Config.cpp
│ ├── CXL_Config.h
│ ├── CXL_MSHR.cpp
│ ├── CXL_MSHR.h
│ ├── CXL_PCIe.cpp
│ ├── CXL_PCIe.h
│ ├── DRAM_Model.cpp
│ ├── DRAM_Model.h
│ ├── DRAM_Subsystem.cpp
│ ├── DRAM_Subsystem.h
│ ├── Host_Interface_CXL.cpp
│ ├── Host_Interface_CXL.h
│ ├── OutputLog.cpp
│ ├── OutputLog.h
│ ├── Prefetching_Alg.cpp
│ ├── Prefetching_Alg.h
│ ├── lrfu_heap.cpp
│ └── lrfu_heap.h
├── exec
│ ├── Device_Parameter_Set.cpp
│ ├── Device_Parameter_Set.h
│ ├── Execution_Parameter_Set.cpp
│ ├── Execution_Parameter_Set.h
│ ├── Flash_Parameter_Set.cpp
│ ├── Flash_Parameter_Set.h
│ ├── Host_Parameter_Set.cpp
│ ├── Host_Parameter_Set.h
│ ├── Host_System.cpp
│ ├── Host_System.h
│ ├── IO_Flow_Parameter_Set.cpp
│ ├── IO_Flow_Parameter_Set.h
│ ├── Parameter_Set_Base.h
│ ├── SSD_Device.cpp
│ └── SSD_Device.h
├── host
│ ├── ASCII_Trace_Definition.h
│ ├── Host_Defs.h
│ ├── Host_IO_Request.h
│ ├── IO_Flow_Base.cpp
│ ├── IO_Flow_Base.h
│ ├── IO_Flow_Synthetic.cpp
│ ├── IO_Flow_Synthetic.h
│ ├── IO_Flow_Trace_Based.cpp
│ ├── IO_Flow_Trace_Based.h
│ ├── PCIe_Link.cpp
│ ├── PCIe_Link.h
│ ├── PCIe_Message.h
│ ├── PCIe_Root_Complex.cpp
│ ├── PCIe_Root_Complex.h
│ ├── PCIe_Switch.cpp
│ ├── PCIe_Switch.h
│ ├── SATA_HBA.cpp
│ └── SATA_HBA.h
├── main.cpp
├── nvm_chip
│ ├── NVM_Chip.h
│ ├── NVM_Memory_Address.h
│ ├── NVM_Types.h
│ └── flash_memory
│ │ ├── Block.cpp
│ │ ├── Block.h
│ │ ├── Die.cpp
│ │ ├── Die.h
│ │ ├── FlashTypes.h
│ │ ├── Flash_Chip.cpp
│ │ ├── Flash_Chip.h
│ │ ├── Flash_Command.h
│ │ ├── Page.h
│ │ ├── Physical_Page_Address.cpp
│ │ ├── Physical_Page_Address.h
│ │ ├── Plane.cpp
│ │ ├── Plane.h
│ │ └── SubPage.h
├── sim
│ ├── Engine.cpp
│ ├── Engine.h
│ ├── EventTree.cpp
│ ├── EventTree.h
│ ├── Sim_Defs.h
│ ├── Sim_Event.h
│ ├── Sim_Object.h
│ └── Sim_Reporter.h
├── ssd
│ ├── Address_Mapping_Unit_Base.cpp
│ ├── Address_Mapping_Unit_Base.h
│ ├── Address_Mapping_Unit_Hybrid.cpp
│ ├── Address_Mapping_Unit_Hybrid.h
│ ├── Address_Mapping_Unit_Page_Level.cpp
│ ├── Address_Mapping_Unit_Page_Level.h
│ ├── Data_Cache_Flash.cpp
│ ├── Data_Cache_Flash.h
│ ├── Data_Cache_Manager_Base.cpp
│ ├── Data_Cache_Manager_Base.h
│ ├── Data_Cache_Manager_Flash_Advanced.cpp
│ ├── Data_Cache_Manager_Flash_Advanced.h
│ ├── Data_Cache_Manager_Flash_Simple.cpp
│ ├── Data_Cache_Manager_Flash_Simple.h
│ ├── FTL.cpp
│ ├── FTL.h
│ ├── Flash_Block_Manager.cpp
│ ├── Flash_Block_Manager.h
│ ├── Flash_Block_Manager_Base.cpp
│ ├── Flash_Block_Manager_Base.h
│ ├── Flash_Transaction_Queue.cpp
│ ├── Flash_Transaction_Queue.h
│ ├── GC_and_WL_Unit_Base.cpp
│ ├── GC_and_WL_Unit_Base.h
│ ├── GC_and_WL_Unit_Page_Level.cpp
│ ├── GC_and_WL_Unit_Page_Level.h
│ ├── Host_Interface_Base.cpp
│ ├── Host_Interface_Base.h
│ ├── Host_Interface_Defs.h
│ ├── Host_Interface_NVMe.cpp
│ ├── Host_Interface_NVMe.h
│ ├── Host_Interface_SATA.cpp
│ ├── Host_Interface_SATA.h
│ ├── NVM_Channel_Base.h
│ ├── NVM_Firmware.cpp
│ ├── NVM_Firmware.h
│ ├── NVM_PHY_Base.cpp
│ ├── NVM_PHY_Base.h
│ ├── NVM_PHY_ONFI.cpp
│ ├── NVM_PHY_ONFI.h
│ ├── NVM_PHY_ONFI_NVDDR2.cpp
│ ├── NVM_PHY_ONFI_NVDDR2.h
│ ├── NVM_Transaction.h
│ ├── NVM_Transaction_Flash.cpp
│ ├── NVM_Transaction_Flash.h
│ ├── NVM_Transaction_Flash_ER.cpp
│ ├── NVM_Transaction_Flash_ER.h
│ ├── NVM_Transaction_Flash_RD.cpp
│ ├── NVM_Transaction_Flash_RD.h
│ ├── NVM_Transaction_Flash_WR.cpp
│ ├── NVM_Transaction_Flash_WR.h
│ ├── ONFI_Channel_Base.cpp
│ ├── ONFI_Channel_Base.h
│ ├── ONFI_Channel_NVDDR2.cpp
│ ├── ONFI_Channel_NVDDR2.h
│ ├── Queue_Probe.cpp
│ ├── Queue_Probe.h
│ ├── SSD_Defs.h
│ ├── Stats.cpp
│ ├── Stats.h
│ ├── TSU_Base.cpp
│ ├── TSU_Base.h
│ ├── TSU_FLIN.cpp
│ ├── TSU_FLIN.h
│ ├── TSU_OutofOrder.cpp
│ ├── TSU_OutofOrder.h
│ ├── User_Request.cpp
│ └── User_Request.h
└── utils
│ ├── CMRRandomGenerator.cpp
│ ├── CMRRandomGenerator.h
│ ├── DistributionTypes.h
│ ├── Helper_Functions.cpp
│ ├── Helper_Functions.h
│ ├── Logical_Address_Partitioning_Unit.cpp
│ ├── Logical_Address_Partitioning_Unit.h
│ ├── RandomGenerator.cpp
│ ├── RandomGenerator.h
│ ├── StringTools.cpp
│ ├── StringTools.h
│ ├── Workload_Statistics.h
│ ├── XMLWriter.cpp
│ ├── XMLWriter.h
│ └── rapidxml
│ ├── license.txt
│ ├── manual.html
│ ├── rapidxml.hpp
│ ├── rapidxml_iterators.hpp
│ ├── rapidxml_print.hpp
│ └── rapidxml_utils.hpp
├── ssdconfig.xml
├── workload.IO_Flow.No_0.log_read
├── workload.IO_Flow.No_0.log_write
├── workload.xml
├── workload_scenario_1.xml
├── workload_settings
├── workload_for_synthetic.xml
└── workload_for_trace.xml
└── workload_syntheic.xml
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Modified by Shao-Peng Yang at Syracuse University
2 | Copyright (c) 2018, SAFARI Research Group at ETH Zurich University
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a
5 | copy of this software and associated documentation files (the
6 | "Software"), to deal in the Software without restriction, including
7 | without limitation the rights to use, copy, modify, merge, publish,
8 | distribute, sublicense, and/or sell copies of the Software, and to
9 | permit persons to whom the Software is furnished to do so, subject to
10 | the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included
13 | in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/MQSim.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spypaul/MQSim_CXL/357ed7bde9c780c75418122c2a87a9f5c12cf61d/MQSim.exe
--------------------------------------------------------------------------------
/MQSim.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27130.2027
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MQSim", "MQSim.vcxproj", "{DF6B928B-78A2-4285-BFF8-8136B4AEDB6A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {DF6B928B-78A2-4285-BFF8-8136B4AEDB6A}.Debug|x64.ActiveCfg = Debug|x64
17 | {DF6B928B-78A2-4285-BFF8-8136B4AEDB6A}.Debug|x64.Build.0 = Debug|x64
18 | {DF6B928B-78A2-4285-BFF8-8136B4AEDB6A}.Debug|x86.ActiveCfg = Debug|Win32
19 | {DF6B928B-78A2-4285-BFF8-8136B4AEDB6A}.Debug|x86.Build.0 = Debug|Win32
20 | {DF6B928B-78A2-4285-BFF8-8136B4AEDB6A}.Release|x64.ActiveCfg = Release|x64
21 | {DF6B928B-78A2-4285-BFF8-8136B4AEDB6A}.Release|x64.Build.0 = Release|x64
22 | {DF6B928B-78A2-4285-BFF8-8136B4AEDB6A}.Release|x86.ActiveCfg = Release|Win32
23 | {DF6B928B-78A2-4285-BFF8-8136B4AEDB6A}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {4EFD6969-CB8A-4935-A2BE-5F95A9E5D0FC}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | CC := g++
2 | LD := g++
3 | CC_FLAGS := -std=c++11 -O3 -g
4 |
5 | MODULES := exec host nvm_chip nvm_chip/flash_memory sim ssd utils
6 | SRC_DIR := $(addprefix src/,$(MODULES)) src
7 | BUILD_DIR := $(addprefix build/,$(MODULES)) build
8 |
9 | SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.cpp))
10 | SRC := src/main.cpp $(SRC)
11 | OBJ := $(patsubst src/%.cpp,build/%.o,$(SRC))
12 | INCLUDES := $(addprefix -I,$(SRC_DIR))
13 |
14 | vpath %.cpp $(SRC_DIR)
15 |
16 | define make-goal
17 | $1/%.o: %.cpp
18 | $(CC) $(CC_FLAGS) $(INCLUDES) -c $$< -o $$@
19 | endef
20 |
21 | .PHONY: all checkdirs clean
22 |
23 | all: checkdirs MQSim
24 |
25 | MQSim: $(OBJ)
26 | $(LD) $^ -o $@
27 |
28 | checkdirs: $(BUILD_DIR)
29 |
30 | $(BUILD_DIR):
31 | mkdir -p $@
32 |
33 | clean:
34 | rm -rf $(BUILD_DIR)
35 | rm -f MQSim
36 |
37 | $(foreach bdir,$(BUILD_DIR),$(eval $(call make-goal,$(bdir))))
38 |
--------------------------------------------------------------------------------
/config.txt:
--------------------------------------------------------------------------------
1 | DRAM_mode 0
2 | Has_cache 1
3 | DRAM_size 67108864
4 | Mix_mode 1
5 | Cache_portion_percentage 100
6 | Has_mshr 1
7 | Cache_placement 16
8 | Cache_policy CFLRU
9 | Prefetcher Best-offset
10 | Total_number_of_requests 20000000
--------------------------------------------------------------------------------
/examples/real world workloads/config.txt:
--------------------------------------------------------------------------------
1 | DRAM_mode 0
2 | Has_cache 1
3 | DRAM_size 67108864
4 | Mix_mode 1
5 | Cache_portion_percentage 100
6 | Has_mshr 1
7 | Cache_placement 16
8 | Cache_policy CFLRU
9 | Prefetcher Best-offset
10 | Total_number_of_requests 20000000
--------------------------------------------------------------------------------
/examples/real world workloads/ssdconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1.00000
5 | 4
6 | 400000
7 | false
8 | 1000000
9 |
10 |
11 | 321
12 | false
13 | FLASH
14 | NVME
15 | 65535
16 | 512
17 | ADVANCED
18 | SHARED
19 | 16777216
20 | 8192
21 | 1600
22 | 1
23 | 13
24 | 13
25 | 13
26 | PAGE_LEVEL
27 | true
28 | 268435456
29 | SHARED
30 | PCWD
31 | OUT_OF_ORDER
32 | 0.127
33 | 0.01000
34 | GREEDY
35 | false
36 | true
37 | 0.001000
38 | false
39 | false
40 | 200
41 | 100000
42 | 10000
43 | 20000
44 | 8
45 | 1
46 | 1200
47 | 8
48 | NVDDR2
49 |
50 | SLC
51 | ERASE
52 | 3000
53 | 3000
54 | 3000
55 | 100000
56 | 100000
57 | 100000
58 | 1000000
59 | 10000
60 | 100000
61 | 20000
62 | 1
63 | 4
64 | 512
65 | 512
66 | 16384
67 | 448
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/examples/real world workloads/workload.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HIGH
6 | TURNED_OFF
7 | 0,1,2,3,4,5,6,7
8 | 0,1,2,3,4,5,6,7
9 | 0
10 | 0,1,2,3
11 | 30
12 | traces/synthetic_stride_p.trace
13 | 100
14 | 1
15 | NANOSECOND
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/synthetic workloads/config.txt:
--------------------------------------------------------------------------------
1 | DRAM_mode 0
2 | Has_cache 1
3 | DRAM_size 8589934592
4 | Mix_mode 1
5 | Cache_portion_percentage 100
6 | Has_mshr 1
7 | Cache_placement 2097152
8 | Cache_policy FIFO
9 | Prefetcher No
10 | Total_number_of_requests 20000000
--------------------------------------------------------------------------------
/examples/synthetic workloads/ssdconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1.00000
5 | 4
6 | 400000
7 | false
8 | 1000000
9 |
10 |
11 | 321
12 | false
13 | FLASH
14 | NVME
15 | 65535
16 | 512
17 | ADVANCED
18 | SHARED
19 | 16777216
20 | 8192
21 | 1600
22 | 1
23 | 13
24 | 13
25 | 13
26 | PAGE_LEVEL
27 | true
28 | 268435456
29 | SHARED
30 | PCWD
31 | OUT_OF_ORDER
32 | 0.127
33 | 0.01000
34 | GREEDY
35 | false
36 | true
37 | 0.001000
38 | false
39 | false
40 | 200
41 | 100000
42 | 10000
43 | 20000
44 | 32
45 | 1
46 | 1200
47 | 32
48 | NVDDR2
49 |
50 | SLC
51 | ERASE
52 | 25000
53 | 25000
54 | 25000
55 | 200000
56 | 200000
57 | 200000
58 | 1000000
59 | 10000
60 | 100000
61 | 20000
62 | 1
63 | 4
64 | 32
65 | 512
66 | 16384
67 | 448
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/examples/synthetic workloads/workload.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HIGH
6 | TURNED_OFF
7 | 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
8 | 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
9 | 0
10 | 0,1,2,3
11 | 30
12 | traces/synthetic_stride_p.trace
13 | 100
14 | 1
15 | NANOSECOND
16 |
17 |
18 |
--------------------------------------------------------------------------------
/free_block_log.txt:
--------------------------------------------------------------------------------
1 | 429041117 3 0 0 0 0
2 | 429041242 3 0 0 0 0
3 | 429041680 3 0 0 0 0
4 | 429044733 3 0 0 0 3
5 | 429045435 3 0 0 0 0
6 | 429045435 3 0 0 0 1
7 | 429049030 3 0 0 0 3
8 | 429049121 4 2 0 0 3
9 | 434468766 3 0 0 0 0
10 | 434468811 4 3 0 0 1
11 | 435775421 3 0 0 0 0
12 | 435777082 4 1 0 0 3
13 | 436588690 3 0 0 0 0
14 | 436594254 4 0 0 0 2
15 |
--------------------------------------------------------------------------------
/src/cxl/CFLRU.cpp:
--------------------------------------------------------------------------------
1 | #include "CFLRU.h"
2 |
3 | CFLRU::CFLRU(uint64_t cache_size) {
4 | if (cache_size >= 4096) {
5 | window = 4096;
6 | }
7 | else {
8 | window = cache_size / 2;
9 | }
10 | }
11 | CFLRU::~CFLRU() {
12 | while (head != NULL && head != tail) {
13 | LRUNode* n = head->right;
14 | delete head;
15 | head = n;
16 | }
17 | if (head != NULL) delete head;
18 | m.clear();
19 | }
20 |
21 | void CFLRU::add(uint64_t pn) {
22 | LRUNode* nnode{ new LRUNode };
23 | nnode->page_num = pn;
24 |
25 | if (head == NULL) {
26 | head = nnode;
27 | tail = nnode;
28 | m.emplace(pn, nnode);
29 | return;
30 | }
31 |
32 | nnode->right = head;
33 | head->left = nnode;
34 | head = nnode;
35 |
36 | m.emplace(pn, nnode);
37 | }
38 |
39 | uint64_t CFLRU::pop() {
40 | LRUNode* p{ tail }, * target{ NULL };
41 | uint64_t evict_addr{ 0 };
42 |
43 | for (auto i = 0; i < window; i++) {
44 | if (!p->dirty) {
45 | target = p;
46 | break;
47 | }
48 | p = p->left;
49 | }
50 |
51 | if (target != NULL && target != tail) {
52 | if (target == head) {
53 | target->right->left = NULL;
54 | head = target->right;
55 | evict_addr = target->page_num;
56 | m.erase(m.find(target->page_num));
57 | delete target;
58 | return evict_addr;
59 | }
60 | target->left->right = target->right;
61 | target->right->left = target->left;
62 | evict_addr = target->page_num;
63 | m.erase(m.find(target->page_num));
64 | delete target;
65 | return evict_addr;
66 | }
67 |
68 | target = tail;
69 | tail = target->left;
70 | tail->right = NULL;
71 |
72 | evict_addr = target->page_num;
73 | m.erase(m.find(target->page_num));
74 | delete target;
75 |
76 | return evict_addr;
77 | }
78 |
79 | void CFLRU::modify(uint64_t pn, bool dirty) {
80 | LRUNode* target{ m.find(pn)->second };
81 |
82 | if (target != head) {
83 | if (target == tail) {
84 | if (!target->dirty) target->dirty = dirty;
85 | tail = target->left;
86 | tail->right = NULL;
87 |
88 | head->left = target;
89 | target->right = head;
90 | target->left = NULL;
91 | head = target;
92 | return;
93 | }
94 |
95 | head->left = target;
96 | target->left->right = target->right;
97 | target->right->left = target->left;
98 | if (!target->dirty) target->dirty = dirty;
99 | target->right = head;
100 | target->left = NULL;
101 | head = target;
102 | return;
103 | }
104 |
105 | if (!target->dirty) target->dirty = dirty;
106 | return;
107 | }
108 |
--------------------------------------------------------------------------------
/src/cxl/CFLRU.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #pragma once
3 | #include
4 |
5 | #include