From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751373AbdAVH1Q (ORCPT ); Sun, 22 Jan 2017 02:27:16 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:36280 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750813AbdAVH1I (ORCPT ); Sun, 22 Jan 2017 02:27:08 -0500 From: Zhou Chengming To: , CC: , , , , , Subject: [PATCH] sched: Documentation: sched-rt-group: fix example error Date: Sun, 22 Jan 2017 15:22:35 +0800 Message-ID: <1485069755-44287-1-git-send-email-zhouchengming1@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.58845E84.01DA,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 0a5f22014d6c4aacd0dcffc644682de8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I feel that the example given in the document to show the possibility of task starvation of configurable period is wrong. The example says group A and B both have 50% bandwidth, and a while (1) loop in A will run for the full period of B and can starve B's tasks. So I think the runtime of group A should be 50000us, then the period and runtime of group B should be 50000us and 25000us. Signed-off-by: Zhou Chengming --- Documentation/scheduler/sched-rt-group.txt | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/scheduler/sched-rt-group.txt b/Documentation/scheduler/sched-rt-group.txt index a03f0d9..d8fce3e 100644 --- a/Documentation/scheduler/sched-rt-group.txt +++ b/Documentation/scheduler/sched-rt-group.txt @@ -158,11 +158,11 @@ as its prone to starvation without deadline scheduling. Consider two sibling groups A and B; both have 50% bandwidth, but A's period is twice the length of B's. -* group A: period=100000us, runtime=10000us - - this runs for 0.01s once every 0.1s +* group A: period=100000us, runtime=50000us + - this runs for 0.05s once every 0.1s -* group B: period= 50000us, runtime=10000us - - this runs for 0.01s twice every 0.1s (or once every 0.05 sec). +* group B: period= 50000us, runtime=25000us + - this runs for 0.025s twice every 0.1s (or once every 0.05 sec). This means that currently a while (1) loop in A will run for the full period of B and can starve B's tasks (assuming they are of lower priority) for a whole -- 1.7.7