From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751287AbcEIHFK (ORCPT ); Mon, 9 May 2016 03:05:10 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56966 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbcEIHFJ (ORCPT ); Mon, 9 May 2016 03:05:09 -0400 Date: Mon, 9 May 2016 09:05:02 +0200 From: Peter Zijlstra To: Zhou Chengming Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, guohanjun@huawei.com, huawei.libin@huawei.com Subject: Re: [PATCH] sched: fix the calculation of __sched_period in sched_slice() Message-ID: <20160509070502.GA3430@twins.programming.kicks-ass.net> References: <1462761957-36259-1-git-send-email-zhouchengming1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1462761957-36259-1-git-send-email-zhouchengming1@huawei.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 09, 2016 at 10:45:57AM +0800, Zhou Chengming wrote: > When we get the sched_slice of a sched_entity, we use cfs_rq->nr_running > to calculate the whole __sched_period. But cfs_rq->nr_running is the > number of sched_entity in that cfs_rq, rq->nr_running is the number > of all the tasks that are not throttled. So we should use the > rq->nr_running to calculate the whole __sched_period value. No, this was very much on purpose.