[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210804184720.z27u5aymcl5hzqgh@ldmartin-desk2>
Date: Wed, 4 Aug 2021 11:47:20 -0700
From: Lucas De Marchi <lucas.demarchi@...el.com>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: linux-modules@...r.kernel.org, live-patching@...r.kernel.org,
fstests@...r.kernel.org, linux-block@...r.kernel.org, hare@...e.de,
dgilbert@...erlog.com, jeyu@...nel.org, osandov@...com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] libkmod-module: add support for a patient module removal
option
On Wed, Aug 04, 2021 at 10:58:59AM -0700, Luis Chamberlain wrote:
>On Tue, Aug 03, 2021 at 01:24:17PM -0700, Luis Chamberlain wrote:
>> + diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
><-- snip -->
>> + ERR(mod->ctx, "%s refcnt is %ld waiting for it to become 0\n", mod->name, refcnt);
>
>OK after running many tests with this I think we need to just expand
>this so that the error message only applies when -v is passed to
>modprobe, otherwise we get the print message every time, and using
>INFO() doesn't cut it, given the next priority level available to
>the library is LOG_INFO (6) and when modprobe -v is passed we set the
>log level to LOG_NOTICE (5), so we need a new NOTICE(). I'll send a v2
>with that included as a separate patch.
Or maybe move the sleep to modprobe instead of doing it in the
library? The sleep(1) seems like an arbitrary number to be introduced
in the lib.
Since kernfs is pollable, maybe we could rather introduce an API to
return the pid in which the application has to wait for and then the
application can use whatever it wants to poll, including controlling a
timeout.
I'm saying this because sleep(1) may be all fine for modprobe, but for
other applications using libkmod it may not play well with their mainloops
(and they may want to control both granularity of the sleep and a max
timeout).
thanks
Lucas De Marchi
>
> Luis
Powered by blists - more mailing lists