[Devel] [PATCH VZ10 2/2] x86: make /proc/vz/cpuid_override a permanent proc entry

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Thu Sep 4 06:11:24 MSK 2025


If it was created (requires cpu support), proc file is never removed, so
we can make it "permanent" to slightly speed up its open and close.

https://virtuozzo.atlassian.net/browse/VSTOR-106081
Fixes: a874d92ac61b3 ("arch/x86: introduce cpuid override")
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 arch/x86/kernel/cpuid_fault.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/cpuid_fault.c b/arch/x86/kernel/cpuid_fault.c
index 9e0ea7a9d3420..117c971f531a4 100644
--- a/arch/x86/kernel/cpuid_fault.c
+++ b/arch/x86/kernel/cpuid_fault.c
@@ -258,6 +258,7 @@ static int cpuid_override_seq_open(struct inode *inode, struct file *file)
 }
 
 static struct proc_ops proc_cpuid_override_ops = {
+	.proc_flags   = PROC_ENTRY_PERMANENT,
 	.proc_open    = cpuid_override_seq_open,
 	.proc_read    = seq_read,
 	.proc_lseek   = seq_lseek,
-- 
2.50.1



More information about the Devel mailing list