On 7/6/26 23:06, Mirian Shilakadze wrote:
As far as I can tell the walk does not go over the pids. proc_perms_start
uses proc_next_recursive, which only follows the de->subdir rb tree of
proc_dir_entry nodes. The /proc/<pid> dirs are not in that tree, they have
no proc_dir_entry and are created on demand by proc_pid_lookup and
proc_pid_readdir, so the walk only visits the registered proc entries.

To be sure I also measured it on a test node. I traced proc_perms_start
while reading ve.proc_permissions, first with about 1300 processes and then
with about 6300, and the work stayed about the same and did not touch any
pid code, so at least in my test it did not scale with the number of
processes.

That said you may well be seeing something I am not. Could you tell me what
you looked at? I would like to compare so we can reconcile.


Ooops, you are right. Sorry for wasting your time.
I initially printed directory names only, and they looked like
PIDs, but they actually were IRQ numbers.

Now I do believe there should be no performance issues.

--
Best regards, Riabchun Vladimir
Linux Kernel Developer, Virtuozzo

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to