From patchwork Mon Oct 2 00:30:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 114537 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp104203qgn; Sun, 1 Oct 2017 17:30:35 -0700 (PDT) X-Received: by 10.84.244.198 with SMTP id f6mr3196791plt.32.1506904235115; Sun, 01 Oct 2017 17:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506904235; cv=none; d=google.com; s=arc-20160816; b=ej/eRZ4Fy/1qhzm6j1J8ZFSklIwaklR4ISevgHxwOy5LzZymScDjQ/It21BszkoIOs Q+Utc4oWGF1o9tEp68lzVZNu3mj9rQOfhYCp/DJu5XkXWUoJrfAwHxF9Uub4RhIOFjEy 0hTdULfYHXURw+VDYTQxKZg8QIoItfR1xGafc0CZIxu3RiyWFeUnIWx5crDuncpId82y zNouwAzrSZzAs47Uo5Cry0w3CCpcMbdzDwwp0IkHH5RYFWyH9K6C0V/JAbaypFRVwa// y+j9Alm21viJp033YkbNHnhStEeApmeFfYLlN97RYp4wH+beeyxW0bFs0KxSGAWDSPFC 26NA== 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=GpR63KmhmnPJpVr8qBf43M4DtHfCIR1vUkii5p/Gwm5b4gOaAwJIBpbpszS9rndcZm mj7FZgMdH4URc8d9/81nj5X2T99UBeUJJQTgY43FmcWkhXYCj+VHzMhod6O/cSaT6csy V9GkqYO/ITkhVmZWs9aYtnsbV2n83aXcEfX5W9R6uvUJVeqlecXejD5a0eD69+qpNHJA i46BQS0mr7JzN76Q/Q6QcGtRPKCP6v5v694ShIYHNBqmwhaqqX+9rAZI0kolVR3UF28Z hREe6A/EXOCSj6PbUakXgda8j07GmqgQuzVvTEHopdhtKx0tsXOZfnDWxJkb6+27AXAJ YI+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X3q4PL/j; 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 60si7053404ple.818.2017.10.01.17.30.34; Sun, 01 Oct 2017 17:30:35 -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=X3q4PL/j; 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 S1751430AbdJBAaa (ORCPT + 26 others); Sun, 1 Oct 2017 20:30:30 -0400 Received: from mail-pg0-f50.google.com ([74.125.83.50]:56455 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbdJBAa3 (ORCPT ); Sun, 1 Oct 2017 20:30:29 -0400 Received: by mail-pg0-f50.google.com with SMTP id n1so1479034pgt.13 for ; Sun, 01 Oct 2017 17:30:29 -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=X3q4PL/jTBW+GiyqCa6z/qOHrbftE7xjwIfp+wr+CoQo14f0HI0kcNIO86MD37ULX4 vpqzKhxG453HJth3DPi9/PgTEPy4DayHVYGGmHJDPGPz6xNq6WI71Ol4npTqcpHZwRBf fLdqsatJgcdKXcz8e+wuVXXBDmLDwaES6mNmg= 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=Ha82EPrbJ+MrHSS1o8RN065Xi6jLHTkWwRx8kbPeEmDCsLKruzr9df60NKIuLcs9U1 nATKAxZAvi0jPhuw71G30fFA/LcHHR1FInfGN3MHKLiVSJj+hgHGyYoe1pZJRVbFq74W 89busWetVFPLjeWmR0zzvWZ5qVhNH7bAxX7scOtf7eUS2zRd/XTVfeR0eFyTxUhrVmwm VxLkYmgwB2fo6q2VA0WxO8/81QVssRTqKb4ilu/cm+H1A45+qC5R/PoIAHDTkJ12IC4A x4Xh3Y8q/HhhSylwWgZVIeMxab8G8XAvW1U2XUUGUnhZRMdOY/x4YLbjyUPLVmGDKn6w KBbA== X-Gm-Message-State: AMCzsaWjmqdyE+CzZUnXr4KW46EeJ2NPJq+ztG11ajixgMJFUXHfA1Uk dVrW8z3WYrA6vOw82BkuR0XSBA== X-Google-Smtp-Source: AOwi7QC4DAB4NDTIFC4k6rS2miOttFGrOHeuZKQcrsgNGT2k5eCg5M9IruXbg+W59+hTBCe7C12awA== X-Received: by 10.99.95.145 with SMTP id t139mr4071882pgb.344.1506904229151; Sun, 01 Oct 2017 17:30:29 -0700 (PDT) Received: from localhost.localdomain (li1068-205.members.linode.com. [106.184.3.205]) by smtp.gmail.com with ESMTPSA id z74sm15306729pfi.156.2017.10.01.17.30.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 01 Oct 2017 17:30:27 -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 v2 1/2] sched/fair: make capacity_margin __read_mostly Date: Mon, 2 Oct 2017 08:30:11 +0800 Message-Id: <1506904212-15354-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) {