From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: Re: [PATCH] QoS: Do not try to unload any kernel modules Date: Fri, 19 Nov 2021 07:26:17 +0100 Message-ID: <746343b1-e7c5-15d7-b211-d4b054e54850@ipfire.org> In-Reply-To: <85DE1A5F-AB09-4531-A2A8-2713D3A4DB55@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0434080159287592975==" List-Id: --===============0434080159287592975== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Michael, thanks for your reply. This makes sense to me. Reviewed-by: Peter M=C3=BCller Thanks, and best regards, Peter M=C3=BCller > Hello, >=20 >> On 17 Nov 2021, at 20:15, Peter M=C3=BCller w= rote: >> >> Hello Michael, >> >> could you elaborate more on this one? >=20 > Sure. >=20 >> From my basic understanding, QoS should not try to unload kernel modules i= ndeed, >> but I did not get why it was doing so in the first place. >=20 > Unloading kernel modules used to be an old thing to do. I have no idea real= ly why what the motivation was. >=20 > Partly to save memory, and partly to not have unused module loaded since ha= rdware for example was being detected by loading every single module and see = if it recognised any hardware. >=20 > Here we unload the HTB scheduler simply because we do not need it any more = after the QoS was stopped. However, during an update, it might happen that th= e QoS needs to be restarted. When the kernel has been updated in the same upd= ater, we no longer have the kernel modules available for the running kernel. = Since sch_htb was unloaded, we can no longer load it again. That was the moti= vation for this patch here. At least QoS continues to work until the system i= s being rebooted after the update. >=20 > Does this make sense? >=20 > -Michael >=20 >> >> Thanks, and best regards, >> Peter M=C3=BCller >> >> >>> Signed-off-by: Michael Tremer >>> --- >>> config/qos/makeqosscripts.pl | 2 -- >>> 1 file changed, 2 deletions(-) >>> diff --git a/config/qos/makeqosscripts.pl b/config/qos/makeqosscripts.pl >>> index 0694bb78c..3234ab366 100644 >>> --- a/config/qos/makeqosscripts.pl >>> +++ b/config/qos/makeqosscripts.pl >>> @@ -510,8 +510,6 @@ print <>> iptables -t mangle --flush QOS-INC >/dev/null 2>&1 >>> iptables -t mangle --delete-chain QOS-INC >/dev/null 2>&1 >>> - rmmod sch_htb >/dev/null 2>&1 >>> - >>> for i in \$(ls \$RRDLOG/class_*.rrd); do >>> rrdtool update \$i \$(date +%s): >>> done >=20 --===============0434080159287592975==--