Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752720AbbHCOA7 (ORCPT ); Mon, 3 Aug 2015 10:00:59 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39186 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751971AbbHCOA6 (ORCPT ); Mon, 3 Aug 2015 10:00:58 -0400 Date: Mon, 3 Aug 2015 16:00:46 +0200 From: Peter Zijlstra To: Frederic Weisbecker Cc: LKML , Thomas Gleixner , Preeti U Murthy , Christoph Lameter , Ingo Molnar , Viresh Kumar , Rik van Riel Subject: Re: [PATCH 07/10] sched: Migrate sched to use new tick dependency mask model Message-ID: <20150803140046.GK19282@twins.programming.kicks-ass.net> References: <1437669735-8786-1-git-send-email-fweisbec@gmail.com> <1437669735-8786-8-git-send-email-fweisbec@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437669735-8786-8-git-send-email-fweisbec@gmail.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1431 Lines: 34 On Thu, Jul 23, 2015 at 06:42:12PM +0200, Frederic Weisbecker wrote: > Instead of providing asynchronous checks for the nohz subsystem to verify > sched tick dependency, migrate sched to the new mask. > > The easiest is to recycle the current asynchronous tick dependency check > which verifies the class of the current task and its requirements for > periodic preemption checks. > > We need to evaluate this tick dependency on three places: > > 1) Task enqueue: One or more tasks have been enqueued, we must check > if those are competing with the current task. > > 2) Task dequeue: A possibly competing task has been dequeued, clear the > tick dependency if needed. > > 3) schedule(): we might be switching to a task of another scheduler > class. Each class has its preemption rules, we must re-evaluate it. This is insane.. You add a whole bunch of work per wakeup/sleep/context switch to avoid some work at tick time. That's a broken trade-off. We can context switch _waaaay_ more than we have ticks. Furthermore, you do tons of pointless work, we call add_nr_running() from the individual classes, and then your routine goes and checks what class we're in etc.. -- 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/