Skip to contentSkip to conversation

Add Documentation for FAIR_USER_SCHED sysfs files

PATCH Applied Dhaval Giani 3 participants 7 messages Dec 12, 2007 – Dec 15, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add Documentation for FAIR_USER_SCHED sysfs files

This patch adds documentation about /sys/kernel/uids/<uid>/cpu_share to Documentation/ABI.

---
 Documentation/ABI/testing/sysfs-kernel-uids |   10 ++++++++++
 1 files changed, 10 insertions(+)
Documentation/ABI/testing/sysfs-kernel-uids new file +10 -0
Index: current/Documentation/ABI/testing/sysfs-kernel-uids
===================================================================
@@ -0,0 +1,10 @@
+What:		/sys/kernel/uids/<uid>/cpu_shares
+Date:		December 2007
+Contact:	Dhaval Giani <[email protected]>
+		Srivatsa Vaddagiri <[email protected]>
+Description:
+		The /sys/kernel/uids/<uid>/cpu_shares tunable is used
+		to set the cpu bandwidth a user is allowed. This is a
+		propotional value. What that means is that if there
+		are two users logged in, each with shares 1024, they
+		will get equal CPU bandwidth.
Signature · 2 lines
regards,
Dhaval
#1 lore raw
Quoted 15 lines · Dhaval Giani

This patch adds documentation about /sys/kernel/uids/<uid>/cpu_share to Documentation/ABI.

---
 Documentation/ABI/testing/sysfs-kernel-uids |   10 ++++++++++
 1 files changed, 10 insertions(+)

Index: current/Documentation/ABI/testing/sysfs-kernel-uids
===================================================================

Documentation/ABI/testing/sysfs-kernel-uids line 10

Quoted 10 lines
Documentation/ABI/testing/sysfs-kernel-uids new file +10 -0
@@ -0,0 +1,10 @@
+What:		/sys/kernel/uids/<uid>/cpu_shares
+Date:		December 2007
+Contact:	Dhaval Giani <[email protected]>
+		Srivatsa Vaddagiri <[email protected]>
+Description:
+		The /sys/kernel/uids/<uid>/cpu_shares tunable is used
+		to set the cpu bandwidth a user is allowed. This is a
+		propotional value. What that means is that if there
+		are two users logged in, each with shares 1024, they
+		will get equal CPU bandwidth.

Hm, how about describing the units here? Can you put "10" in each file and everyone will get the same share? 100? 1? 1024 seems like an odd "share" number. Unless there is some other document you wish to refer people to do help describe these values?

thanks,

greg k-h

#2 lore raw
Quoted 23 lines · Greg KH
Quoted 22 lines · Dhaval Giani

This patch adds documentation about /sys/kernel/uids/<uid>/cpu_share to Documentation/ABI.

---
 Documentation/ABI/testing/sysfs-kernel-uids |   10 ++++++++++
 1 files changed, 10 insertions(+)

Index: current/Documentation/ABI/testing/sysfs-kernel-uids
===================================================================

Documentation/ABI/testing/sysfs-kernel-uids new file +7 -0
@@ -0,0 +1,10 @@
+What:		/sys/kernel/uids/<uid>/cpu_shares
+Date:		December 2007
+Contact:	Dhaval Giani <[email protected]>
+		Srivatsa Vaddagiri <[email protected]>
+Description:
+		The /sys/kernel/uids/<uid>/cpu_shares tunable is used
+		to set the cpu bandwidth a user is allowed. This is a
Quoted 9 lines

Documentation/ABI/testing/sysfs-kernel-uids line 10

Quoted 3 lines
Documentation/ABI/testing/sysfs-kernel-uids new file +3 -0
+		propotional value. What that means is that if there
+		are two users logged in, each with shares 1024, they
+		will get equal CPU bandwidth.

Hm, how about describing the units here? Can you put "10" in each file and everyone will get the same share? 100? 1? 1024 seems like an odd "share" number. Unless there is some other document you wish to refer people to do help describe these values?

It is proportional. That is, if two users have same value for shares, they will get equal bandwidth on the CPU. If they are in the ratio 1:2, then they will share it in that ratio. I've updated the patch for this. Hope it is clearer.

Thanks,
--

This patch adds documentation about /sys/kernel/uids/<uid>/cpu_share to Documentation/ABI.

---
 Documentation/ABI/testing/sysfs-kernel-uids |   14 ++++++++++++++
 1 files changed, 14 insertions(+)
Documentation/ABI/testing/sysfs-kernel-uids new file +14 -0
Index: current/Documentation/ABI/testing/sysfs-kernel-uids
===================================================================
@@ -0,0 +1,14 @@
+What:		/sys/kernel/uids/<uid>/cpu_shares
+Date:		December 2007
+Contact:	Dhaval Giani <[email protected]>
+		Srivatsa Vaddagiri <[email protected]>
+Description:
+		The /sys/kernel/uids/<uid>/cpu_shares tunable is used
+		to set the cpu bandwidth a user is allowed. This is a
+		propotional value. What that means is that if there
+		are two users logged in, each with an equal number of
+		shares, then they will get equal CPU bandwidth. Another
+		example would be, if User A has shares = 1024 and user
+		B has shares = 2048, User B will get twice the CPU
+		bandwidth user A will. For more details refer
+		Documentation/sched-design-CFS.txt
Signature · 2 lines
regards,
Dhaval
Applied
#3 lore raw
Quoted 9 lines · Dhaval Giani
Quoted 4 lines

Hm, how about describing the units here? Can you put "10" in each file and everyone will get the same share? 100? 1? 1024 seems like an odd "share" number. Unless there is some other document you wish to refer people to do help describe these values?

It is proportional. That is, if two users have same value for shares, they will get equal bandwidth on the CPU. If they are in the ratio 1:2, then they will share it in that ratio. I've updated the patch for this. Hope it is clearer.

thanks, applied.

Ingo

#4 lore raw
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Dhaval Giani
Quoted 4 lines

Hm, how about describing the units here? Can you put "10" in each file and everyone will get the same share? 100? 1? 1024 seems like an odd "share" number. Unless there is some other document you wish to refer people to do help describe these values?

Quoted 6 lines
Quoted 4 lines

It is proportional. That is, if two users have same value for shares, they will get equal bandwidth on the CPU. If they are in the ratio 1:2, then they will share it in that ratio. I've updated the patch for this. Hope it is clearer.

thanks, applied.

unless Greg wants to push this via the sysfs git tree?

Ingo

#5 lore raw
Quoted 11 lines · Ingo Molnar
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Dhaval Giani
Quoted 4 lines

Hm, how about describing the units here? Can you put "10" in each file and everyone will get the same share? 100? 1? 1024 seems like an odd "share" number. Unless there is some other document you wish to refer people to do help describe these values?

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

It is proportional. That is, if two users have same value for shares, they will get equal bandwidth on the CPU. If they are in the ratio 1:2, then they will share it in that ratio. I've updated the patch for this. Hope it is clearer.

thanks, applied.

unless Greg wants to push this via the sysfs git tree?

Sure, I can do that, what's one more patch in my tree? :)

thanks,

greg k-h

#6 lore raw

patch add-documentation-for-fair_user_sched-sysfs-files.patch added to gregkh-2.6 tree

In reply to Dhaval Giani

This is a note to let you know that I've just added the patch titled

Subject: Add Documentation for FAIR_USER_SCHED sysfs files

to my gregkh-2.6 tree. Its filename is

add-documentation-for-fair_user_sched-sysfs-files.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/

Quoted 1 line

From [email protected] Tue Dec 11 21:51:17 2007

From: Dhaval Giani <[email protected]>
Date: Wed, 12 Dec 2007 11:18:59 +0530
Subject: Add Documentation for FAIR_USER_SCHED sysfs files
To: Greg KH <[email protected]>
Cc: lkml <[email protected]>, Ingo Molnar <[email protected]>, Andrew Morton <[email protected]>, Srivatsa Vaddagiri <[email protected]>, Balbir Singh <[email protected]>
Message-ID: <[email protected]>
Content-Disposition: inline

This patch adds documentation about /sys/kernel/uids/<uid>/cpu_share to Documentation/ABI.

---
 Documentation/ABI/testing/sysfs-kernel-uids |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
Documentation/ABI/testing/sysfs-kernel-uids new file +14 -0
@@ -0,0 +1,14 @@
+What:		/sys/kernel/uids/<uid>/cpu_shares
+Date:		December 2007
+Contact:	Dhaval Giani <[email protected]>
+		Srivatsa Vaddagiri <[email protected]>
+Description:
+		The /sys/kernel/uids/<uid>/cpu_shares tunable is used
+		to set the cpu bandwidth a user is allowed. This is a
+		propotional value. What that means is that if there
+		are two users logged in, each with an equal number of
+		shares, then they will get equal CPU bandwidth. Another
+		example would be, if User A has shares = 1024 and user
+		B has shares = 2048, User B will get twice the CPU
+		bandwidth user A will. For more details refer
+		Documentation/sched-design-CFS.txt

Patches currently in gregkh-2.6 which might be from [email protected] are

driver/struct-user_info-sysfs.patch driver/add-documentation-for-fair_user_sched-sysfs-files.patch