git: 9front

Download patch

ref: df00fa14f2956fd8713151c985141c5e0464370e
parent: 0af752a657ea0a003e5f9bd3d9a883fc807e474e
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jul 13 08:50:36 EDT 2025

kernel: double image hash hash-table size from 512 -> 1024 buckets

We have on the order of 200 images total in the system,
meaning it takes us just 1.6MB total for the hash chains.

And larger chains helps with big images like the fscache.

Typical population is like 2k pages per image.

--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -473,7 +473,7 @@
 	MNTLOG	=	5,
 	MNTHASH =	1<<MNTLOG,	/* Hash to walk mount table */
 	NFD =		100,		/* per process file descriptors */
-	PGHLOG  =	9,
+	PGHLOG  =	10,
 	PGHSIZE	=	1<<PGHLOG,	/* Page hash for image lookup */
 	ENVLOG =	5,
 	ENVHASH =	1<<ENVLOG,	/* Egrp hash for variable lookup */
--