-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpumask: Add optimized helpers when NR_CPUS fits in a long
When NR_CPUS fits in a long, it's possible to use compiler built-ins to produce much faster code when operating on cpumasks compared to just using the generic bitops APIs. Therefore, add optimized helpers using compiler built-ins when NR_CPUS fits in a long. This also turns nr_cpu_ids into a compile-time constant for further optimization potential. Note that compared to the upstream cpumask rewrite with this feature, these optimized helpers perfectly preserve the semantics of the helpers they replace. And this change is much smaller than the upstream version. Signed-off-by: Sultan Alsawaf <[email protected]> Signed-off-by: Tashfin Shakeer Rhythm <[email protected]>
- Loading branch information
1 parent
80af912
commit 82931da
Showing
3 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters