linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation
@ 2024-01-31 12:32 Zhang Qiao
  2024-02-28 22:44 ` Jonathan Corbet
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zhang Qiao @ 2024-01-31 12:32 UTC (permalink / raw)
  To: corbet; +Cc: mingo, chrubis, zhangqiao22, linux-doc, linux-kernel

RT_RUNTIME_SHARE is an important strategy for rt bandwidth, and
we should document this sched feature.

Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com>
---
 Documentation/scheduler/sched-rt-group.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/scheduler/sched-rt-group.rst b/Documentation/scheduler/sched-rt-group.rst
index d685609ed3d7..4d8eceb71f5e 100644
--- a/Documentation/scheduler/sched-rt-group.rst
+++ b/Documentation/scheduler/sched-rt-group.rst
@@ -12,6 +12,7 @@ Real-Time group scheduling
      2.1 System-wide settings
      2.2 Default behaviour
      2.3 Basis for grouping tasks
+     2.4 RT_RUNTIME_SHARE sched feature
    3. Future plans
 
 
@@ -146,6 +147,16 @@ For now, this can be simplified to just the following (but see Future plans):
 
    \Sum_{i} runtime_{i} <= global_runtime
 
+2.4 RT_RUNTIME_SHARE sched feature
+----------------------------
+
+RT_RUNTIME_SHARE allows a cpu borrows rt-runtime from other cpus if it runs
+out of its own rt-runtime.
+
+With this feature enabled, a rt-task probably hits 100% cpu usage and starves
+per-cpu tasks like kworkers, as a result, it may hang up the whole system.
+Therefore, in order to avoid such exception, recommand to disable this feature
+by default unless you really know what you're up to.
 
 3. Future plans
 ===============
-- 
2.18.0.huawei.25


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation
  2024-01-31 12:32 [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation Zhang Qiao
@ 2024-02-28 22:44 ` Jonathan Corbet
  2024-03-24  3:54   ` Zhang Qiao
  2024-04-09  7:25 ` Zhang Qiao
  2024-04-12  2:50 ` Bagas Sanjaya
  2 siblings, 1 reply; 6+ messages in thread
From: Jonathan Corbet @ 2024-02-28 22:44 UTC (permalink / raw)
  To: Zhang Qiao; +Cc: mingo, chrubis, zhangqiao22, linux-doc, linux-kernel

Zhang Qiao <zhangqiao22@huawei.com> writes:

> RT_RUNTIME_SHARE is an important strategy for rt bandwidth, and
> we should document this sched feature.
>
> Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com>
> ---
>  Documentation/scheduler/sched-rt-group.rst | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/Documentation/scheduler/sched-rt-group.rst b/Documentation/scheduler/sched-rt-group.rst
> index d685609ed3d7..4d8eceb71f5e 100644
> --- a/Documentation/scheduler/sched-rt-group.rst
> +++ b/Documentation/scheduler/sched-rt-group.rst
> @@ -12,6 +12,7 @@ Real-Time group scheduling
>       2.1 System-wide settings
>       2.2 Default behaviour
>       2.3 Basis for grouping tasks
> +     2.4 RT_RUNTIME_SHARE sched feature
>     3. Future plans
>  
>  
> @@ -146,6 +147,16 @@ For now, this can be simplified to just the following (but see Future plans):
>  
>     \Sum_{i} runtime_{i} <= global_runtime
>  
> +2.4 RT_RUNTIME_SHARE sched feature
> +----------------------------
> +
> +RT_RUNTIME_SHARE allows a cpu borrows rt-runtime from other cpus if it runs
> +out of its own rt-runtime.
> +
> +With this feature enabled, a rt-task probably hits 100% cpu usage and starves
> +per-cpu tasks like kworkers, as a result, it may hang up the whole system.
> +Therefore, in order to avoid such exception, recommand to disable this feature
> +by default unless you really know what you're up to.

So this doesn't appear to have been picked up by anybody...should I
carry it in docs, or is there some other reason why it hasn't gone in?

Thanks,

jon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation
  2024-02-28 22:44 ` Jonathan Corbet
@ 2024-03-24  3:54   ` Zhang Qiao
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang Qiao @ 2024-03-24  3:54 UTC (permalink / raw)
  To: corbet; +Cc: chrubis, linux-doc, linux-kernel, mingo, zhangqiao22

hi, Jonathan,

在 2024/3/24 10:47, Zhang Qiao 写道:
>
> Zhang Qiao <zhangqiao22@huawei.com> writes:
>
>> RT_RUNTIME_SHARE is an important strategy for rt bandwidth, and
>> we should document this sched feature.
>>
>> Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com>
>> ---
>>  Documentation/scheduler/sched-rt-group.rst | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/Documentation/scheduler/sched-rt-group.rst b/Documentation/scheduler/sched-rt-group.rst
>> index d685609ed3d7..4d8eceb71f5e 100644
>> --- a/Documentation/scheduler/sched-rt-group.rst
>> +++ b/Documentation/scheduler/sched-rt-group.rst
>> @@ -12,6 +12,7 @@ Real-Time group scheduling
>>       2.1 System-wide settings
>>       2.2 Default behaviour
>>       2.3 Basis for grouping tasks
>> +     2.4 RT_RUNTIME_SHARE sched feature
>>     3. Future plans
>>
>>
>> @@ -146,6 +147,16 @@ For now, this can be simplified to just the following (but see Future plans):
>>
>>     \Sum_{i} runtime_{i} <= global_runtime
>>
>> +2.4 RT_RUNTIME_SHARE sched feature
>> +----------------------------
>> +
>> +RT_RUNTIME_SHARE allows a cpu borrows rt-runtime from other cpus if it runs
>> +out of its own rt-runtime.
>> +
>> +With this feature enabled, a rt-task probably hits 100% cpu usage and starves
>> +per-cpu tasks like kworkers, as a result, it may hang up the whole system.
>> +Therefore, in order to avoid such exception, recommand to disable this feature
>> +by default unless you really know what you're up to.
>
> So this doesn't appear to have been picked up by anybody...should I
> carry it in docs, or is there some other reason why it hasn't gone in?
>

I'm not exactly sure why it wasn't added in docs before.

In my opinion, the RT_RUNTIME_SHARE sched features and sched_rt_period_us/sched_rt_runtime_us
parameters are both important parameters of rt bandwidth,it will affect the quota of rt tasks,
and improper configuration may cause the system hang up. So I think it's necessary to add it
in Documentation/scheduler/sched-rt-group.rst.

Thanks,

Qiao.

> Thanks,
>
> jon
> .
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation
  2024-01-31 12:32 [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation Zhang Qiao
  2024-02-28 22:44 ` Jonathan Corbet
@ 2024-04-09  7:25 ` Zhang Qiao
  2024-04-12  2:50 ` Bagas Sanjaya
  2 siblings, 0 replies; 6+ messages in thread
From: Zhang Qiao @ 2024-04-09  7:25 UTC (permalink / raw)
  To: corbet
  Cc: mingo, chrubis, linux-doc, linux-kernel, Steven Rostedt,
	Peter Zijlstra

Ping.

+cc Peter, Steven.

在 2024/1/31 20:32, Zhang Qiao 写道:
> RT_RUNTIME_SHARE is an important strategy for rt bandwidth, and
> we should document this sched feature.
> 
> Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com>
> ---
>  Documentation/scheduler/sched-rt-group.rst | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/scheduler/sched-rt-group.rst b/Documentation/scheduler/sched-rt-group.rst
> index d685609ed3d7..4d8eceb71f5e 100644
> --- a/Documentation/scheduler/sched-rt-group.rst
> +++ b/Documentation/scheduler/sched-rt-group.rst
> @@ -12,6 +12,7 @@ Real-Time group scheduling
>       2.1 System-wide settings
>       2.2 Default behaviour
>       2.3 Basis for grouping tasks
> +     2.4 RT_RUNTIME_SHARE sched feature
>     3. Future plans
>  
>  
> @@ -146,6 +147,16 @@ For now, this can be simplified to just the following (but see Future plans):
>  
>     \Sum_{i} runtime_{i} <= global_runtime
>  
> +2.4 RT_RUNTIME_SHARE sched feature
> +----------------------------
> +
> +RT_RUNTIME_SHARE allows a cpu borrows rt-runtime from other cpus if it runs
> +out of its own rt-runtime.
> +
> +With this feature enabled, a rt-task probably hits 100% cpu usage and starves
> +per-cpu tasks like kworkers, as a result, it may hang up the whole system.
> +Therefore, in order to avoid such exception, recommand to disable this feature
> +by default unless you really know what you're up to.
>  
>  3. Future plans
>  ===============
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation
  2024-01-31 12:32 [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation Zhang Qiao
  2024-02-28 22:44 ` Jonathan Corbet
  2024-04-09  7:25 ` Zhang Qiao
@ 2024-04-12  2:50 ` Bagas Sanjaya
  2024-04-19  8:51   ` Zhang Qiao
  2 siblings, 1 reply; 6+ messages in thread
From: Bagas Sanjaya @ 2024-04-12  2:50 UTC (permalink / raw)
  To: Zhang Qiao, corbet
  Cc: mingo, chrubis, linux-doc, linux-kernel, Steven Rostedt,
	Peter Zijlstra

[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]

On Wed, Jan 31, 2024 at 08:32:38PM +0800, Zhang Qiao wrote:
> +2.4 RT_RUNTIME_SHARE sched feature
> +----------------------------

htmldocs build reports new warning:

Documentation/scheduler/sched-rt-group.rst:151: WARNING: Title underline too short.

2.4 RT_RUNTIME_SHARE sched feature
----------------------------

I have to extend the underline:

---- >8 ----
diff --git a/Documentation/scheduler/sched-rt-group.rst b/Documentation/scheduler/sched-rt-group.rst
index 4d8eceb71f5ed8..751113fcd35850 100644
--- a/Documentation/scheduler/sched-rt-group.rst
+++ b/Documentation/scheduler/sched-rt-group.rst
@@ -148,7 +148,7 @@ For now, this can be simplified to just the following (but see Future plans):
    \Sum_{i} runtime_{i} <= global_runtime
 
 2.4 RT_RUNTIME_SHARE sched feature
-----------------------------
+----------------------------------
 
 RT_RUNTIME_SHARE allows a cpu borrows rt-runtime from other cpus if it runs
 out of its own rt-runtime.

Wording suggestions below.

> +
> +RT_RUNTIME_SHARE allows a cpu borrows rt-runtime from other cpus if it runs
"... to borrow rt-runtime ..."
> +out of its own rt-runtime.
> +
> +With this feature enabled, a rt-task probably hits 100% cpu usage and starves
"... a rt-task may hit ... and can stall other per-cpu tasks ..."
> +per-cpu tasks like kworkers, as a result, it may hang up the whole system.
"..., which lead into system hang."
> +Therefore, in order to avoid such exception, recommand to disable this feature
> +by default unless you really know what you're up to.
"Thus, it is advised to disable this feature by default to avoid aforementioned
issue unless you know what you're doing."

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation
  2024-04-12  2:50 ` Bagas Sanjaya
@ 2024-04-19  8:51   ` Zhang Qiao
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang Qiao @ 2024-04-19  8:51 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: mingo, chrubis, linux-doc, linux-kernel, Steven Rostedt,
	Peter Zijlstra, corbet



在 2024/4/12 10:50, Bagas Sanjaya 写道:
> On Wed, Jan 31, 2024 at 08:32:38PM +0800, Zhang Qiao wrote:
>> +2.4 RT_RUNTIME_SHARE sched feature
>> +----------------------------
> 
> htmldocs build reports new warning:
> 
> Documentation/scheduler/sched-rt-group.rst:151: WARNING: Title underline too short.
> 
> 2.4 RT_RUNTIME_SHARE sched feature
> ----------------------------
> 
> I have to extend the underline:
> 
> ---- >8 ----
> diff --git a/Documentation/scheduler/sched-rt-group.rst b/Documentation/scheduler/sched-rt-group.rst
> index 4d8eceb71f5ed8..751113fcd35850 100644
> --- a/Documentation/scheduler/sched-rt-group.rst
> +++ b/Documentation/scheduler/sched-rt-group.rst
> @@ -148,7 +148,7 @@ For now, this can be simplified to just the following (but see Future plans):
>     \Sum_{i} runtime_{i} <= global_runtime
>  
>  2.4 RT_RUNTIME_SHARE sched feature
> -----------------------------
> +----------------------------------
>  
>  RT_RUNTIME_SHARE allows a cpu borrows rt-runtime from other cpus if it runs
>  out of its own rt-runtime.
> 
> Wording suggestions below.

Hi, Bagas,
Thanks for you suggestions, i will update in v2.


Zhang Qiao.

> 
>> +
>> +RT_RUNTIME_SHARE allows a cpu borrows rt-runtime from other cpus if it runs
> "... to borrow rt-runtime ..."
>> +out of its own rt-runtime.
>> +
>> +With this feature enabled, a rt-task probably hits 100% cpu usage and starves
> "... a rt-task may hit ... and can stall other per-cpu tasks ..."
>> +per-cpu tasks like kworkers, as a result, it may hang up the whole system.
> "..., which lead into system hang."
>> +Therefore, in order to avoid such exception, recommand to disable this feature
>> +by default unless you really know what you're up to.
> "Thus, it is advised to disable this feature by default to avoid aforementioned
> issue unless you know what you're doing."
> 
> Thanks.
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-19  8:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-31 12:32 [PATCH] sched/Documentation: Add RT_RUNTIME_SHARE documentation Zhang Qiao
2024-02-28 22:44 ` Jonathan Corbet
2024-03-24  3:54   ` Zhang Qiao
2024-04-09  7:25 ` Zhang Qiao
2024-04-12  2:50 ` Bagas Sanjaya
2024-04-19  8:51   ` Zhang Qiao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).