From patchwork Mon Apr 21 09:54:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28672 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2BC862032B for ; Mon, 21 Apr 2014 09:56:25 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id jy13sf20498537veb.10 for ; Mon, 21 Apr 2014 02:56:24 -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=Pf78x83f3fstx/ZnsYtVAWorahDHgWZbjnvWEVCFUHo=; b=epTju8iJ9hPkKbKvwzwPWpUifJ/rPF28c8eFpuuPpAVdy36TRjPDXxZw0//8YH8lO6 sqcFvV6c2qCun7Tiwk23eXHM9WilfNpuGcroPR3CBPAAGOtOh+iTPlH4vqnP6af/s5YC Q6fFAfoDk+1/93LGemSiKG44SypZCbb1SZdIQlFyS4sNtcrnaR5KGtZf9ykDxiqOF5SN NYN+lJBkr2+w01lZAIZPlkE6SfXewbNosEKARq3OcqLK1knNNiHoOd5Q2hLjkUa7P8in oga0WSPI6XGMGTC/NPYEpvsOAMRU1sRSsuwA0fbeyJv7nw13yYqStwMGenkvDCZjm2aN hsLw== X-Gm-Message-State: ALoCoQmzKZx1kQMo2qfd2gOc393xj3qGHnkup+O0jyKIcrBGXSe7F672Hr/jpLYyCdB7VMRkVvjq X-Received: by 10.236.86.67 with SMTP id v43mr16737689yhe.41.1398074184922; Mon, 21 Apr 2014 02:56:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.114 with SMTP id m105ls650904qgd.87.gmail; Mon, 21 Apr 2014 02:56:24 -0700 (PDT) X-Received: by 10.220.133.197 with SMTP id g5mr2547290vct.20.1398074184821; Mon, 21 Apr 2014 02:56:24 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id fn10si6163905vdc.99.2014.04.21.02.56.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 02:56:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 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.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so7462777veb.41 for ; Mon, 21 Apr 2014 02:56:24 -0700 (PDT) X-Received: by 10.52.173.165 with SMTP id bl5mr25632019vdc.13.1398074184650; Mon, 21 Apr 2014 02:56:24 -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 ib8csp280249vcb; Mon, 21 Apr 2014 02:56:24 -0700 (PDT) X-Received: by 10.66.250.161 with SMTP id zd1mr2078238pac.136.1398074183298; Mon, 21 Apr 2014 02:56:23 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oz6si15540894pac.51.2014.04.21.02.56.22; Mon, 21 Apr 2014 02:56:22 -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 S1751807AbaDUJ4N (ORCPT + 26 others); Mon, 21 Apr 2014 05:56:13 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:49229 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbaDUJzm (ORCPT ); Mon, 21 Apr 2014 05:55:42 -0400 Received: by mail-we0-f174.google.com with SMTP id t60so3479056wes.5 for ; Mon, 21 Apr 2014 02:55:41 -0700 (PDT) X-Received: by 10.194.92.81 with SMTP id ck17mr28186241wjb.14.1398074141207; Mon, 21 Apr 2014 02:55:41 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id lh6sm56482286wjb.27.2014.04.21.02.55.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 21 Apr 2014 02:55:40 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linaro-networking@linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Viresh Kumar Subject: [PATCH V2 03/19] tick: rearrange members of 'struct tick_sched' Date: Mon, 21 Apr 2014 15:24:59 +0530 Message-Id: <985a0da459304c2df3894ce56c24831fbe14a611.1398072824.git.viresh.kumar@linaro.org> 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.182 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. Change in footprints of this structure: For x86: size reduced to 232 from 240 bytes For ARM: no change 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; };