Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1352854pxk; Fri, 2 Oct 2020 07:34:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ/gAq80Z2LjZx/+irDM4G4iD9SBzdNJyXV0MsyoFL13ywE9lVxJ/M4YVLCzeUyCygKRBT X-Received: by 2002:aa7:c7d9:: with SMTP id o25mr2746907eds.318.1601649241136; Fri, 02 Oct 2020 07:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601649241; cv=none; d=google.com; s=arc-20160816; b=UMx8/FeTcaOh8WTdzErtCnlHtGkgyUJY2DAHlvWL9bqwXZI8jRo8p+tcK1vmdIYSZw m1RSrZDRsodaAnn7SpBrXt1qsQ4l9cYOFR5MeGZMapA6s8vC0RpTiyzCbc/660J5Fgwp 2Sa1D7QZRwrpt3XGrIxL+eDm5OYoAhgKr0Xl37o+QeaKZxufFiAiw7ljU3Cetm+PhLNE 3GAFc74Z0E+VO67D5m6J4cMqR7CCY49lYIhqo3OIaat0uaitbSiFAY6ZLpdRHGB6Ko4r fG67Ff8UMB0yLYAPg05ePwTT983wWPwtQSnPTm+Jk443A2lg0JpMUScrybJg4sFKYtPp M+ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PjNw33aLdANmms3dj8/kpRTu9mB/VfG1NrhurP/wbG0=; b=gLbxulspDbabuW6dxtv6ug6GMDyPrU2P0zpjDFTcjXqeKQJyxSkeXHPdGlmqh0NVn0 a2Aqm/Q9WYxLhIPNtoR5v20vO9BR8H53i5Kow5IZTLvdjGYfdOSACxB1JF78xyqqi5g2 sEh/W0l6646WsjAaPvu4HUyi5jUpZtGUKOxwK7VOLiPvsWBMIQO+tO4tjzSU3Or+0hq4 Seya4zR/D1HH+/6qa7YogftgsGTXB32qH0fi4D/xsQtz1Xf3dC6DUzFFipIooloClSAc DaclwlGofMMjp7WVVCSvru3Cp19uGNqNZucwF4TGYAd0GEcZks7R5LOs/PsB0EU2MpBu xmsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=aLjuB+7U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n24si1137918ejs.611.2020.10.02.07.33.38; Fri, 02 Oct 2020 07:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=aLjuB+7U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388037AbgJBOaf (ORCPT + 99 others); Fri, 2 Oct 2020 10:30:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbgJBOaf (ORCPT ); Fri, 2 Oct 2020 10:30:35 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50A7FC0613D0 for ; Fri, 2 Oct 2020 07:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=PjNw33aLdANmms3dj8/kpRTu9mB/VfG1NrhurP/wbG0=; b=aLjuB+7UL07DQFGyR6tABTlKR9 gkG1mHS525OLM8HdEGnk+h1sncSLVo8qTYtyqathRB191a8IRaf0GQTJf0c5hD7gFgfpFZf5ksRRQ dkfdY8xVagZybz9Zy506zd+Vx66Ah+oszXa5bA5Rtvh1nBkLIs33AKoSPiQM3MGJvyTuKvlVYxvtd OHYQgxU06OkWaMZ8KFDGABb6QDUrnFmef/a9sKe9k+USNsRJephcvzko5muY8xIBwXSAvHiO8TPe1 eo/mZAbWFRPt9ztCepfa4C8z3zu2CQVYzu7/YSJ5WQdn1e1xncRFBBo9xGzjsAkjWG64AMf56Bv1Z BVLek3SQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOM4k-0003H8-70; Fri, 02 Oct 2020 14:30:22 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0E19B3006D0; Fri, 2 Oct 2020 16:30:21 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E8302203A8F66; Fri, 2 Oct 2020 16:30:20 +0200 (CEST) Date: Fri, 2 Oct 2020 16:30:20 +0200 From: Peter Zijlstra To: Valentin Schneider Cc: Sebastian Andrzej Siewior , tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, qais.yousef@arm.com, swood@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vincent.donnefort@arm.com Subject: Re: [PATCH 0/9] sched: Migrate disable support Message-ID: <20201002143020.GA2628@hirez.programming.kicks-ass.net> References: <20200921163557.234036895@infradead.org> <20200925181727.ryuacrsipyaz65z7@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 25, 2020 at 08:32:24PM +0100, Valentin Schneider wrote: > The IRC handout so far is: I meant to go post a new version today; but of course cleanup took longer than expected. In any case, there's a slightly updated version here: git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/wip2 it has push/pull balancer changes that sorta work. There's still something funny with the NO_RT_PUSH_IPI case (and concequently also the deadline code, which is an exact mirror of that code). (it looks like it ends up migrating things in circles due to the for loop in pull_rt_task) > As for your splat, I think this is what I was worrying about wrt > suppressing callbacks in the switch but not preventing them from being > queued. Perhaps the below is "better" than what I previously sent. > > Technically should be doable with a cpu_active() check instead given this > all gets flipped in sched_cpu_deactivate(), but at least this makes it > obvious that PUSH suppresses any other callback. > > --- > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h > index 50aac5b6db26..40d78a20fbcb 100644 > --- a/kernel/sched/sched.h > +++ b/kernel/sched/sched.h > @@ -1403,7 +1403,7 @@ queue_balance_callback(struct rq *rq, > { > lockdep_assert_held(&rq->lock); > > - if (unlikely(head->next)) > + if (unlikely(head->next) || (rq->balance_flags & BALANCE_PUSH)) > return; Yeah, I like that. Let me go add it.