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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 69E19C64E7C for ; Wed, 2 Dec 2020 14:38:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B4D3B2054F for ; Wed, 2 Dec 2020 14:38:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4D3B2054F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amacapital.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CA0666B005C; Wed, 2 Dec 2020 09:38:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C51848D0002; Wed, 2 Dec 2020 09:38:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B409A8D0001; Wed, 2 Dec 2020 09:38:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0114.hostedemail.com [216.40.44.114]) by kanga.kvack.org (Postfix) with ESMTP id 9E0196B005C for ; Wed, 2 Dec 2020 09:38:15 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 673BA824999B for ; Wed, 2 Dec 2020 14:38:15 +0000 (UTC) X-FDA: 77548597350.03.earth68_2105f9a273b3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 468DD28A4E8 for ; Wed, 2 Dec 2020 14:38:15 +0000 (UTC) X-HE-Tag: earth68_2105f9a273b3 X-Filterd-Recvd-Size: 4340 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Dec 2020 14:38:14 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id o5so1177650pgm.10 for ; Wed, 02 Dec 2020 06:38:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=2Fs7ai24DqkxtxArlzcoZyYT9VSvAAqY62xWW9SRJew=; b=Aqhw72HvwohUbOEi6rnKx9BddRB1CRUmPb2IMo1f4RmfGdCYe9u3D9NZMkRb5cU1z9 LISZNoxZulsQN7YNMxLulCsAlKJOEQMKvvLepnYWweR/W8SfB45Oo+TxQCszPAHqrh5i CZVyU1HG1zQ7hcGKGrg29b/R262ttz0hQUkFOMg1ueTdqNO+383GrXT+zmcLFDoGR62C 0WZlSNYpAfDgthqkbWr8bv7YVQBwj69qk36lnk770I4oA/ch2+oTwFY3Puqa/hkPiIcx AeUdypd4eqCRKXmdISsemrQKK2dBXuA4WNpYgABbMDy6tsRZjyQptpkHLMmFEMqy8I9M utMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=2Fs7ai24DqkxtxArlzcoZyYT9VSvAAqY62xWW9SRJew=; b=g671kBNPJJlBo1NrkgFQvqACEDJJ74d7UNItUFbcADyo3vWMOhiWah2HuiPWPlUSl7 LGKXry78wUD64RlKTnJFEIbylKERp6jixUL06lsWbq3QZoebGtq+tOXPbnfa8u0tbGoq AU945RkVXMFi/unvEu9xlDOBq/TTpC5gp8R4tNMEfsMG0ttOgY5V6qSBKMUg/26nFRgP k1cq0gXKOyR0sEvrW+RQXwe1Az8T8iY7l5kYoq0/LE1uNz25t1xAczA6A2WAd1kSLSnt LVolGhrhc+06giiyHWqBGMMtBylbfnVn1SCiwv7B0S/PFW42DNg+wntfEes6RTE4anSy QYYw== X-Gm-Message-State: AOAM530h6PbQuc7irzHutIlz4d3H7QvengvV11L3RAvsNaz5q0PtwWmR nvhaBheBvqIi2o/83TqkoR5+KA== X-Google-Smtp-Source: ABdhPJwaO8pUqbasz2rROJKI5S5GnLlk3tolWP+I1H3Ly/oqX6s2LQgHUDIB7w1VUr6E/FfWpXKIQQ== X-Received: by 2002:a62:2ec3:0:b029:197:6ca1:2498 with SMTP id u186-20020a622ec30000b02901976ca12498mr2880584pfu.32.1606919893717; Wed, 02 Dec 2020 06:38:13 -0800 (PST) Received: from [192.168.0.122] (c-67-180-165-146.hsd1.ca.comcast.net. [67.180.165.146]) by smtp.gmail.com with ESMTPSA id x5sm20050pjr.38.2020.12.02.06.38.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Dec 2020 06:38:12 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 6/8] lazy tlb: shoot lazies, a non-refcounting lazy tlb option Date: Wed, 2 Dec 2020 06:38:12 -0800 Message-Id: References: <20201202141957.GJ3021@hirez.programming.kicks-ass.net> Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, x86@kernel.org, Mathieu Desnoyers , Arnd Bergmann , linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, Anton Blanchard In-Reply-To: <20201202141957.GJ3021@hirez.programming.kicks-ass.net> To: Peter Zijlstra X-Mailer: iPhone Mail (18B121) 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 Dec 2, 2020, at 6:20 AM, Peter Zijlstra wrote: >=20 > =EF=BB=BFOn Sun, Nov 29, 2020 at 02:01:39AM +1000, Nicholas Piggin wrote: >> + * - A delayed freeing and RCU-like quiescing sequence based on >> + * mm switching to avoid IPIs completely. >=20 > That one's interesting too. so basically you want to count switch_mm() > invocations on each CPU. Then, periodically snapshot the counter on each > CPU, and when they've all changed, increment a global counter. >=20 > Then, you snapshot the global counter and wait for it to increment > (twice I think, the first increment might already be in progress). >=20 > The only question here is what should drive this machinery.. the tick > probably. >=20 > This shouldn't be too hard to do I think. >=20 > Something a little like so perhaps? I don=E2=80=99t think this will work. A CPU can go idle with lazy mm and no= hz forever. This could lead to unbounded memory use on a lightly loaded sys= tem.