mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-22 06:51:26 +02:00
Merge pull request #1431 from crawford/cpuset
sys-kernel: add patch for cpuset
This commit is contained in:
commit
c890b81797
@ -2,7 +2,7 @@
|
|||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=5
|
EAPI=5
|
||||||
COREOS_SOURCE_REVISION=""
|
COREOS_SOURCE_REVISION="-r1"
|
||||||
inherit coreos-kernel
|
inherit coreos-kernel
|
||||||
|
|
||||||
DESCRIPTION="CoreOS Linux kernel"
|
DESCRIPTION="CoreOS Linux kernel"
|
@ -26,4 +26,5 @@ ${PATCH_DIR}/09-x86-Restrict-MSR-access-when-module-loading-is-restr.patch \
|
|||||||
${PATCH_DIR}/10-Add-option-to-automatically-enforce-module-signature.patch \
|
${PATCH_DIR}/10-Add-option-to-automatically-enforce-module-signature.patch \
|
||||||
${PATCH_DIR}/12-efi-Make-EFI_SECURE_BOOT_SIG_ENFORCE-depend-on-EFI.patch \
|
${PATCH_DIR}/12-efi-Make-EFI_SECURE_BOOT_SIG_ENFORCE-depend-on-EFI.patch \
|
||||||
${PATCH_DIR}/13-efi-Add-EFI_SECURE_BOOT-bit.patch \
|
${PATCH_DIR}/13-efi-Add-EFI_SECURE_BOOT-bit.patch \
|
||||||
${PATCH_DIR}/14-hibernate-Disable-in-a-signed-modules-environment.patch"
|
${PATCH_DIR}/14-hibernate-Disable-in-a-signed-modules-environment.patch \
|
||||||
|
${PATCH_DIR}/15-cpuset-use-trialcs-mems_allowed-as-a-temp-variable.patch"
|
@ -0,0 +1,51 @@
|
|||||||
|
cpuset: use trialcs->mems_allowed as a temp variable
|
||||||
|
|
||||||
|
The comment says it's using trialcs->mems_allowed as a temp variable but
|
||||||
|
it didn't match the code. Change the code to match the comment.
|
||||||
|
|
||||||
|
This fixes an issue when writing in cpuset.mems when a sub-directory
|
||||||
|
exists: we need to write several times for the information to persist:
|
||||||
|
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset# mkdir footest9
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset# cd footest9
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9# mkdir aa
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9# cat cpuset.mems
|
||||||
|
|
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9# echo 0 > cpuset.mems
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9# cat cpuset.mems
|
||||||
|
|
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9# echo 0 > cpuset.mems
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9# cat cpuset.mems
|
||||||
|
| 0
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9# cat aa/cpuset.mems
|
||||||
|
|
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9# echo 0 > aa/cpuset.mems
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9# cat aa/cpuset.mems
|
||||||
|
| 0
|
||||||
|
| root@alban:/sys/fs/cgroup/cpuset/footest9#
|
||||||
|
|
||||||
|
This should help to fix the following issue in Docker:
|
||||||
|
https://github.com/opencontainers/runc/issues/133
|
||||||
|
In some conditions, a Docker container needs to be started twice in
|
||||||
|
order to work.
|
||||||
|
|
||||||
|
Signed-off-by: Alban Crequy <alban@endocode.com>
|
||||||
|
Tested-by: Iago López Galeiras <iago@endocode.com>
|
||||||
|
---
|
||||||
|
kernel/cpuset.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
|
||||||
|
index ee14e3a..f0acff0 100644
|
||||||
|
--- a/kernel/cpuset.c
|
||||||
|
+++ b/kernel/cpuset.c
|
||||||
|
@@ -1223,7 +1223,7 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs,
|
||||||
|
spin_unlock_irq(&callback_lock);
|
||||||
|
|
||||||
|
/* use trialcs->mems_allowed as a temp variable */
|
||||||
|
- update_nodemasks_hier(cs, &cs->mems_allowed);
|
||||||
|
+ update_nodemasks_hier(cs, &trialcs->mems_allowed);
|
||||||
|
done:
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
--
|
Loading…
x
Reference in New Issue
Block a user