Re: [PATCH v2 0/6] kernfs: proposed locking and concurrency improvement

From: Greg Kroah-Hartman
Date: Tue Jun 23 2020 - 01:21:38 EST


On Mon, Jun 22, 2020 at 02:27:38PM -0700, Rick Lindsley wrote:
>
> On Mon, Jun 22, 2020 at 01:48:45PM -0400, Tejun Heo wrote:
>
> > It should be obvious that representing each consecutive memory range with a
> > separate directory entry is far from an optimal way of representing
> > something like this. It's outright silly.
>
> On 6/22/20 11:03 AM, Greg Kroah-Hartman wrote:
>
> > I agree. And again, Ian, you are just "kicking the problem down the
> > road" if we accept these patches. Please fix this up properly so that
> > this interface is correctly fixed to not do looney things like this.
>
> Given that we cannot change the underlying machine representation of
> this hardware, what do you (all, not just you Greg) consider to be
> "properly"?

Change the userspace representation of the hardware then. Why does
userspace care about so many individual blocks, what happens if you
provide them a larger granularity? I can't imagine userspace really
wants to see 20k devices and manage them individually, where is the code
that does that?

What happens if you delay adding the devices until after booting?
Userspace should be event driven and only handle things after it sees
the devices being present, so try delaying and seeing what happens to
prevent this from keeping boot from progressing.

thanks,

greg k-h