Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933540AbaJaPhd (ORCPT ); Fri, 31 Oct 2014 11:37:33 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:45645 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932734AbaJaPhc (ORCPT ); Fri, 31 Oct 2014 11:37:32 -0400 Date: Fri, 31 Oct 2014 16:37:27 +0100 From: Peter Zijlstra To: Juri Lelli Cc: Wanpeng Li , Ingo Molnar , "linux-kernel@vger.kernel.org" , "juri.lelli@gmail.com" Subject: Re: [PATCH 5/6] sched/dl: reschedule if successfully pull earlier deadline task Message-ID: <20141031153727.GT23531@worktop.programming.kicks-ass.net> References: <1414374067-7209-1-git-send-email-wanpeng.li@linux.intel.com> <1414374067-7209-5-git-send-email-wanpeng.li@linux.intel.com> <5452110C.40108@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5452110C.40108@arm.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 30, 2014 at 10:21:00AM +0000, Juri Lelli wrote: > Peter, is the task_on_rq_queued() check for cases in which p is not > enqueued but its class changes after a setscheduler/rt_mutex_setprio? Yes, in particular if the task wasn't on the rq we won't change the rq by changing the class and therefore we don't need to attempt to pull. --- commit da7a735e51f9622eb3e1672594d4a41da01d7e4f Author: Peter Zijlstra Date: Mon Jan 17 17:03:27 2011 +0100 sched: Fix switch_from_fair() When a task is taken out of the fair class we must ensure the vruntime is properly normalized because when we put it back in it will assume to be normalized. The case that goes wrong is when changing away from the fair class while sleeping. Sleeping tasks have non-normalized vruntime in order to make sleeper-fairness work. So treat the switch away from fair as a wakeup and preserve the relative vruntime. Also update sysrq-n to call the ->switch_{to,from} methods. Reported-by: Onkalo Samu Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar -- 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/