[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZYIQgz+de/JQl10N@bombadil.infradead.org>
Date: Tue, 19 Dec 2023 13:52:03 -0800
From: Luis Chamberlain <mcgrof@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Changbin Du <changbin.du@...wei.com>, linux-modules@...r.kernel.org,
linux-kernel@...r.kernel.org, Hui Wang <hw.huiwang@...wei.com>,
Xiaoyi Su <suxiaoyi@...wei.com>
Subject: Re: [PATCH] modules: wait do_free_init correctly
On Tue, Dec 19, 2023 at 12:51:51PM -0800, Andrew Morton wrote:
> On Tue, 19 Dec 2023 22:12:31 +0800 Changbin Du <changbin.du@...wei.com> wrote:
>
> > The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves
> > do_free_init() into a global workqueue instead of call_rcu(). So now
> > we should wait it via flush_work().
>
> What are the runtime effects of this change?
Indeed that's needed given how old this culprit commit is:
git describe --contains 1a7b7d922081
v5.2-rc1~192^2~5
Who did this work and for what reason? What triggered this itch?
Is it perhaps for an out of tree driver that did something funky
on its module exit?
As per Documentation/RCU/rcubarrier.rst rcu_barrier will ensure the
callbacks complete, so interms of determinism both mechanisms will
have waited for the free. It seems we're now just limiting the scope.
This could also mean initialization grew used to having RCU calls on
init complete at this point in time, even for modules, and so localizing
this wait may now also introduce other unexpected behaviour.
Luis
Powered by blists - more mailing lists