NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
RE: kern/59452: Move NFS wcc data messages to debug or control them via sysctl.
The following reply was made to PR kern/59452; it has been noted by GNATS.
From: Marcin Gondek <drixter%e-utp.net@localhost>
To: "gnats-bugs%netbsd.org@localhost" <gnats-bugs%netbsd.org@localhost>,
"kern-bug-people%netbsd.org@localhost" <kern-bug-people%netbsd.org@localhost>,
"gnats-admin%netbsd.org@localhost" <gnats-admin%netbsd.org@localhost>, "netbsd-bugs%netbsd.org@localhost"
<netbsd-bugs%netbsd.org@localhost>
Cc:
Subject: RE: kern/59452: Move NFS wcc data messages to debug or control them
via sysctl.
Date: Mon, 25 May 2026 12:26:20 +0000
Hi All,
Any change to apply such patch?
It's moving these errors messages into DEBUG mode.
=3D=3Dcut=3D=3D
--- /root/nfs_clntsubs.c 2025-10-22 21:00:13.919594789 +0200
+++ nfs_clntsubs.c 2025-10-22 20:13:06.624486932 +0200
@@ -393,15 +393,20 @@
time_t now =3D time_second;
const struct timespec *omtime =3D &np->n_vattr->va_mtime;
const struct timespec *octime =3D &np->n_vattr->va_ctime;
+#ifdef DEBUG
const char *reason =3D NULL; /* XXX: gcc */
-
+#endif
if (timespeccmp(omtime, mtime, <=3D)) {
+#ifdef DEBUG
reason =3D "mtime";
+#endif
error =3D EINVAL;
}
if (vp->v_type =3D=3D VDIR && timespeccmp(octime, ctime, <=
=3D)) {
+#ifdef DEBUG
reason =3D "ctime";
+#endif
error =3D EINVAL;
}
@@ -423,6 +428,7 @@
*/
mutex_enter(&nmp->nm_lock);
+#ifdef DEBUG
if (!NFS_WCCKLUDGE(nmp, now)) {
printf("%s: inaccurate wcc data (%s) detect=
ed,"
" disabling wcc"
@@ -439,6 +445,7 @@
(unsigned int)mtime->tv_sec,
(unsigned int)mtime->tv_nsec);
}
+#endif
nmp->nm_iflag |=3D NFSMNT_WCCKLUDGE;
nmp->nm_wcckludgetime =3D now;
mutex_exit(&nmp->nm_lock);
@@ -447,8 +454,10 @@
} else if (nmp->nm_iflag & NFSMNT_WCCKLUDGE) {
mutex_enter(&nmp->nm_lock);
if (nmp->nm_iflag & NFSMNT_WCCKLUDGE) {
+#ifdef DEBUG
printf("%s: re-enabling wcc\n",
vp->v_mount->mnt_stat.f_mntfromname);
+#endif
nmp->nm_iflag &=3D ~NFSMNT_WCCKLUDGE;
}
mutex_exit(&nmp->nm_lock);
=3D=3Dcut=3D=3D
--
Marcin Gondek / Drixter
http://fido.e-utp.net/
AS56662
-----Original Message-----
From: netbsd-bugs-owner%NetBSD.org@localhost <netbsd-bugs-owner%NetBSD.org@localhost> On Behalf=
Of Marcin Gondek via gnats
Sent: Wednesday, October 22, 2025 9:10 PM
To: kern-bug-people%netbsd.org@localhost; gnats-admin%netbsd.org@localhost; netbsd-bugs@netbsd.=
org; Marcin Gondek <drixter%e-utp.net@localhost>
Subject: RE: kern/59452: Move NFS wcc data messages to debug or control the=
m via sysctl.
The following reply was made to PR kern/59452; it has been noted by GNATS.
From: Marcin Gondek <drixter%e-utp.net@localhost>
To: "gnats-bugs%netbsd.org@localhost" <gnats-bugs%netbsd.org@localhost>,
"kern-bug-people%netbsd.org@localhost" <kern-bug-people%netbsd.org@localhost>,
"gnats-admin%netbsd.org@localhost" <gnats-admin%netbsd.org@localhost>, "netbsd-bugs%netbsd.org@localhost=
"
<netbsd-bugs%netbsd.org@localhost>
Cc:=20
Subject: RE: kern/59452: Move NFS wcc data messages to debug or control the=
m via sysctl.
Date: Wed, 22 Oct 2025 19:08:42 +0000
Hi All,
=20
I've made a patch for myself to disable it via ifdef, probably this is not=
=3D proper way, but my system is getting spam on high load over NFS.
=20
Now observing that is better or not, as far I'm not C developer I hope tha=
t=3D
there is no other side effect.
=20
The good thing is that kernel compile correctly. First my approach was onl=
y=3D
theory now time for practice ;-)
=20
=20
=3D3D=3D3Dcut=3D3D=3D3D
--- nfs_clntsubs.c 2025-10-22 21:00:13.919594789 +0200
+++ nfs_clntsubs.c-IFDEF 2025-10-22 19:38:56.907354570 +0200
@@ -393,15 +393,20 @@
time_t now =3D3D time_second;
const struct timespec *omtime =3D3D &np->n_vattr->va_mtime=
;
const struct timespec *octime =3D3D &np->n_vattr->va_ctime=
; +#ifdef DEBUG
const char *reason =3D3D NULL; /* XXX: gcc */
-
+#endif
if (timespeccmp(omtime, mtime, <=3D3D)) { +#ifdef DEBUG
reason =3D3D "mtime"; +#endif
error =3D3D EINVAL;
}
=20
if (vp->v_type =3D3D=3D3D VDIR && timespeccmp(octime, ctim=
e, <=3D
=3D3D)) {
+#ifdef DEBUG
reason =3D3D "ctime"; +#endif
error =3D3D EINVAL;
}
=20
@@ -423,6 +428,7 @@
*/
=20
mutex_enter(&nmp->nm_lock); +#ifdef DEBUG
if (!NFS_WCCKLUDGE(nmp, now)) {
printf("%s: inaccurate wcc data (%s) detec=
t=3D ed,"
" disabling wcc"
@@ -439,6 +445,7 @@
(unsigned int)mtime->tv_sec,
(unsigned int)mtime->tv_nsec);
}
+#endif
nmp->nm_iflag |=3D3D NFSMNT_WCCKLUDGE;
nmp->nm_wcckludgetime =3D3D now;
mutex_exit(&nmp->nm_lock); @@ -447,8 +454,10 @@
} else if (nmp->nm_iflag & NFSMNT_WCCKLUDGE) {
mutex_enter(&nmp->nm_lock);
if (nmp->nm_iflag & NFSMNT_WCCKLUDGE) { +#ifdef D=
EBUG
printf("%s: re-enabling wcc\n",
vp->v_mount->mnt_stat.f_mntfromname);
+#endif
nmp->nm_iflag &=3D3D ~NFSMNT_WCCKLUDGE;
}
mutex_exit(&nmp->nm_lock); =3D3D=3D3Dcut=3D3D=3D3=
D
=20
=20
--
Marcin Gondek / Drixter
http://fido.e-utp.net/
AS56662
=20
-----Original Message-----
From: netbsd-bugs-owner%NetBSD.org@localhost <netbsd-bugs-owner%NetBSD.org@localhost> On Behal=
f=3D
Of Marcin Gondek
Sent: Thursday, July 24, 2025 10:17 AM
To: gnats-bugs%netbsd.org@localhost; kern-bug-people%netbsd.org@localhost; gnats-admin@netbsd.=
o=3D rg; netbsd-bugs%netbsd.org@localhost
Subject: RE: kern/59452: Move NFS wcc data messages to debug or control th=
e=3D m via sysctl.
=20
Hi All,
=20
Is there any chance that someone will change it?
I know that is rare case, but for my boxes I'm getting spam in dmesg on ev=
e=3D ry high load ;-/ With noac option there is a less spam but performanc=
e is s=3D ignificantly degraded.
=20
Thanks,
=20
=20
--
Marcin Gondek / Drixter
http://fido.e-utp.net/
AS56662
=20
-----Original Message-----
From: Marcin Gondek
Sent: Monday, June 9, 2025 12:48 PM
To: Marcin Gondek <drixter%e-utp.net@localhost>; gnats-bugs%netbsd.org@localhost; kern-bug-peo=
p=3D le%netbsd.org@localhost; gnats-admin%netbsd.org@localhost; netbsd-bugs%netbsd.org@localhost
Subject: RE: kern/59452: Move NFS wcc data messages to debug or control th=
e=3D m via sysctl.
=20
Hi.
=20
[ 190.659022] diskstation6.e-utp.net:/volume1/homes/drixter: inaccurate =
w=3D
cc data (ctime) detected, disabling wcc (ctime 1748779290.941608597 174877=
9=3D 290.941608597, mtime 1748779290.941608597 1748779290.941608597) [ 14=
577.965578] diskstation6.e-utp.net:/volume1/Applications/NetBSD: inaccu=3D =
rate wcc data (ctime) detected, disabling wcc (ctime 1748793678.251985388 =
1=3D 748793678.251985388, mtime 1748793678.251985388 1748793678.251985388)=
[ 398=3D 26.666864] diskstation6.e-utp.net:/volume1/Applications/html: in=
accurate wc=3D c data (ctime) detected, disabling wcc (ctime 1748818926.95=
1985610 17488189=3D 26.951985610, mtime 1748818926.951985610 1748818926.95=
1985610) [ 103278.442=3D 441] diskstation6.e-utp.net:/volume1/Applications=
/NetBSD: re-enabling wcc [=3D
104091.099550] diskstation6.e-utp.net:/volume1/Applications/NetBSD: inacc=
u=3D rate wcc data (ctime) detected, disabling wcc (ctime 1748883191.38539=
6294 1=3D 748883191.385396294, mtime 1748883191.385396294 1748883191.38539=
6294) [ 112=3D 832.426073] diskstation6.e-utp.net:/volume1/homes/drixter: =
re-enabling wcc =3D [ 112853.086255] diskstation6.e-utp.net:/volume1/homes=
/drixter: inaccurate =3D wcc data (ctime) detected, disabling wcc (ctime 1=
748891953.379970261 174889=3D 1953.379970261, mtime 1748891953.379970261 1=
748891953.379970261) [ 530900.5=3D 89197] diskstation6.e-utp.net:/volume1/=
Applications/NetBSD: re-enabling wcc=3D
[ 530982.569922] diskstation6.e-utp.net:/volume1/Applications/NetBSD: ina=
c=3D curate wcc data (ctime) detected, disabling wcc (ctime 1749310082.858=
985530=3D
1749310082.858985530, mtime 1749310082.858985530 1749310082.858985530)
=20
The logs messages in kernel, still appears, even with noac option, the sid=
e=3D -effect is that NFS is quite slow right now when processing multiple =
small =3D files.
I suggest maybe to move forward with my idea to control it via DEBUG and./=
o=3D r sysctl variable if possible.
=20
Thanks,
=20
--
Marcin Gondek / Drixter
http://fido.e-utp.net/
AS56662
=20
-----Original Message-----
From: netbsd-bugs-owner%NetBSD.org@localhost <netbsd-bugs-owner%NetBSD.org@localhost> On Behal=
f=3D
Of Marcin Gondek
Sent: Sunday, June 1, 2025 2:07 PM
To: gnats-bugs%netbsd.org@localhost; kern-bug-people%netbsd.org@localhost; gnats-admin@netbsd.=
o=3D rg; netbsd-bugs%netbsd.org@localhost
Subject: RE: kern/59452: Move NFS wcc data messages to debug or control th=
e=3D m via sysctl.
=20
Hi Michael
=20
I've setup now as you suggested, It's the same, box restarted to be sure:
=20
[ 190.659022] diskstation6.e-utp.net:/volume1/homes/drixter: inaccurate =
w=3D
cc data (ctime) detected, disabling wcc (ctime 1748779290.941608597 174877=
9=3D 290.941608597, mtime 1748779290.941608597 1748779290.941608597)
=20
devil# mount -vv | grep drixter | grep noac diskstation6.e-utp.net:/volume=
1=3D /homes/drixter on /home/users/drixter type nfs (automounted, fsid: 0x=
b0e/0x=3D 70b, reads: sync 0 async 0, writes: sync 0 async 0, [nfs: addr=
=3D3D2001:67c:2=3D 1ec:ffee:18f2:a77c:dc08:aef6, port=3D3D2049, addrlen=3D=
3D28, sotype=3D3D1, proto=3D =3D3D0, fhsize=3D3D0, flags=3D3D0x88247<soft,=
wsize,rsize,intr,nfsv3,resvport,noac=3D
>, wsize=3D3D8192, rsize=3D3D8192, readdirsize=3D3D4096, timeo=3D3D300, re=
trans=3D3D1=3D 0, maxgrouplist=3D3D16, readahead=3D3D2, leaseterm=3D3D0, d=
eadthresh=3D3D9]) devil#
=20
devil# cat /etc/auto_homes
* -rw,noac,soft,intr,rsize=3D3D8192,wsize=3D3D8192 diskstation6.e-utp.net:=
/volu=3D me1/homes/&
=20
noac is included.
=20
=20
Thanks,
=20
--
Marcin Gondek / Drixter
http://fido.e-utp.net/
AS56662
=20
-----Original Message-----
From: netbsd-bugs-owner%NetBSD.org@localhost <netbsd-bugs-owner%NetBSD.org@localhost> On Behal=
f=3D
Of Michael van Elst via gnats
Sent: Sunday, June 1, 2025 1:45 PM
To: kern-bug-people%netbsd.org@localhost; gnats-admin%netbsd.org@localhost; netbsd-bugs@netbsd=
.=3D org; Marcin Gondek <drixter%e-utp.net@localhost>
Subject: Re: kern/59452: Move NFS wcc data messages to debug or control th=
e=3D m via sysctl.
=20
The following reply was made to PR kern/59452; it has been noted by GNATS.
=20
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:=3D20
Subject: Re: kern/59452: Move NFS wcc data messages to debug or control th=
e=3D m via sysctl.
Date: Sun, 1 Jun 2025 11:41:06 -0000 (UTC)
=20
drixter%e-utp.net@localhost writes:
=3D20
>I know that such messages should not generally appear if the NFS server =
i=3D s working properly. But unfortunately it is not repairable everywhere=
-> Sy=3D nology NFS, hence the question about the possibility of moving t=
hese messag=3D es to the DEBUG variant or maybe make it controlable via sy=
sctl.
=3D20
>[ 514378.384585] diskstation6.e-utp.net:/volume1/Applications/NetBSD: re=
-=3D enabling wcc >[ 514557.066122] diskstation6.e-utp.net:/volume1/Appli=
cation=3D
s/NetBSD: inaccurate wcc data (ctime) detected, disabling wcc (ctime 17483=
7=3D
4671.270579777 1748374671.270579777, mtime 1748374671.270579777 1748374671=
.=3D
270579777)
=3D20
Most of the messages appear to be "re-enabling" + "disabling wcc" again w=
i=3D thin a few seconds.
=3D20
What happens when you just disable the attribute cache when mounting with=
=3D 'mount -o noac' ? It's hardly used anyway.
=3D20
=20
Home |
Main Index |
Thread Index |
Old Index