Re: [PATCH 3/8] char: misc: Introduce misc_sync_register()

From: Jason Gunthorpe

Date: Sat May 09 2026 - 12:32:36 EST


On Sat, May 09, 2026 at 05:40:52PM +0800, Tzung-Bi Shih wrote:

> > The drivers ops lookup needs to be O(1) on the system call path.
>
> Achieving O(1) lookup is currently infeasible for the misc subsystem.
> This is because misc devices use the minor number[5] as a search key to
> determine which miscdevice the file operation is tied to, which
> inherently involves a linear search.

So? It needs a solution, you can't just give up.

Probably it will need driver changes, maybe focus on cdev_device_add()
drivers first.

Jason