Skip to content

Optimize TAP interface check.#2326

Open
bridadan wants to merge 1 commit intogoogle:mainfrom
bridadan:optimize_tap_interface_check
Open

Optimize TAP interface check.#2326
bridadan wants to merge 1 commit intogoogle:mainfrom
bridadan:optimize_tap_interface_check

Conversation

@bridadan
Copy link
Copy Markdown
Collaborator

Before this change, the TAP interface check would search through every active process' file descriptors to find which tap interfaces were in use.

Instead, now we attempt to open each TAP interface and report any errors. This reduces the runtime of the TAP interface check from about 6 seconds to under 0.1 seconds (when tested on my workstation).

Bug: 401259067
Test: check launcher.log for total runtime improvement

@rmuthiah rmuthiah requested review from 3405691582 and jemoreira April 1, 2026 17:06
@3405691582
Copy link
Copy Markdown
Collaborator

You could just also use cvdalloc and avoid the slowdowns, but I'll take a look.

@bridadan bridadan force-pushed the optimize_tap_interface_check branch 3 times, most recently from fa24dd4 to a5f7edf Compare April 1, 2026 19:18
Before this change, the TAP interface check would search through every
active process' file descriptors to find which tap interfaces were in
use.

Instead, now we attempt to open each TAP interface and report any
errors. This reduces the runtime of the TAP interface check from about
6 seconds to under 0.1 seconds (when tested on my workstation).

Bug: 401259067
Test: check launcher.log for total runtime improvement
@bridadan bridadan force-pushed the optimize_tap_interface_check branch from a5f7edf to d3a9240 Compare April 2, 2026 13:58
@3405691582 3405691582 added the kokoro:run Run e2e tests. label Apr 3, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants