From patchwork Wed Oct 4 08:04:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 114753 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2822272qgn; Wed, 4 Oct 2017 01:04:53 -0700 (PDT) X-Received: by 10.84.129.132 with SMTP id b4mr7067925plb.412.1507104293580; Wed, 04 Oct 2017 01:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507104293; cv=none; d=google.com; s=arc-20160816; b=TZGW4hVWAPtkK18TbqoLtuUWtrjPGvOaFaD3+htemYaWgkbqLYy1wApYMrbtw5phJO 0aSPX/+RwRYEn83HgT9l6eG/+NXOTkukZDQ4SGDzxKbrSgyIu3+aN0TZYxaCdG9w0eoQ R6xM6zKl3fg4WoGDUtmpy0mtCiQruaCTQ5E55/tcnqlE3xdy8uSONT2orMnj050T4LbC nnW6nn9psEFZZV41BdggzQGABeWiv8BAKNOTWkfH5de2Bfki2Bm99hO/EzTPH0McwX09 uWk3LB66YPDU1kQjvsr3HCs4gY1sv72j1Jw/sH6bL0DwpSXVUyRDsPrlVfDtcKptX4No Y7ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=3pwBSl7T1ecPKWxQGqkdkwXWIDg4+huomt4diow/KdA=; b=QOmqSpF0H+jYlGak6G1IwFfWAvKOg4BKbWWACL71f6uL7IR0CTBXEjLWbmYVCvlC2p xZ7JLSMNy1rzU9tGx1mpZJChtX/xAIeHJA5oSZJMXMZQffAY26CMAMw0xOdlRLcRagVA mCtgVQ/oF/1yPb15huGAgCpva2Svw1NRCScyzbXCK5YTYCkwmhnfBV5KcRypLR0krdKB rQwmWGyDeo4Jtm9ZIfRWLEH3IK5GgsW/Df2EUoUk8/D8mwy+w7BcUj+AwDMD7vvPWTNE F+5915o3NJgTjEYtcqLkfyMehf6BS/Yw0THEWbZAxQSvsB1hxyigQuIR3GYr4+Gqr3xx j3/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZrSva+rB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i4si11244396pfj.577.2017.10.04.01.04.53; Wed, 04 Oct 2017 01:04:53 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZrSva+rB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751447AbdJDIEu (ORCPT + 26 others); Wed, 4 Oct 2017 04:04:50 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:47655 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbdJDIEq (ORCPT ); Wed, 4 Oct 2017 04:04:46 -0400 Received: by mail-pg0-f44.google.com with SMTP id r25so3718708pgn.4 for ; Wed, 04 Oct 2017 01:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=3pwBSl7T1ecPKWxQGqkdkwXWIDg4+huomt4diow/KdA=; b=ZrSva+rBSNwd91087vBHyEsIeL+b6i/nMdjzzEHOsDX3j1hkmIYQ79E8IRCu5bWNKY 0s44lYaP6MoDaIF8B9cYUekDSk2Rk0j941rDRLhJjvZ3olzdBR6EThYeVlBF/87Na2J2 8A4zk0eonTmMWtVFzeYk4KgW1jSWkl9HmYO1U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3pwBSl7T1ecPKWxQGqkdkwXWIDg4+huomt4diow/KdA=; b=lZSgzqOEuOMPZkbNBcL/RSZxjV0eFIPxeAeU95U9VQA38kmiP3vU0fRDrPmobHzZdR 6f8zvq8Zv68IBHQUpgULRnFVyBpOp2L45jvAwOsiH1nUztiajODs0FQrR0haJftyXm00 XHoAv9HUAhrKh6SZiXh6BC5MRRdvRXCy+I0JK6TpxsaTwrWYXRlqUEAC/IFx+821wVSL V2BcWVkNbnWi+KzvxGhfL5UGdO3Su88dWzRAWyJV135xoMngWiSu4xYo/I+cpjSxmpZf sQPZ9+UnhFsFHPQ11oK2ILrLIW1CRqk8N0klP2VpmGursgccj6PbFPl3pj9GkRvf53WI szQQ== X-Gm-Message-State: AHPjjUh12yQemZZlQEoxRqru0tNfWq5K78SLKALgEPZf7N4b4KwXkr7W SezcpgzQOKA/B3P/ge9mvm4yoQ== X-Google-Smtp-Source: AOwi7QBzYAoOUwJEM22xG9sIOpcRV9owU15hijKVdVsLdZICnbnu1bEhaaOX0wio5ws8xBG6vMyBdQ== X-Received: by 10.84.179.129 with SMTP id b1mr18697715plc.267.1507104285977; Wed, 04 Oct 2017 01:04:45 -0700 (PDT) Received: from localhost.localdomain (li1068-205.members.linode.com. [106.184.3.205]) by smtp.gmail.com with ESMTPSA id r12sm21830904pgp.81.2017.10.04.01.04.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Oct 2017 01:04:44 -0700 (PDT) From: Leo Yan To: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org Cc: Leo Yan , Dietmar Eggemann , Morten Rasmussen , Chris Redpath , Joel Fernandes , Vincent Guittot , Patrick Bellasi Subject: [PATCH v3 1/2] sched/fair: make capacity_margin __read_mostly Date: Wed, 4 Oct 2017 16:04:33 +0800 Message-Id: <1507104274-24385-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable 'capacity_margin' is used with read operation for most cases to calculate the capacity margin, put it into __read_mostly section. Cc: Dietmar Eggemann Cc: Morten Rasmussen Cc: Chris Redpath Cc: Joel Fernandes Cc: Vincent Guittot Cc: Patrick Bellasi Signed-off-by: Leo Yan --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 70ba32e..ad03bf4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -129,7 +129,7 @@ unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL; * * (default: ~20%) */ -unsigned int capacity_margin = 1280; +unsigned int capacity_margin __read_mostly = 1280; static inline void update_load_add(struct load_weight *lw, unsigned long inc) {