Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1164727

Re: [PATCH 4/8] nohz: Remove idle task special case

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Preeti U Murthy <preeti@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/8] nohz: Remove idle task special case
Date Sun, 14 Jun 2015 03:50:02 +0200
Message-ID <pB5dD-5IG-1@gated-at.bofh.it> (permalink)
References <pAeCm-4hX-1@gated-at.bofh.it> <pAeM3-4tI-49@gated-at.bofh.it>
X-Original-To Frederic Weisbecker <fweisbec@gmail.com>, LKML <linux-kernel@vger.kernel.org>
X-Helo d03dlp03.boulder.ibm.com
X-Mailfrom preeti@linux.vnet.ibm.com
X-Rcptto linux-kernel@vger.kernel.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version 1.0
Content-Type text/plain; charset=ISO-8859-6
Content-Transfer-Encoding 7bit
X-Tm-As-Mml disable
X-Content-Scanned Fidelis XPS MAILER
X-Cbid 15061401-0029-0000-0000-00000A87C2BB
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 71
Organization linux.* mail to news gateway
X-Original-Cc Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, Christoph Lameter <cl@linux.com>, Ingo Molnar <mingo@kernel.org>, Viresh Kumar <viresh.kumar@linaro.org>, Rik van Riel <riel@redhat.com>
X-Original-Date Sun, 14 Jun 2015 07:14:34 +0530
X-Original-Message-ID <557CDC82.9080903@linux.vnet.ibm.com>
X-Original-References <1434044168-23173-1-git-send-email-fweisbec@gmail.com> <1434044168-23173-5-git-send-email-fweisbec@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1164727

Show key headers only | View raw


On 06/11/2015 11:06 PM, Frederic Weisbecker wrote:
> This is a leftover from old days to avoid conflicts with dynticks idle
> code. Now full dynticks and idle dynticks are better integrated and
> interact without known issue.

I am sorry but I fail to understand why the check on idle task was there
in the first place in the below code paths. It would help if you could
clarify this in the changelog as well.

> 
> So lets remove it.
> 
> Cc: Christoph Lameter <cl@linux.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc; John Stultz <john.stultz@linaro.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
> Cc: Rik van Riel <riel@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> ---
>  kernel/time/tick-sched.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index 812f7a3..324482f 100644
> --- a/kernel/time/tick-sched.c
> +++ b/kernel/time/tick-sched.c
> @@ -208,10 +208,8 @@ void __tick_nohz_full_check(void)
>  	struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
> 
>  	if (tick_nohz_full_cpu(smp_processor_id())) {
> -		if (ts->tick_stopped && !is_idle_task(current)) {
> -			if (!can_stop_full_tick())

can_stop_full_tick() would have bailed out if the current task was idle,
since it checks for the number of tasks being greater than 1 to restart
the tick. So why was the check is_idle_task() introduced earlier ?

> -				tick_nohz_restart_sched_tick(ts, ktime_get());
> -		}
> +		if (ts->tick_stopped && !can_stop_full_tick())
> +			tick_nohz_restart_sched_tick(ts, ktime_get());
>  	}
>  }
> 
> @@ -710,7 +708,7 @@ static void tick_nohz_full_stop_tick(struct tick_sched *ts)
>  #ifdef CONFIG_NO_HZ_FULL
>  	int cpu = smp_processor_id();
> 
> -	if (!tick_nohz_full_cpu(cpu) || is_idle_task(current))
> +	if (!tick_nohz_full_cpu(cpu))

If the current task was indeed idle, the check on ts->inidle would have
succeeded in tick_irq_exit() and we would not have reached this function
at all, isn't it? So here too I am unable to understand why we had it in
the first place.

Regards
Preeti U Murthy
>  		return;
> 
>  	if (!ts->tick_stopped && ts->nohz_mode == NOHZ_MODE_INACTIVE)
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 4/8] nohz: Remove idle task special case Preeti U Murthy <preeti@linux.vnet.ibm.com> - 2015-06-14 03:50 +0200

csiph-web