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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 69F55C4361A for ; Fri, 4 Dec 2020 07:54:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C3BF922571 for ; Fri, 4 Dec 2020 07:54:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3BF922571 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C2A946B0068; Fri, 4 Dec 2020 02:54:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BB3A86B006C; Fri, 4 Dec 2020 02:54:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A7D3E6B006E; Fri, 4 Dec 2020 02:54:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id 8777A6B0068 for ; Fri, 4 Dec 2020 02:54:49 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 544DA8249980 for ; Fri, 4 Dec 2020 07:54:49 +0000 (UTC) X-FDA: 77554838298.11.horse83_5509eae273c2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 364A3180F8B82 for ; Fri, 4 Dec 2020 07:54:49 +0000 (UTC) X-HE-Tag: horse83_5509eae273c2 X-Filterd-Recvd-Size: 4951 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Dec 2020 07:54:48 +0000 (UTC) Received: by mail-pl1-f169.google.com with SMTP id b23so2654165pls.11 for ; 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=nOdpVHdCraYcJGQYWN8+0Lu70AGnu97rPlwtCGX9Vzk1S5drpDfcZqPZr0Pr+Jtcx0 9kh02k0Ln/LCAbujwaDQsaZH73e1Jt21IDyn4RLdAPgcCxVxjRL1aSimMvu9ca8Mgu4f mWiS3oefOP+ChABzRJQkM5s9zhGRCmvQuimFPvuRjC0INISSpD8jv/HekOmwVCoaO+So +tB7LhBLnOUL9mM2KAO1LIv0YA58bTA8ZXMH7UN+4zrAIgMWaJ4dL/iE1tkauwgnyrBT xJ/D1hbqCDaJoZxAmMFJsrzWLNmueXmt8XgbPQNp5qURB/F6rqNyrdso/CUkiL8quig3 ptuA== X-Gm-Message-State: AOAM531tOhtddIshTboqmU0hLjivOpbOdfjWs1pydptI7b7Ov9egyoRK nWaonNenI5y5LdSiw9mAWLw= X-Google-Smtp-Source: ABdhPJxeaLakUaj4UZ6Mhmu/RUCo9vMWAs3X7UoKC0s3gdL5d5oy/Bq+kELLNyqZeAnUbZAiHbipyw== 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 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: 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