From 1a93aae51848c74b9020b9bd1434c72a31ee99b8 Mon Sep 17 00:00:00 2001 From: DeSmooth Date: Sat, 13 Mar 2021 11:34:06 +0800 Subject: [PATCH] Update Concepts/Linux-cpu-2.md cpumask In x86_64 architecture `unsigned long` is 8-bytes size, so BITS_PER_BYTE * sizeof(long) = 64 --- Concepts/linux-cpu-2.md | 2 +- contributors.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Concepts/linux-cpu-2.md b/Concepts/linux-cpu-2.md index 53301ce..2ccc951 100644 --- a/Concepts/linux-cpu-2.md +++ b/Concepts/linux-cpu-2.md @@ -59,7 +59,7 @@ where `BITS_TO_LONGS`: As we are focusing on the `x86_64` architecture, `unsigned long` is 8-bytes size and our array will contain only one element: ``` -(((8) + (8) - 1) / (8)) = 1 +(((8) + (64) - 1) / (64)) = 1 ``` `NR_CPUS` macro represents the number of CPUs in the system and depends on the `CONFIG_NR_CPUS` macro which is defined in [include/linux/threads.h](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/include/linux/threads.h) and looks like this: diff --git a/contributors.md b/contributors.md index 618908f..2d528c0 100644 --- a/contributors.md +++ b/contributors.md @@ -132,3 +132,4 @@ Thank you to all contributors: * [Zhouyi Zhou](https://github.com/zhouzhouyi-hub) * [Mingzhe Yang](https://github.com/Mutated1994) * [Yuxin Wu](https://github.com/chaffz) +* [Biao Ding](https://github.com/SmallPond)