demand_paging: add infra for demand paging modules

Backing stores and eviction algorithms will be included here.
Exactly one must be chosen, with a default option to leave
the implementation to the application.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-11-30 10:26:09 -08:00 committed by Anas Nashif
parent a6eca9fab6
commit 993cf9f8eb
8 changed files with 55 additions and 0 deletions

View file

@ -26,3 +26,4 @@ add_subdirectory(tracing)
add_subdirectory_ifdef(CONFIG_JWT jwt)
add_subdirectory(canbus)
add_subdirectory_ifdef(CONFIG_TIMING_FUNCTIONS timing)
add_subdirectory_ifdef(CONFIG_DEMAND_PAGING demand_paging)

View file

@ -58,4 +58,6 @@ source "subsys/timing/Kconfig"
source "subsys/tracing/Kconfig"
source "subsys/demand_paging/Kconfig"
endmenu

View file

@ -0,0 +1,5 @@
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
add_subdirectory(eviction)
add_subdirectory(backing_store)

View file

@ -0,0 +1,11 @@
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
menu "Demand Paging modules"
depends on DEMAND_PAGING
source "subsys/demand_paging/eviction/Kconfig"
source "subsys/demand_paging/backing_store/Kconfig"
endmenu

View file

@ -0,0 +1,2 @@
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

View file

@ -0,0 +1,15 @@
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
choice BACKING_STORE_CHOICE
prompt "Backing store algorithms"
default BACKING_STORE_CUSTOM
config BACKING_STORE_CUSTOM
bool "Custom backing store implementation"
help
This option is chosen when the backing store will be implemented in
the application. This will be typical as these tend to be very
hardware-dependent.
endchoice

View file

@ -0,0 +1,2 @@
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

View file

@ -0,0 +1,17 @@
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# Demand paging sample eviction algorithms
choice EVICTION_CHOICE
prompt "Page frame eviction algorithms"
default EVICTION_CUSTOM
depends on DEMAND_PAGING
config EVICTION_CUSTOM
bool "Custom eviction algorithm"
help
This option is chosen when the eviction algorithm will be implemented
by the application, instead of using one included in Zephyr.
endchoice