runtime: Process.ProcessorAffinity returns a 32-bit value on ARM64

When we run the following code on ARM64 machine with 48 cores (Ubuntu) without setting the CPU affinity in explicit way:

Console.WriteLine(System.Diagnostics.Process.GetCurrentProcess().ProcessorAffinity);

We get 00000000FFFFFFFF which is 2^32 - 1 while it should be 2^48 - 1

I don’t know if this is specific to ARM64 or Ubuntu or 64 bit in general. I just don’t have an access to a machine with more than 32 core to test.

@AndyAyersMS have hit this issue when he was benchmarking .NET Core 3.0 on ARM

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (19 by maintainers)

Commits related to this issue

Most upvoted comments

I opened dotnet/corefx#33838 for the other issue