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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C48DC433F5 for ; Mon, 10 Jan 2022 17:20:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 22C8F6B0071; Mon, 10 Jan 2022 12:20:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1DC066B0072; Mon, 10 Jan 2022 12:20:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 07D5A6B0074; Mon, 10 Jan 2022 12:20:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0035.hostedemail.com [216.40.44.35]) by kanga.kvack.org (Postfix) with ESMTP id EEB5A6B0071 for ; Mon, 10 Jan 2022 12:20:18 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B2C69181ECAD2 for ; Mon, 10 Jan 2022 17:20:18 +0000 (UTC) X-FDA: 79015040916.27.2B9F969 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by imf04.hostedemail.com (Postfix) with ESMTP id 11AAF4000D for ; Mon, 10 Jan 2022 17:20:17 +0000 (UTC) Received: by mail-ed1-f49.google.com with SMTP id b13so3050765edn.0 for ; Mon, 10 Jan 2022 09:20:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/2g4WzhUycW/Ns97U5fXJOBAR0Fut5CITQBsuRcSJ3Q=; b=AiJmLJpdMyI2TF4+zo61R9W1PwwTq5FFExDcBX4ZFTOtBV6VzDymirf3f59Sbfdj0q Ryv0jG1DUNYlfnQ0Fkmm+uUs9fUsmOeOXPVg0H72WDCaNfgAgKxH8kZUrwQExTx2euCE 3/eL28GDF9eWagtoCQY365cz5vbtP8iiLfH2k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/2g4WzhUycW/Ns97U5fXJOBAR0Fut5CITQBsuRcSJ3Q=; b=g0h4W1HezHNnNdWAv6PaCGinH7bSN44hy99HrfoTDoAsQxQtlMdDdQQ0UvB6HxvjzE D3toxgaJVlXPa5ccXZQrc6z96pTrTSXc0hlnE036gQx0r9FA6Rx0TqvX/2xdzV2ABfIn ivvD4zJuUamyz0EI0S9SLUDR4calh1cIKk1zh/J+zdg/VpHYTzjFBZspiWNJuajqaGGK zJ5RLXptjlaoh4dg+5rwySmuR4nnJT18bnP4sP8hXhQDm5Q6TyrDVL19Z9FVFfsMWmH/ ip/E+EJ0uaTkEFUS3hR59C4pdSU4M/ugQeFWnfDseOlNyGlf83xVLZHbFS37ChQFxTNM IzpA== X-Gm-Message-State: AOAM531soljuwBpV9zEOBQT2mKV0RXOdr5woC6QzcTDQ/s8LEzVoeuv1 DzGFCfthPJ1wCrUWuSOtwriH3zGmhJs1EwM5RBE= X-Google-Smtp-Source: ABdhPJz+z5HWp13MuDLfpd2AwVzNTc+7YvMNMx3x2uQlpfYsfezc64xi9X5Ok6bkiriIFk5IIkGvZw== X-Received: by 2002:a05:6402:b61:: with SMTP id cb1mr678767edb.82.1641835216775; Mon, 10 Jan 2022 09:20:16 -0800 (PST) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com. [209.85.221.52]) by smtp.gmail.com with ESMTPSA id qw28sm1084687ejc.154.2022.01.10.09.20.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Jan 2022 09:20:16 -0800 (PST) Received: by mail-wr1-f52.google.com with SMTP id s1so28137575wra.6 for ; Mon, 10 Jan 2022 09:20:15 -0800 (PST) X-Received: by 2002:a5d:6951:: with SMTP id r17mr507730wrw.274.1641835215696; Mon, 10 Jan 2022 09:20:15 -0800 (PST) MIME-Version: 1.0 References: <7c9c388c388df8e88bb5d14828053ac0cb11cf69.1641659630.git.luto@kernel.org> <3586aa63-2dd2-4569-b9b9-f51080962ff2@www.fastmail.com> <430e3db1-693f-4d46-bebf-0a953fe6c2fc@www.fastmail.com> <484a7f37-ceed-44f6-8629-0e67a0860dc8@www.fastmail.com> <1641790309.2vqc26hwm3.astroid@bobo.none> <1641791321.kvkq0n8kbq.astroid@bobo.none> In-Reply-To: <1641791321.kvkq0n8kbq.astroid@bobo.none> From: Linus Torvalds Date: Mon, 10 Jan 2022 09:19:59 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 16/23] sched: Use lightweight hazard pointers to grab lazy mms To: Nicholas Piggin Cc: Andy Lutomirski , Andrew Morton , Anton Blanchard , Benjamin Herrenschmidt , Catalin Marinas , Dave Hansen , linux-arch , Linux-MM , Mathieu Desnoyers , Nadav Amit , Paul Mackerras , "Peter Zijlstra (Intel)" , Randy Dunlap , Rik van Riel , Will Deacon , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: k5wq9s8m99k3akogeoutrjwwn81nqiqp X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 11AAF4000D Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=AiJmLJpd; spf=pass (imf04.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.208.49 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-HE-Tag: 1641835217-186974 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 Sun, Jan 9, 2022 at 9:18 PM Nicholas Piggin wrote: > > This is the patch that goes on top of the series I posted. It's not > very clean at the moment it was just a proof of concept. Yeah, this looks like what x86 basically already effectively does. x86 obviously doesn't have that TLBIE option, and already has that "exit lazy mode" logic (although it does so differently, using switch_mm_irqs_off(), and guards it with the 'info->freed_tables' check). But there are so many different possible ways to flush TLB's (the whole "paravirt vs native") that it would still require some double-checking that there isn't some case that does it differently.. Linus