From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932895AbdBPRgA (ORCPT ); Thu, 16 Feb 2017 12:36:00 -0500 Received: from mail-qk0-f173.google.com ([209.85.220.173]:36753 "EHLO mail-qk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932465AbdBPRf7 (ORCPT ); Thu, 16 Feb 2017 12:35:59 -0500 Subject: Re: [PATCH v3 1/2] sched/deadline: Remove unnecessary condition in push_dl_task() To: Byungchul Park , peterz@infradead.org, mingo@kernel.org References: <1487212457-28839-1-git-send-email-byungchul.park@lge.com> Cc: linux-kernel@vger.kernel.org, juri.lelli@gmail.com, rostedt@goodmis.org, kernel-team@lge.com From: Daniel Bristot de Oliveira Message-ID: Date: Thu, 16 Feb 2017 18:35:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1487212457-28839-1-git-send-email-byungchul.park@lge.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/16/2017 03:34 AM, Byungchul Park wrote: > pick_next_pushable_dl_task(rq) has BUG_ON(rq->cpu != task_cpu(task)) > when it returns a task other than NULL, which means that task_cpu(task) > must be rq->cpu. So if task == next_task, then task_cpu(next_task) must > be rq->cpu as well. Remove the redundant condition and make code simpler. > > By this patch, unnecessary one branch and two LOAD operations in 'if' > statement can be avoided. > > Signed-off-by: Byungchul Park > Reviewed-by: Steven Rostedt (VMware) > Reviewed-by: Juri Lelli +1 Reviewed-by: Daniel Bristot de Oliveira -- Daniel