From patchwork Tue Sep 15 10:57:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 53634 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 69A7B22A22 for ; Tue, 15 Sep 2015 10:58:01 +0000 (UTC) Received: by lbcao8 with SMTP id ao8sf55716559lbc.1 for ; Tue, 15 Sep 2015 03:58:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=TvoO+P+UidF1j14vYNovRf1flIYIKsxMgbWjpHHAc3k=; b=lh7eNha4V4B2I93oZ9tGgInPodfn+y6aK7AobratJ/0eFvivex9FS/JT3OEJjte4pI OamCJ2LbVshNERbgpoqlYsNqBME7KV27vLT5OkKtBthl8V4ALLgERO6hXXw/wxR+v+p3 MdKzQISwhGEJBoIt5rHGpAecR+YjrkKiBWjT1exHdaVOpcx1ZCBeh+hwIeaDmr0DjwIx J3I32gV6TlhnYD3qcJpcevSI6WjBmYfgAHCkiFoM1TvyuANHgfF1J22Z4fvnbeXJmsv5 zwfqYHLgBiCUILQj7DI9gJNmSs2JuCP6townE/jrp96kusYXiEd6D+1eTSadYZ/OI6+C kXTQ== X-Gm-Message-State: ALoCoQlgvXPWFBTGPYoWlCzid7ThuDin8spu8NwkvtpQu8WzLcam90ZMLIpdQ5tIHu43VH7R/FM4 X-Received: by 10.194.109.233 with SMTP id hv9mr2461283wjb.1.1442314680310; Tue, 15 Sep 2015 03:58:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.67 with SMTP id y3ls124861lay.55.gmail; Tue, 15 Sep 2015 03:58:00 -0700 (PDT) X-Received: by 10.152.198.137 with SMTP id jc9mr11585651lac.58.1442314680117; Tue, 15 Sep 2015 03:58:00 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id c7si8968416lbd.63.2015.09.15.03.58.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 03:58:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbpo4 with SMTP id o4so82860455lbp.2 for ; Tue, 15 Sep 2015 03:58:00 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr19859830lbb.36.1442314680018; Tue, 15 Sep 2015 03:58:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1720772lbq; Tue, 15 Sep 2015 03:57:59 -0700 (PDT) X-Received: by 10.68.69.98 with SMTP id d2mr45133008pbu.137.1442314678880; Tue, 15 Sep 2015 03:57:58 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rm9si30967443pab.83.2015.09.15.03.57.58; Tue, 15 Sep 2015 03:57:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752257AbbIOK54 (ORCPT + 29 others); Tue, 15 Sep 2015 06:57:56 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:37434 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751640AbbIOK5z (ORCPT ); Tue, 15 Sep 2015 06:57:55 -0400 Received: by wicfx3 with SMTP id fx3so21601186wic.0 for ; Tue, 15 Sep 2015 03:57:54 -0700 (PDT) X-Received: by 10.180.187.180 with SMTP id ft20mr6026610wic.78.1442314674123; Tue, 15 Sep 2015 03:57:54 -0700 (PDT) Received: from localhost.localdomain ([78.110.172.67]) by smtp.gmail.com with ESMTPSA id d8sm24068476wiy.1.2015.09.15.03.57.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Sep 2015 03:57:53 -0700 (PDT) From: Leo Yan To: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH] sched/fair: Polish comments for LOAD_AVG_MAX Date: Tue, 15 Sep 2015 18:57:37 +0800 Message-Id: <1442314657-14949-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leo.yan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Macro LOAD_AVG_MAX is defined far away from the precompuated tables for decay calculation in code; So explicitly comments for this. Also fix one typo: s/LOAD_MAX_AVG/LOAD_AVG_MAX. Signed-off-by: Leo Yan --- kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6e2e348..b716e23 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -661,11 +661,12 @@ static unsigned long task_h_load(struct task_struct *p); /* * We choose a half-life close to 1 scheduling period. - * Note: The tables below are dependent on this value. + * Note: The tables runnable_avg_yN_inv and runnable_avg_yN_sum are + * dependent on this value. */ #define LOAD_AVG_PERIOD 32 #define LOAD_AVG_MAX 47742 /* maximum possible load avg */ -#define LOAD_AVG_MAX_N 345 /* number of full periods to produce LOAD_MAX_AVG */ +#define LOAD_AVG_MAX_N 345 /* number of full periods to produce LOAD_AVG_MAX */ /* Give new sched_entity start runnable values to heavy its load in infant time */ void init_entity_runnable_average(struct sched_entity *se)