From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757683AbcBSMn6 (ORCPT ); Fri, 19 Feb 2016 07:43:58 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:36430 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757578AbcBSMnz (ORCPT ); Fri, 19 Feb 2016 07:43:55 -0500 Date: Fri, 19 Feb 2016 13:43:45 +0100 From: luca abeni To: Juri Lelli , linux-kernel@vger.kernel.org Cc: Peter Zijlstra Subject: Question about prio_changed_dl() Message-ID: <20160219134345.70ff4aa0@utopia> Organization: university of trento X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, when playing with the __dl_{add,sub}_ac() stuff recently posted by Juri, I found something that looks strange in prio_changed_dl(): static void prio_changed_dl(struct rq *rq, struct task_struct *p, int oldprio) { if (task_on_rq_queued(p) || rq->curr == p) { [...] } else switched_to_dl(rq, p); } but switched_to_dl() does: static void switched_to_dl(struct rq *rq, struct task_struct *p) { if (task_on_rq_queued(p) && rq->curr != p) { [...] } } so, prio_changed_dl() invokes switched_to_dl() if task_on_rq_queued() is false, but in this case switched_to_dl() does nothing... Am I missing something, or the } else switched_to_dl(rq, p); is useless? (BTW, it seems to me that switched_to_dl() is never invoked, for some reason...) Thanks, Luca If you wonder how this is related to __dl_{add,sub}_ac(), I am going to write an email about it in a short time :)