Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5034231imm; Tue, 9 Oct 2018 08:46:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV60uHe0CwCUkqaZIx12SI8Dmdw2uc28VABjf4upIz5wVOXVmJOqj72I3cvBK9nFww7J5TF5M X-Received: by 2002:a62:cac4:: with SMTP id y65-v6mr30620758pfk.27.1539099965416; Tue, 09 Oct 2018 08:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539099965; cv=none; d=google.com; s=arc-20160816; b=Hp6oxfHS3lM08LjGZXEU8eRu8+IA971CV6kE2zFoZ/rag5//TuUjNraD4S5XkxFvO7 +blGjEGaC68HnkhaiabKhVyN0UJ+13ArN0AVfjA5KxV8LNwhwW2jgaTz9C97LqkAOCVD BFs7q1a+hnf5lrEl7nE23lLbVCjjCCU3t47BQ/+RApKjt7VXTna+jRXzao8jliis3iPt Q96j8oZxTqJXa58hRs7gmiyRi2DZuYG+skxj5F6qQbKuCq+wweaUGmoyCx4nn/Uz48ul n4TOjDjaAK+cax4WR/YXz+Vpp9n8m9uZ8VVzCJO8NWuFbtzDwScC/HZq4chRwMhw/n9E XDzQ== 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; bh=SgUb0fUQnInh8AGjpNF6YiKgjWGzYucakiyTLmRr5KA=; b=HlxTaEOXu/ljXa7I0/zLbCci0eNmKdOoKz0iWS/Mg7M4UhNImMQg4xP9efPpfbHbli 3LMHxla/rDfJSeFm6DLYxR2Pcrq1wCio+IhHQr9qPfJjnR9O+tsKhS5eMgYzsDBlcii4 Zuf+ZNeFmG35WH02EcDRINKHseDFmUeDNJ8634lhTpLqBm4/6aZUx5YwyHKmbyyLbIfo zbyuEwUoRv/FY4tSeQvQYqYyPygSIW3QJVgig6/MnOhjL3NEoQkuj4f5Nr1gD7cFGIsU xVvOtcL7qscWr99k01OMsj6OFw39mOPBiAHJH6lhKw+mDUjO0NbdrA4muZcKI5F56uL7 AUgQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g35-v6si19319560pgm.514.2018.10.09.08.45.50; Tue, 09 Oct 2018 08:46:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726788AbeJIXCK (ORCPT + 99 others); Tue, 9 Oct 2018 19:02:10 -0400 Received: from mail115-100.sinamail.sina.com.cn ([218.30.115.100]:55122 "HELO mail115-100.sinamail.sina.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726468AbeJIXCJ (ORCPT ); Tue, 9 Oct 2018 19:02:09 -0400 Received: from unknown (HELO localhost.localdomain.localdomain)([171.223.32.216]) by sina.com with ESMTP id 5BBCCCAA00000BD5; Tue, 9 Oct 2018 23:43:56 +0800 (CST) X-Sender: penghao122@sina.com.cn X-Auth-ID: penghao122@sina.com.cn X-SMAIL-MID: 269695132116 From: Peng Hao To: fweisbec@gmail.com, tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, peng.hao2@zte.com.cn Subject: [PATCH] tick/sched : remove redundancy cpu_online check Date: Tue, 9 Oct 2018 11:43:35 -0400 Message-Id: <1539099815-2943-1-git-send-email-penghao122@sina.com.cn> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Hao in can_stop_idle_tick cpu_online() was called earlier and if cpu offline it will return. so it don't need to call cpu_online() again. Signed-off-by: Peng Hao --- kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 5b33e2f..69e673b 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -885,7 +885,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) if (need_resched()) return false; - if (unlikely(local_softirq_pending() && cpu_online(cpu))) { + if (unlikely(local_softirq_pending())) { static int ratelimit; if (ratelimit < 10 && -- 1.8.3.1