Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3630091ybi; Mon, 29 Jul 2019 09:47:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxD0IG1nE29+MlW5YLYoFV2YAr3HRBD8clEc1wr0GsB3388fZJTex+M7qCH3xibE0nFv3kW X-Received: by 2002:a62:e901:: with SMTP id j1mr38299663pfh.189.1564418828570; Mon, 29 Jul 2019 09:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564418828; cv=none; d=google.com; s=arc-20160816; b=nYUplSm1lFFlTVTH+qh9/VTcVJgfrw/OHazv1Gvr0yhlGa6X5fm5+ambUFZBUZ2P+r EPv+cbAOSqpp+7GJV2vQyl7tqVEcKT9ydoKZ5l9EQ4xdBppltfetf0j+99z9tRYHUnus E4DiyLT4y1IBmqzwQc5wlDpGFToiWLiq7ZtgY9wpKGGoFEST5lwEG+GTE8luHieMEiiI PqgDsJG70f+oPip5keGQ2SlgS6Zx/g7MiiHpCrm1qwQDM+o5KXf6r85zOeA114AeY04Q p/U5CG+btbJ5gHMwUfkiXLHEREgJSOdBo5obweaO7ChtaO1M7eK9Z4anuifzQSwUuUu5 OgHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UR1nwN2DobERwDBbUiUS2eO5vjDIciCJ3KKzmZdKH0Q=; b=zvoEkIebgROBz0bCpqZ6DBkAXN4psJciJ9pgdDvFzrzB3G6APAb4LrcM14SVtUHDg6 +16GGWY+UF7ymXGCemLi4T8t1HAOETWABXbRTHeYtQAa4MONIf5xiq/9X0T4j+mR0YI7 JfqKEvaaX29eFkqqaab7uADOuPeyn1pIibePfXMjrWt3IlUtdAzKsFdqWQlVEPU3LcEr pHAlPHX3y62xRFOlv+/JAEI311t4UbyN0L0i/ZcqLCNSEZKQ6ikvaCPOC8G24seRjtCy AU0wltG7Gt6ja3L3tf4bXr3xiAVHHhweyM56Y1XlEAZzKwnemoFYIDG6wkj2FWdX9dKV 78Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=0Bdz75ko; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si27792416plb.38.2019.07.29.09.46.53; Mon, 29 Jul 2019 09:47:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=0Bdz75ko; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728714AbfG2Q07 (ORCPT + 99 others); Mon, 29 Jul 2019 12:26:59 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48306 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727823AbfG2Q07 (ORCPT ); Mon, 29 Jul 2019 12:26:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UR1nwN2DobERwDBbUiUS2eO5vjDIciCJ3KKzmZdKH0Q=; b=0Bdz75ko9JlIuIV7NBooLQGYXZ xKeLkiHp/upUnBeY/3RRAQ0w80wxz5hCRhdmbkGPTGDXX9l34bW83spOgXr7BkgDvyJTpD+nzx5Hk f7FHE5z3duaS40ug1H6vAfes/hnn2Ko81P07zJpuFTAL9ysk0mR3cEIhP4kdMn+6LN68BxDqEqg3v vkbk9UEmf86iZJLfE3J2DUX4/gv/0Oc6UlSCCyR2JKl/sG/g/FaCWfhkauzVmzAft4OuEWMV9uzqL q/iTWXu+CcGDHtSRVDr/0z1kzIMyyfsTEHTStTW5ZEfMyH43HSdf7OqvfzZOKEvTHMaAeCC7x0xSI V21kBB3A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hs8UA-00041z-Ot; Mon, 29 Jul 2019 16:26:55 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 75A7C20AFFE9F; Mon, 29 Jul 2019 18:26:53 +0200 (CEST) Date: Mon, 29 Jul 2019 18:26:53 +0200 From: Peter Zijlstra To: Rik van Riel Cc: Waiman Long , Ingo Molnar , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Phil Auld , Andy Lutomirski Subject: Re: [PATCH v2] sched/core: Don't use dying mm as active_mm of kthreads Message-ID: <20190729162653.GE31381@hirez.programming.kicks-ass.net> References: <20190727171047.31610-1-longman@redhat.com> <20190729085235.GT31381@hirez.programming.kicks-ass.net> <4cd17c3a-428c-37a0-b3a2-04e6195a61d5@redhat.com> <20190729150338.GF31398@hirez.programming.kicks-ass.net> <25cd74fcee33dfd0b9604a8d1612187734037394.camel@surriel.com> <20190729154419.GJ31398@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 29, 2019 at 12:10:12PM -0400, Rik van Riel wrote: > On Mon, 2019-07-29 at 17:44 +0200, Peter Zijlstra wrote: > > On Mon, Jul 29, 2019 at 11:28:04AM -0400, Rik van Riel wrote: > > > On Mon, 2019-07-29 at 17:03 +0200, Peter Zijlstra wrote: > > >=20 > > > > The 'sad' part is that x86 already switches to init_mm on idle > > > > and we > > > > only keep the active_mm around for 'stupid'. > > >=20 > > > Wait, where do we do that? > >=20 > > drivers/idle/intel_idle.c: leave_mm(cpu); > > drivers/acpi/processor_idle.c: acpi_unlazy_tlb(smp_processor_id()); >=20 > This is only done for deeper c-states, isn't it? Not C1 but I forever forget where it starts doing that. IIRC it isn't too hard to hit it often, and I'm fairly sure we always do it when we hit NOHZ. > > > > Rik and Andy were working on getting that 'fixed' a while ago, > > > > not > > > > sure > > > > where that went. > > >=20 > > > My lazy TLB stuff got merged last year.=20 > >=20 > > Yes, but we never got around to getting rid of active_mm for x86, > > right? >=20 > True, we still use active_mm. Getting rid of the > active_mm refcounting alltogether did not look > entirely worthwhile the hassle. OK, clearly I forgot some of the details ;-)