From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0C5DC388F9 for ; Thu, 19 Nov 2020 11:14:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 655C22083B for ; Thu, 19 Nov 2020 11:14:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="zpHguXsN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 655C22083B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BFA126B005D; Thu, 19 Nov 2020 06:14:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BA9A26B0068; Thu, 19 Nov 2020 06:14:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A99096B006C; Thu, 19 Nov 2020 06:14:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 7E7B36B005D for ; Thu, 19 Nov 2020 06:14:26 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2632B3647 for ; Thu, 19 Nov 2020 11:14:26 +0000 (UTC) X-FDA: 77500909332.19.brake47_140829e27342 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 056631AD1B1 for ; Thu, 19 Nov 2020 11:14:25 +0000 (UTC) X-HE-Tag: brake47_140829e27342 X-Filterd-Recvd-Size: 4652 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Thu, 19 Nov 2020 11:14:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=cCH4QrDRb87dwiJfE1X+FleodlPrwqMdYQt5/vtzv2I=; b=zpHguXsNy8N3aF6ECzmq4pB6IV eoA3aOyEaivB67/n0lW35/CZmYNEXuKPmcajBDpkTSndWW2dZnoeIN6iDooFrtecNUXrIS41GS+lo k0Cglho2Qg2Su4TAnwf21BbrnI820lKCmL0pLAp3e+Qku3ZB2/ckm74gSKa+t94bveacp+5i7mlY8 e2d3UcECue8gf6Ll9be0MKcA+Ga/JmMD/nGng+ejuVTJeVBhyz4vPkIiX2AWXf97R+wFYLKDM5Nvh Y7rpFQvRlSaDEsSHLbz2L898j36ef1VARn3DSIL0JGhLzbfeLkeNL2xMtbaAwNuUxv/GH2CfSCwdg eHI/XzKw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfhtG-0004wR-5M; Thu, 19 Nov 2020 11:14:14 +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 76BFD301E02; Thu, 19 Nov 2020 12:14:11 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 622A1200DA727; Thu, 19 Nov 2020 12:14:11 +0100 (CET) Date: Thu, 19 Nov 2020 12:14:11 +0100 From: Peter Zijlstra To: Mel Gorman Cc: Thomas Gleixner , LKML , x86@kernel.org, Linus Torvalds , Christoph Hellwig , Matthew Wilcox , Daniel Vetter , Andrew Morton , linux-mm@kvack.org, Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , Linus Torvalds Subject: Re: [patch V4 4/8] sched: Make migrate_disable/enable() independent of RT Message-ID: <20201119111411.GL3121378@hirez.programming.kicks-ass.net> References: <20201118194838.753436396@linutronix.de> <20201118204007.269943012@linutronix.de> <20201119093834.GH3306@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201119093834.GH3306@suse.de> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Nov 19, 2020 at 09:38:34AM +0000, Mel Gorman wrote: > On Wed, Nov 18, 2020 at 08:48:42PM +0100, Thomas Gleixner wrote: > > From: Thomas Gleixner > > > > Now that the scheduler can deal with migrate disable properly, there is no > > real compelling reason to make it only available for RT. > > > > There are quite some code pathes which needlessly disable preemption in > > order to prevent migration and some constructs like kmap_atomic() enforce > > it implicitly. > > > > Making it available independent of RT allows to provide a preemptible > > variant of kmap_atomic() and makes the code more consistent in general. > > > > FIXME: Rework the comment in preempt.h - Peter? > > > > I didn't keep up to date and there is clearly a dependency on patches in > tip for migrate_enable/migrate_disable . It's not 100% clear to me what > reworking you're asking for but then again, I'm not Peter! He's talking about the big one: "Migrate-Disable and why it is undesired.". I still hate all of this, and I really fear that with migrate_disable() available, people will be lazy and usage will increase :/ Case at hand is this series, the only reason we need it here is because per-cpu page-tables are expensive... I really do think we want to limit the usage and get rid of the implicit migrate_disable() in spinlock_t/rwlock_t for example. AFAICT the scenario described there is entirely possible; and it has to show up for workloads that rely on multi-cpu bandwidth for correctness. Switching from preempt_disable() to migrate_disable() hides the immediate / easily visible high priority latency, but you move the interference term into a place where it is much harder to detect, you don't lose the term, it stays in the system. So no, I don't want to make the comment less scary. Usage is discouraged.