From owner-freebsd-net@freebsd.org Tue Jun 2 02:10:30 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CFFB2FCC80 for ; Tue, 2 Jun 2020 02:10:30 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660049.outbound.protection.outlook.com [40.107.66.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49bb9K2zTHz4RwP; Tue, 2 Jun 2020 02:10:28 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hHGRhRrxTQUkRxGbUxF8QvSYQtyTAKCst/Ra0zIHsSC8O4nAJoqBhn24v6FZ8xYjnZZrrV1r6FRCuFobxKBpDj+SABBX/Il2y2ZDbaeXIb1kx4SrIC8yGMB62EW5dIXyqgP4fS5Udw+rr/smyOshsUiZC47spIuuq922ZhFtNXocBblRcRgzmDJkvuoqdSB8fekXmG3m/XnbwJGwwsUffXZrjkgJh5aFkfj+j3nLDGZuN0vazmZZek6y13CO3bUTXYWNrpYDncyOUgdUXiYQj6/Sry+3/tM8RMeAM0amcAbOAuMXYsbbQbQPb6Rf7Ouede2RJ/OUym6Asa/4DS51cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/dqKtOWXIeWTMmiYSPYwa9tEiRtnDK9JuHZlioCF1Yg=; b=bVcVCdnvdqDMWuWbWA0uboj8Nhb3vPR0LUgBNQUNjmFT+oo4hwFIVuk5WEmyy3M4bgLyh1nP5yuhclcVOmcAUb5fAPJ9Twrdr8RfmxwUUtegyDU+3MfIClFlJsjS7sJEEd7iB+rjZjkSOYf6xBm5H+iqbS+AWaddDUhvBNNA/SRKUqmBQM52G+r/5GVfVWg95UICg7neQCRrAlTDR++N8ZCbB/dIKurzc20ofX8jq0JmbdWCng7RkL9p0sUAGEyJjj/0y2+cRRjzESums4CPQ8+eM4f0acyJDXpPhdXoPopHJR18CUAvIncVv3OpsA2lWd183HG6Wlj9T4bHu/FJUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/dqKtOWXIeWTMmiYSPYwa9tEiRtnDK9JuHZlioCF1Yg=; b=wBfwilf0J/HkFIOEQAutURbF38g3r+K2nQu9fkpQQCB15wKcYPaZUBth7R9b/l7WfcLS99fjwseBjPjyjBwgfwRTEc1wiFZHJzrif+4XDdu4r3Mii50JG7T20czztI+wEcDcq18MOZlgyL+gqk0O8JS0BMDT1iSAiWVskpN22VsI/iekX6naBWJ3a/MYVrHBpGOYGe3N9oUU9YxH0pW0omC0KCJPBOCcj+SoSEIy99IvkZHNaBidw6/wehkJlLjHMTq/5vTLYKbHzmxDHg96OleL7lgkDyvgYisy3U2+a3YOrecZydqpxS9FMvNGOmJuNyxKweXdPhNACPBix42RMw== Received: from QB1PR01MB3649.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:32::26) by QB1PR01MB2929.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:31::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Tue, 2 Jun 2020 02:10:26 +0000 Received: from QB1PR01MB3649.CANPRD01.PROD.OUTLOOK.COM ([fe80::dd96:945c:b6ee:ffa2]) by QB1PR01MB3649.CANPRD01.PROD.OUTLOOK.COM ([fe80::dd96:945c:b6ee:ffa2%6]) with mapi id 15.20.3045.024; Tue, 2 Jun 2020 02:10:26 +0000 From: Rick Macklem To: "freebsd-net@freebsd.org" CC: Mark Johnston , "patrykkotlowski@gmail.com" Subject: how to fix an interesting issue with mountd? Thread-Topic: how to fix an interesting issue with mountd? Thread-Index: AQHWOIB43mGaYUbqaEyhKEp7Y6zq5g== Date: Tue, 2 Jun 2020 02:10:26 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 51ae6bb9-b180-413f-a63c-08d8069a1dcd x-ms-traffictypediagnostic: QB1PR01MB2929: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-forefront-prvs: 0422860ED4 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CdvjPLY+fK1Uc850iwCxOUyOTj/S/C3dCtPkV0c/aYBNfg4cHhMkVk0b9JUt3znsfjL6s2sVJmLet0L07e9/tuySn4hz/2D1PHWBBU6tmaqRVKuh4s27KbSFPkon1arHcEPXSzX4gJgXSMyIQvWZ4WY/72c8VrCE8z29c+2f1iMp6dopW/3epVbrDakrYDpZN+Tg0gmAF4mlWovODBEoCLtemEIA4ricrcztzReect1SRHrDpd2kmU8SrbL3axSBwpsWr9xyQBe3hdzArCN5v+5tBVMCukH870OrTlbtSgI2A3u6+/pAzYLDx/L0xT0l/uJusAMNY6qIG7a7t3/P4Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:QB1PR01MB3649.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(366004)(346002)(136003)(396003)(39860400002)(376002)(66556008)(4326008)(64756008)(66476007)(786003)(7696005)(83380400001)(55016002)(76116006)(9686003)(5660300002)(52536014)(33656002)(66446008)(6916009)(66946007)(6506007)(186003)(71200400001)(2906002)(478600001)(316002)(8936002)(8676002)(86362001)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: zy3Czh85x3UZrsqJXdhReXU2dy3fitQ3leg/jq6gGPHG/Ve6xNab0rlGoEUcUWryRttoMFUwfiSY9x3G64rN0WQV/MyvlmZRtEbkUoQ2016j3gZKMd/o1PH844Ql44TrysN2d8ernX2qnfudhMzhiJDwabEQ7KNK6VDsDraq+UipwJ1whweKREfwz22MBt/0hxtEzmfhJUftTgnGuN0VaFJIvD8S3Ex/q4zbqtNwb8NN/SZOpGf/WB0IyFO7W+N+X6TG/rR3L8TV2epVq/f5m9ry+szbnlH3D62XtF1vCrHm2TXTyR3VXA8Q5TWI2+QwmK3XPHrJ7JrsdJDque81mSJ8TNVBm5FaB0AG/IlEp/Sz/8eSm8q6rMqfcSw866cQ4WYboG/gbvE9jr3lF+5h6JllLUHys781p66BzG3/wDkLnrfWyiuABFecg4QZV3iLVffgykKT8/tYpsF3iR2gh6d1+y7PjCU/TuR1jns0rzk2gRIvlAqx3QJn4tSMhNIjo48bogIQA8T9kGszRnDqIEVvoMv2V0oIgNgYOVxP6YwBT+R+ZK9RO8q3rRpm6BnE x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 51ae6bb9-b180-413f-a63c-08d8069a1dcd X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2020 02:10:26.7022 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lOJdLPzJv5EJWugfOBUVWhz7Y94NUkMmDn8KEG+RuPHCyxsnsq1b1whESrFDymfgGZFe1YMWyK/R9PUm0UFtwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: QB1PR01MB2929 X-Rspamd-Queue-Id: 49bb9K2zTHz4RwP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=uoguelph.ca header.s=selector1 header.b=wBfwilf0; dmarc=none; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.66.49 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-4.20 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.963]; R_DKIM_ALLOW(-0.20)[uoguelph.ca:s=selector1]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[uoguelph.ca]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; DWL_DNSWL_LOW(-1.00)[uoguelph.ca:dkim]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[uoguelph.ca:+]; NEURAL_HAM_SHORT(-0.70)[-0.704]; RCVD_IN_DNSWL_NONE(0.00)[40.107.66.49:from]; NEURAL_HAM_LONG(-1.03)[-1.031]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:8075, ipnet:40.64.0.0/10, country:US]; FREEMAIL_CC(0.00)[FreeBSD.org,gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.107.66.49:from] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 02:10:30 -0000 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=