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.



Hi All,

I've made a patch for myself to disable it via ifdef, probably this is not proper way, but my system is getting spam on high load over NFS.

Now observing that is better or not, as far I'm not C developer I hope that there is no other side effect.

The good thing is that kernel compile correctly. First my approach was only theory now time for practice ;-)


==cut==
--- 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 = time_second;
                const struct timespec *omtime = &np->n_vattr->va_mtime;
                const struct timespec *octime = &np->n_vattr->va_ctime;
+#ifdef DEBUG
                const char *reason = NULL; /* XXX: gcc */
-
+#endif
                if (timespeccmp(omtime, mtime, <=)) {
+#ifdef DEBUG
                        reason = "mtime";
+#endif
                        error = EINVAL;
                }

                if (vp->v_type == VDIR && timespeccmp(octime, ctime, <=)) {
+#ifdef DEBUG
                        reason = "ctime";
+#endif
                        error = EINVAL;
                }

@@ -423,6 +428,7 @@
                         */

                        mutex_enter(&nmp->nm_lock);
+#ifdef DEBUG
                        if (!NFS_WCCKLUDGE(nmp, now)) {
                                printf("%s: inaccurate wcc data (%s) detected,"
                                    " disabling wcc"
@@ -439,6 +445,7 @@
                                    (unsigned int)mtime->tv_sec,
                                    (unsigned int)mtime->tv_nsec);
                        }
+#endif
                        nmp->nm_iflag |= NFSMNT_WCCKLUDGE;
                        nmp->nm_wcckludgetime = 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 &= ~NFSMNT_WCCKLUDGE;
                        }
                        mutex_exit(&nmp->nm_lock);
==cut==


--
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
Sent: Thursday, July 24, 2025 10:17 AM
To: gnats-bugs%netbsd.org@localhost; kern-bug-people%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 them via sysctl.

Hi All,

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 every high load ;-/ With noac option there is a less spam but performance is significantly degraded.

Thanks,


--
Marcin Gondek / Drixter
http://fido.e-utp.net/
AS56662

-----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-people%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 them via sysctl.

Hi.

[   190.659022] diskstation6.e-utp.net:/volume1/homes/drixter: inaccurate wcc data (ctime) detected, disabling wcc (ctime 1748779290.941608597 1748779290.941608597, mtime 1748779290.941608597 1748779290.941608597)
[ 14577.965578] diskstation6.e-utp.net:/volume1/Applications/NetBSD: inaccurate wcc data (ctime) detected, disabling wcc (ctime 1748793678.251985388 1748793678.251985388, mtime 1748793678.251985388 1748793678.251985388) [ 39826.666864] diskstation6.e-utp.net:/volume1/Applications/html: inaccurate wcc data (ctime) detected, disabling wcc (ctime 1748818926.951985610 1748818926.951985610, mtime 1748818926.951985610 1748818926.951985610) [ 103278.442441] diskstation6.e-utp.net:/volume1/Applications/NetBSD: re-enabling wcc [ 104091.099550] diskstation6.e-utp.net:/volume1/Applications/NetBSD: inaccurate wcc data (ctime) detected, disabling wcc (ctime 1748883191.385396294 1748883191.385396294, mtime 1748883191.385396294 1748883191.385396294) [ 112832.426073] diskstation6.e-utp.net:/volume1/homes/drixter: re-enabling wcc [ 112853.086255] diskstation6.e-utp.net:/volume1/homes/drixter: inaccurate wcc data (ctime) detected, disabling wcc (ctime 1748891953.379970261 1748891953.379970261, mtime 1748891953.379970261 1748891953.379970261) [ 530900.589197] diskstation6.e-utp.net:/volume1/Applications/NetBSD: re-enabling wcc [ 530982.569922] diskstation6.e-utp.net:/volume1/Applications/NetBSD: inaccurate wcc data (ctime) detected, disabling wcc (ctime 1749310082.858985530 1749310082.858985530, mtime 1749310082.858985530 1749310082.858985530)

The logs messages in kernel, still appears, even with noac option, the side-effect is that NFS is quite slow right now when processing multiple small files.
I suggest maybe to move forward with my idea to control it via DEBUG and./or sysctl variable if possible.

Thanks,

--
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
Sent: Sunday, June 1, 2025 2:07 PM
To: gnats-bugs%netbsd.org@localhost; kern-bug-people%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 them via sysctl.

Hi Michael

I've setup now as you suggested, It's the same, box restarted to be sure:

[   190.659022] diskstation6.e-utp.net:/volume1/homes/drixter: inaccurate wcc data (ctime) detected, disabling wcc (ctime 1748779290.941608597 1748779290.941608597, mtime 1748779290.941608597 1748779290.941608597)

devil# mount -vv | grep drixter | grep noac diskstation6.e-utp.net:/volume1/homes/drixter on /home/users/drixter type nfs (automounted, fsid: 0xb0e/0x70b, reads: sync 0 async 0, writes: sync 0 async 0, [nfs: addr=2001:67c:21ec:ffee:18f2:a77c:dc08:aef6, port=2049, addrlen=28, sotype=1, proto=0, fhsize=0, flags=0x88247<soft,wsize,rsize,intr,nfsv3,resvport,noac>, wsize=8192, rsize=8192, readdirsize=4096, timeo=300, retrans=10, maxgrouplist=16, readahead=2, leaseterm=0, deadthresh=9]) devil#

devil# cat /etc/auto_homes
* -rw,noac,soft,intr,rsize=8192,wsize=8192 diskstation6.e-utp.net:/volume1/homes/&

noac is included.


Thanks,

--
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 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.org@localhost; Marcin Gondek <drixter%e-utp.net@localhost>
Subject: 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: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/59452: Move NFS wcc data messages to debug or control them via sysctl.
Date: Sun, 1 Jun 2025 11:41:06 -0000 (UTC)

 drixter%e-utp.net@localhost writes:
 
 >I know that such messages should not generally appear if the NFS server is working properly. But unfortunately it is not repairable everywhere -> Synology NFS, hence the question about the possibility of moving these messages to the DEBUG variant or maybe make it controlable via sysctl.
 
 >[ 514378.384585] diskstation6.e-utp.net:/volume1/Applications/NetBSD: re-enabling wcc  >[ 514557.066122] diskstation6.e-utp.net:/volume1/Applications/NetBSD: inaccurate wcc data (ctime) detected, disabling wcc (ctime 1748374671.270579777 1748374671.270579777, mtime 1748374671.270579777 1748374671.270579777)
 
 Most of the messages appear to be "re-enabling" + "disabling wcc" again within a few seconds.
 
 What happens when you just disable the attribute cache when mounting with 'mount -o noac' ? It's hardly used anyway.
 


Home | Main Index | Thread Index | Old Index