LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 03-16-2023, 04:49 PM   #1
xandus
LQ Newbie
 
Registered: Mar 2023
Posts: 1

Rep: Reputation: 0
Cgroupv2 - Reducing Parent Cgroup with exactly one child Cgroup to just one Cgroup


Let A be a cgroup, and assume that A only has B as a child cgroup, like this:
- A->B
Let B have 2 processes with PIDs 8888 and 9999, like this:
- A->B(8888, 9999)
Is there a way to move these two processes from cgroup B to cgroup A and remove cgroup B in the meanwhile, like this?:
- A(8888, 9999) **B is now gone as it is empty**
Writing 8888 and 9999 to `cgroup.procs` of cgroup A doesn't work due to the "No Internal Process Constraint" in cgroupv2. Any thoughts?
 
Old 04-06-2023, 12:27 AM   #2
iPad
Member
 
Registered: Oct 2016
Distribution: iPadLinux
Posts: 81
Blog Entries: 1

Rep: Reputation: 45
Welcome to LQ. Sorry you didn't get any response. It might have helped if you had posted, using 'BB code' code tags (link in 'Posting Rules' block at bottom of page), a sample of what you tried, including specific and clear details (output) of what happened.

Hint: study the cgroup-tools package

P. S. IF this is school 'homework' (against LQ rules)
You might try feeding your assignment(s) to chatGPT!
But beware: when I tried that with your post, it invented (nonexistent) cgmove instead of the real cgclassify! And I think it may have generated invalid code! (I told it that cgmove does not exist, and I think it has learned that now!)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicity: invalid argument error backing up /sys/fs/cgroup/systemd/user.slice/user-42.slice/cgroup.event_control dzseti Linux - Software 2 05-17-2022 02:16 AM
[SOLVED] separate resource limit for each child process using cgroup joemon83 Linux - Containers 4 03-02-2022 04:41 PM
separate resource limit for each child process using cgroup joemon83 Linux - Server 3 03-01-2022 05:28 AM
File descriptors shared between child and parent causing parent to hang. bharadiaam Linux - Newbie 1 03-02-2009 01:01 AM
How to change environment variables of a parent envrionment from a child one. pulsez Linux - Software 1 11-09-2005 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration