Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 2020 02:10:26 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Cc:        Mark Johnston <markj@FreeBSD.org>, "patrykkotlowski@gmail.com" <patrykkotlowski@gmail.com>
Subject:   how to fix an interesting issue with mountd?
Message-ID:  <QB1PR01MB3649A8589A742A5BD5CB9AE7DD8B0@QB1PR01MB3649.CANPRD01.PROD.OUTLOOK.COM>

next in thread | raw e-mail | index | archive | help
Hi,=0A=
=0A=
I'm posting this one to freebsd-net@ since it seems vaguely similar=0A=
to a network congestion problem and thought that network types=0A=
might have some ideas w.r.t. fixing it?=0A=
=0A=
PR#246597 - Reports a problem (which if I understand it is) where a sighup=
=0A=
   is posted to mountd and then another sighup is posted to mountd while=0A=
   it is reloading exports and the exports are not reloaded again.=0A=
   --> The simple patch in the PR fixes the above problem, but I think will=
=0A=
          aggravate another one.=0A=
For some NFS servers, it can take minutes to reload the exports file(s).=0A=
(I believe Peter Erriksonn has a server with 80000+ file systems exported.)=
=0A=
r348590 reduced the time taken, but it is still minutes, if I recall correc=
tly.=0A=
--> If you apply the patch in the PR and sighups are posted to mountd as=0A=
       often as it takes to reload the exports file(s), it will simply relo=
ad the=0A=
       exports file(s) over and over and over again, instead of processing=
=0A=
       Mount RPC requests.=0A=
=0A=
So, finally to the interesting part...=0A=
- It seems that the code needs to be changed so that it won't "forget"=0A=
  sighup(s) posted to it, but it should not reload the exports file(s) too=
=0A=
  frequently.=0A=
--> My thoughts are something like:=0A=
  - Note that sighup(s) were posted while reloading the exports file(s) and=
=0A=
    do the reload again, after some minimum delay.=0A=
    --> The minimum delay might only need to be 1second to allow some=0A=
           RPCs to be processed before reload happens again.=0A=
     Or=0A=
    --> The minimum delay could be some fraction of how long a reload takes=
.=0A=
          (The code could time the reload and use that to calculate how lon=
g to=0A=
           delay before doing the reload again.)=0A=
=0A=
Any ideas or suggestions? rick=0A=
ps: I've actually known about this for some time, but since I didn't have a=
 good=0A=
     solution...=0A=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?QB1PR01MB3649A8589A742A5BD5CB9AE7DD8B0>