From patchwork Mon Apr 14 16:23:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28332 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5FC9120534 for ; Mon, 14 Apr 2014 16:25:11 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id b6sf31633377yha.8 for ; Mon, 14 Apr 2014 09:25:11 -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:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=g+MjCfg5cWKDGNTY+IhipL1vP8Df7fRVXVyukXZ13iU=; b=H1n/OUs7cxGzHn9VQMbzLz3hw5w/0WcPz0AliozJ11cGWNdQ47cFEBJ8HFDcl7ZKZR mS5bNwYS7JX82iSAV7/+9xrPRRyV70snrO5DY1fd0GSbHIgHKI0L7emH76zwX5mvkbck 30S/AGbrg6pASa0PLzoRVvkOz6zvCqg7vYoG4GFtWDibXEkmeU+7kIjCnDItYaoSDWjl t7dufirCu63u8JEiIH/VhhlUSHMSUqASCpOxxk5xFvbIeRBxkrznrkxd4Wf/6UT7uCSW P5/CkufS79KBEfUq2SuOBlWas/4+dV7sDwDDyfHPLDCRNhHd1SGPfW4dJQ/d2dl7jOxi vOtQ== X-Gm-Message-State: ALoCoQkY6XbWmQsQYBo5q5et4bEwjOKrfa5Qg3V92VtuKAih8kvN/+0OOGvL4KBnXilufu2GFhPl X-Received: by 10.58.111.202 with SMTP id ik10mr19676538veb.4.1397492711133; Mon, 14 Apr 2014 09:25:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.70 with SMTP id u64ls2606334qgd.80.gmail; Mon, 14 Apr 2014 09:25:11 -0700 (PDT) X-Received: by 10.52.134.202 with SMTP id pm10mr199004vdb.55.1397492710972; Mon, 14 Apr 2014 09:25:10 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id bp12si2837251veb.81.2014.04.14.09.25.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:25:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so8098129veb.28 for ; Mon, 14 Apr 2014 09:25:10 -0700 (PDT) X-Received: by 10.220.147.16 with SMTP id j16mr37505632vcv.14.1397492710862; Mon, 14 Apr 2014 09:25:10 -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.220.221.72 with SMTP id ib8csp162721vcb; Mon, 14 Apr 2014 09:25:10 -0700 (PDT) X-Received: by 10.66.251.101 with SMTP id zj5mr3090640pac.154.1397492709868; Mon, 14 Apr 2014 09:25:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si9150226paw.45.2014.04.14.09.25.09; Mon, 14 Apr 2014 09:25:09 -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 S1755304AbaDNQYf (ORCPT + 26 others); Mon, 14 Apr 2014 12:24:35 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:32994 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755115AbaDNQY3 (ORCPT ); Mon, 14 Apr 2014 12:24:29 -0400 Received: by mail-pa0-f48.google.com with SMTP id hz1so8387600pad.7 for ; Mon, 14 Apr 2014 09:24:28 -0700 (PDT) X-Received: by 10.68.242.68 with SMTP id wo4mr45523885pbc.32.1397492668602; Mon, 14 Apr 2014 09:24:28 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id n6sm34733064pbj.22.2014.04.14.09.24.25 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:24:28 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Arvind.Chauhan@arm.com, linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH 03/38] tick: rearrange members of 'struct tick_sched' Date: Mon, 14 Apr 2014 21:53:25 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: 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: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=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: , Rearrange members of 'struct tick_sched' to make it more readable. i.e. By keeping all ktime_t members together, similarly 'unsigned long' and 'int' as well. I couldn't figure out breaking any logical blocks here which we wanted to keep together. This is the change in footprints after this change. For x86: size of this structure changed from 240 to 232 bytes For ARM: didn't see a difference, was 160 bytes Signed-off-by: Viresh Kumar --- include/linux/tick.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/include/linux/tick.h b/include/linux/tick.h index 8cc804c..edabc7d 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h @@ -35,19 +35,17 @@ enum tick_nohz_mode { * struct tick_sched - sched tick emulation and no idle tick control/stats * @sched_timer: hrtimer to schedule the periodic tick in high * resolution mode - * @check_clocks: tracks if clockevent device is recently changed * @nohz_mode: Current NOHZ mode + * @check_clocks: tracks if clockevent device is recently changed + * @idle_jiffies: jiffies at the entry to idle for idle time accounting + * @idle_calls: Total number of idle calls + * @idle_sleeps: Number of idle calls, where the sched tick was stopped + * @last_jiffies: Last updated value of jiffies + * @next_jiffies: Next jiffie for which timer is requested * @last_tick: Store the last tick expiry time when the tick * timer is modified for nohz sleeps. This is necessary * to resume the tick timer operation in the timeline * when the CPU returns from nohz sleep. - * @inidle: CPU is currently executing from within the idle loop - * @tick_stopped: Indicator that the idle tick has been stopped - * @idle_jiffies: jiffies at the entry to idle for idle time accounting - * @idle_calls: Total number of idle calls - * @idle_sleeps: Number of idle calls, where the sched tick was stopped - * @idle_active: similar to inidle, but is reset when we get an interrupt - * while being in idle * @idle_entrytime: Time when the idle call was entered * @idle_waketime: Time when the idle was interrupted * @idle_exittime: Time when the idle state was left @@ -55,31 +53,33 @@ enum tick_nohz_mode { * @iowait_sleeptime: Sum of the time slept in idle with sched tick stopped, * with IO outstanding * @sleep_length: Duration of the current idle sleep - * @last_jiffies: Last updated value of jiffies - * @next_jiffies: Next jiffie for which timer is requested * @idle_expires: Time when we should come out of idle or next timer event + * @inidle: CPU is currently executing from within the idle loop + * @idle_active: similar to inidle, but is reset when we get an interrupt + * while being in idle + * @tick_stopped: Indicator that the idle tick has been stopped * @do_timer_last: CPU was the last one doing do_timer before going idle */ struct tick_sched { struct hrtimer sched_timer; - unsigned long check_clocks; enum tick_nohz_mode nohz_mode; - ktime_t last_tick; - int inidle; - int tick_stopped; + unsigned long check_clocks; unsigned long idle_jiffies; unsigned long idle_calls; unsigned long idle_sleeps; - int idle_active; + unsigned long last_jiffies; + unsigned long next_jiffies; + ktime_t last_tick; ktime_t idle_entrytime; ktime_t idle_waketime; ktime_t idle_exittime; ktime_t idle_sleeptime; ktime_t iowait_sleeptime; ktime_t sleep_length; - unsigned long last_jiffies; - unsigned long next_jiffies; ktime_t idle_expires; + int inidle; + int idle_active; + int tick_stopped; int do_timer_last; };