Re: [PATCH] trans: /dev/random remove atime/mtime updates to prevent met
bug-hurd
Top
][
All Lists
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
Re: [PATCH] trans: /dev/random remove atime/mtime updates to prevent met
From
Samuel Thibault
Subject
Re: [PATCH] trans: /dev/random remove atime/mtime updates to prevent metadata write-amplification
Date
Sun, 22 Feb 2026 17:32:33 +0100
Milos Nikic, le jeu. 19 févr. 2026 20:41:19 -0800, a ecrit:
Unlike /dev/null, /dev/random calls trivfs_set_atime and trivfs_set_mtime with
every read/update which underneath calls file_utimens, spams and
completely ignores relatime.
If one wants to see this behavious "in action" one can just repeatedly call:
stat /dev/random
inside Hurd and every time one does that all three timestamps will come back
updated.
Worse if one instruments file_utimens one will see that just during the login
process
we get hundreds of ATIME updates for /dev/random due to background entropy.
Indeed, /dev/urandom is now read by glibc for various uses, so that'd
spam indeed.
With this patch, extraneous updates are removed and spam is drastically
reduced.
Applied, thanks!
---
trans/random.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/trans/random.c b/trans/random.c
index 5142cb15..74874c9f 100644
--- a/trans/random.c
+++ b/trans/random.c
@@ -357,7 +357,6 @@ trivfs_S_io_read (struct trivfs_protid *cred,
*data_len = amount;
- trivfs_set_atime (fsys);
return 0;
errout:
@@ -390,7 +389,6 @@ trivfs_S_io_write (struct trivfs_protid *cred,
pool_add_entropy (data, datalen);
*amount = datalen;
- trivfs_set_mtime (fsys);
return 0;
--
2.51.0
Prev in Thread
Current Thread
[Next in Thread]
[PATCH] trans: /dev/random remove atime/mtime updates to prevent metadata write-amplification
Milos Nikic
2026/02/19
Re: [PATCH] trans: /dev/random remove atime/mtime updates to prevent metadata write-amplification
Samuel Thibault
<=
Prev by Date:
Re: rump startup and IRQ
Next by Date:
Re: [PATCH 0/4 gnumach] Working SMP 64b
Previous by thread:
[PATCH] trans: /dev/random remove atime/mtime updates to prevent metadata write-amplification
Next by thread:
wiki-edits
Index(es):
Date
Thread