Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp177326pxu; Thu, 3 Dec 2020 23:59:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0G5GGtpmJ1kOUymZMBRBNGUhZMZv0oB/yq18+KGMJGjyxVawUu0O/v2xc9ByVw53uk7Gn X-Received: by 2002:aa7:cd9a:: with SMTP id x26mr6242321edv.226.1607068750435; Thu, 03 Dec 2020 23:59:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607068750; cv=none; d=google.com; s=arc-20160816; b=F0raGk4AobcInnElFlFEf3yJrLRn82leV5h7N4C+dLg/B31YIpstp4v0gREJ0ESxPo zfYROys/oDQDGuyWVTzTqcMfsEtSJcVdheebEIQXJMNBud4sJxtSUooUZyHcmcq5QSiB EvqrxiKFxCAeDGp/loAAbtq8e7taANInyzSyudFuSmEaeuXp+SVYan/QNkx9b8LKAk4e Kdi6ACblxVdkOtpKpQnhypusVlPr3g1yNHoEG+DvA0DoDOmcR4fqyqh7QKyrBEXAaodd EEOkA5SrHPdmPlGfhl4yzusvN47NWonso3XqL+DrNs1AqYCnALmw/u96ZY6ZqUQ7DfON y97w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id :mime-version:in-reply-to:references:cc:to:subject:from:date :dkim-signature; bh=Zd7vmIfn6mzRaP11y/d7gH60I8gBLNa0mgMkL/toHvQ=; b=PAGCpnTFuADhI/pg7YXhlLvZxhWbEsERJrtKkU44QqdthtFvKgh4XruDHXp2Ki0oGe Re9eCONrSZCqLs+TciFRs4LwjUDkFu/UuNdyNtj73N3qUiXEkFPd/n6bYI5hz+mxJESb 9dFuqXw5j1tbnWaCkIj2sQBZB4vfGJxEY+nitRheT8Lj2JsUPavbYTNXEoASDY4rktFi NIBZIe2c3ktnFYLA+7y8Xt2QYdWx+QWSPMKjUMAJVwxVFGeisoi3ky1JmFg0K2KNaE1f qx6KGa27RYrzlCLOJmwkgGConbYktBQ9BZLk5YqiL4ol0ru/9jTwaP8aD1FXDd+Vbu11 jp1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D7BZBLvP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lh17si869707ejb.328.2020.12.03.23.58.47; Thu, 03 Dec 2020 23:59:10 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=D7BZBLvP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387515AbgLDHzp (ORCPT + 99 others); Fri, 4 Dec 2020 02:55:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387487AbgLDHzo (ORCPT ); Fri, 4 Dec 2020 02:55:44 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33DE7C061A51; Thu, 3 Dec 2020 23:54:48 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id p6so2662378plo.6; Thu, 03 Dec 2020 23:54:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=Zd7vmIfn6mzRaP11y/d7gH60I8gBLNa0mgMkL/toHvQ=; b=D7BZBLvP7Hf1hmbzDKHSvvrVMOcvwF3AuA29oTyK7LjSZGu/VvtRnPQYcM5WAhLexX 7bxa66KLQ1nPLAHY7ASZKpcwj5k4Gj/sH6hD+9zfRuCPL4Lu5Awdy7z/+hdMDs8coD6V l8QYpI7vYdOmv55h5fB66u95Ohlgdwe0LaK+5MOxosaBfJT8hPUQpfvR3VXriGDatcPY gC/wXJZUtokL+ZYqMSshMZD74n/sJqggisoqq4cqL2SS5depbndddaDAtLka4PdXM3mG ge7JlJgFKZL1EYg7DD8hAPDTSPAXEGItK4mF9rjhF/tHePvbjm4v2usCJOMPjNtlHjbc kstQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=Zd7vmIfn6mzRaP11y/d7gH60I8gBLNa0mgMkL/toHvQ=; b=uaf+Nhw1g5nyUwWq0gP5aMyfBQ+FLtmS36wrdhz6AXYZP8F97OBgQnLF0QZa7HGxdV 39Vnvz4i4WEbLcD9oprv9rNY/W5HbwoFu2aX7JvSKwAETH2KEI53orVugDZXuJI8JATj arIpVEYPED8ORxZ2H/fibP55740z8X4uW6wWT2hkJaoNuU0zigneHdUAIwQ7h4Iz7AoN g8jOYJwQ9MGdhfsAHttnwN3PKFO92C5kBStm/CK+xfzexf6Rhtvob3MmdR+nD3nNzyGW Q5als/pJ4C7JdAIVg2PWHoAXweNSalsHzMCuOOfvY8zETkRY+RgpInPqbH6NRJecV7Vi zeAg== X-Gm-Message-State: AOAM532OAayMlixlhAxZpLh1gPEDjNb+b6yIHC8CF3Y+mjHawdhx6pDx Yulxxu1ym6DZtSXGXKWjzz0= X-Received: by 2002:a17:902:a388:b029:da:bad:ed3 with SMTP id x8-20020a170902a388b02900da0bad0ed3mr2711686pla.76.1607068487823; Thu, 03 Dec 2020 23:54:47 -0800 (PST) Received: from localhost ([1.129.136.201]) by smtp.gmail.com with ESMTPSA id f15sm1346786pju.49.2020.12.03.23.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 23:54:47 -0800 (PST) Date: Fri, 04 Dec 2020 17:54:40 +1000 From: Nicholas Piggin Subject: Re: [RFC v2 2/2] [MOCKUP] sched/mm: Lightweight lazy mm refcounting To: Andy Lutomirski Cc: Anton Blanchard , Arnd Bergmann , Catalin Marinas , Dave Hansen , Jann Horn , linux-arch , LKML , Linux-MM , linuxppc-dev , Mathieu Desnoyers , Nadav Amit , Rik van Riel , Will Deacon , X86 ML References: In-Reply-To: MIME-Version: 1.0 Message-Id: <1607065599.ecww2w3xq3.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Andy Lutomirski's message of December 4, 2020 3:26 pm: > This is a mockup. It's designed to illustrate the algorithm and how the > code might be structured. There are several things blatantly wrong with > it: >=20 > The coding stype is not up to kernel standards. I have prototypes in the > wrong places and other hacks. >=20 > There's a problem with mm_cpumask() not being reliable. Interesting, this might be a way to reduce those IPIs with fairly=20 minimal fast path cost. Would be interesting to see how much performance=20 advantage it has over my dumb simple shoot-lazies. For powerpc I don't think we'd be inclined to go that way, so don't feel=20 the need to add this complexity for us alone -- we'd be more inclined to=20 move the exit lazy to the final TLB shootdown path, which we're slowly=20 getting more infrastructure in place to do. (The powerpc hash MMU code which we're slowly moving away from might=20 never get that capability because it's complex there and hard to do with that virtualisation model so current big systems (and radix MMU until we finish the TLB flushing stuff) want something here, but for those the shoot-lazies could quite likely be sufficient) But if core code was moved over to something like this for the benefit of others archs we'd probably just as happily do that. There's a few nits but I don't think I can see a fundamental problem=20 yet. Thanks, Nick