Skip to content

get_core_ids() missing cores specfied by isolcpus= on linux boot #2

@ajvok

Description

@ajvok

I prevent core 3 (I have 4 cores numbered: 0..3) from being used by anything else on the system by adding isolcpus=3 to my kernel command line parameters.
On reboot this is OK. 'top' shows all 4 cores, with core 3 100% idle. This is as hoped for.

Next I want to run my rust program on core 3 only.
core_affinity::get_core_ids() only returns 3 elements, not 4.
The missing element is for core 3 so I can't then
core_affinity::set_for_current().

This makes it impossible to do what I wanted (run my rust app on its own isolated core).

Does this point to an issue with core_affinity::get_core_ids()? I expected it to return 4 elements.

Thanks for your help. Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions