背景:同一个进程的多个线程读写同一个PTE时,由于PTE无保护,存在竞态问题。 方案:新增spinlock保护PTE,包括大锁跟小锁。大锁:一个进程只有一个spinlock锁,多个线程 读写PTE时竞争一把锁,锁的内存占用小,但系统性能降低;小锁:每个页表持有一把spinlock, 由于锁是page结构体的一个字段,内存消耗较大,但是相对大锁性能较优。系统默认使用大锁,用 户可根据具体需要配置使用大锁还是小锁。 close #I2WARC Signed-off-by: Haryslee <lihao189@huawei.com> Change-Id: I5612eeac1f65507160035eae16af61f285182eda
74 lines
1.7 KiB
Plaintext
74 lines
1.7 KiB
Plaintext
menu "Kernel"
|
|
config KERNEL_SMP
|
|
bool "Enable Kernel SMP"
|
|
default n
|
|
help
|
|
This option will enable smp support of LiteOS.
|
|
|
|
config KERNEL_SMP_CORE_NUM
|
|
int "Multi-processing Core Numbers"
|
|
default 2
|
|
depends on KERNEL_SMP
|
|
help
|
|
This represents the number of multi-processing cores.
|
|
|
|
config KERNEL_SMP_LOCKDEP
|
|
bool "Enable Spinlock Lockdep Check"
|
|
default n
|
|
depends on KERNEL_SMP
|
|
help
|
|
This option will enable spinlock lockdep check.
|
|
|
|
config KERNEL_SMP_TASK_SYNC
|
|
bool "Enable Synchronized Task Operations"
|
|
default n
|
|
depends on KERNEL_SMP
|
|
help
|
|
This option will enable task synchronized operate task across cores.
|
|
|
|
config KERNEL_SMP_CALL
|
|
bool "Enable Function call cross Multi-core"
|
|
default n
|
|
depends on KERNEL_SMP
|
|
help
|
|
This option will enable function call on multi-core.
|
|
|
|
config KERNEL_SCHED_STATISTICS
|
|
bool "Enable Scheduler statistics"
|
|
default n
|
|
depends on KERNEL_SMP
|
|
help
|
|
This option will enable scheduler statistics.
|
|
|
|
config KERNEL_MMU
|
|
bool "Enable MMU"
|
|
default y
|
|
help
|
|
This option will enable mmu.
|
|
|
|
config KERNEL_VM
|
|
bool "Enable VM"
|
|
default y
|
|
depends on KERNEL_MMU
|
|
help
|
|
This option will enable vmm, pmm, page fault, etc.
|
|
|
|
config KERNEL_SYSCALL
|
|
bool "Enable Syscall"
|
|
default y
|
|
depends on KERNEL_VM
|
|
help
|
|
This option will enable syscall.
|
|
|
|
config PAGE_TABLE_FINE_LOCK
|
|
bool "Enable fine lock for page table"
|
|
default n
|
|
depends on KERNEL_VM
|
|
help
|
|
This option will enable fine lock for page table.
|
|
|
|
######################### config options of extended #####################
|
|
source "kernel/extended/Kconfig"
|
|
|
|
endmenu
|