From patchwork Mon Dec 14 06:53:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11971439 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=-8.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham 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 0B277C4361B for ; Mon, 14 Dec 2020 06:53:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 67EBC22583 for ; Mon, 14 Dec 2020 06:53:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67EBC22583 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 B08836B0036; Mon, 14 Dec 2020 01:53:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AB9186B005C; Mon, 14 Dec 2020 01:53:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9CE866B005D; Mon, 14 Dec 2020 01:53:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id 84D156B0036 for ; Mon, 14 Dec 2020 01:53:23 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 341AA3647 for ; Mon, 14 Dec 2020 06:53:23 +0000 (UTC) X-FDA: 77590971486.09.cause07_101813127418 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 16EEC180AD804 for ; Mon, 14 Dec 2020 06:53:23 +0000 (UTC) X-HE-Tag: cause07_101813127418 X-Filterd-Recvd-Size: 4080 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Dec 2020 06:53:22 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id iq13so5731658pjb.3 for ; Sun, 13 Dec 2020 22:53:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=836ueWsqhXJFS2jsaV/+MeW0snlTaUrAFFynrxAzOKk=; b=q6GEshR5RFezy4+EprhXJG3fpkvIJHTaEh/EvfhfVA5FfUUDnQ3+4cDCpIRFRC/Mm2 ZbtvniEPDGviRpZFiQEw8za5h5Z+oWiIlhCu6JBrMnylhIiZhpvC1s1wknSQzDFn0sBw 8JBT7WhTHfWQfd/wi8sI02TaNRGE436yalS6VtVi39Gml2AGcKkbCiNmqS+4M4ZvGaeu xyWfWZoDpWHAvjMESrmKu4FJkOpTQ9ExYrWUgUdh4fCFUa3xeWlwuMz2sCEkKblW5gxy +XHxC0WI5idDR3jZr0BQTqsOClCl3URK8jdwMk8i0+K2wgfBGhE4DdSap9b1vIhgbLvC 7w7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=836ueWsqhXJFS2jsaV/+MeW0snlTaUrAFFynrxAzOKk=; b=OhEcYWgj+xRAr8ihbu3WHyixWAZP4GGMNouVIhGseYVWrP+vUx/BUNcX2/GfRVoLUW IuFmqmX+uv/KPkd9Wrt5zK4VUQrDKzThqCfQkXkmqHrvJLZCMspH9jDBZHMEja37hNQM mpQEd08BfdcMh/tMU+JoMrBNmD2jOmgH0XKw6ndRWwr2rN3SLDE4UGKiPcEghXPBF3bk copzJarmn9qoSJUMwhDsz5qeL0VsSxvUWHCcS6Znb+gimtUMXbaZC+dCE6gXdh20h46z eQ15o8NNbcJiduu7SJa9gLcM9jBwyVAN+jPiv1sdG3FfuC40vtLPWysAESq96eH7PLT8 FvDA== X-Gm-Message-State: AOAM530t/wWkGEb2sPHYg+nSot2WNiXqfAEuWj5Y7ervw1kvF7k0bWly 2Z/6+rnMhlzE9SknTRe1xNQ= X-Google-Smtp-Source: ABdhPJyoH0x/t5iFpjCJhCQTVS//5zozzcYJHAEPewzZkngQ9RzGM8cWtjfAj/AvxA1N7fuXpEPEMA== X-Received: by 2002:a17:90a:a45:: with SMTP id o63mr24426408pjo.146.1607928801482; Sun, 13 Dec 2020 22:53:21 -0800 (PST) Received: from bobo.ozlabs.ibm.com ([220.240.228.148]) by smtp.gmail.com with ESMTPSA id 84sm19570018pfy.9.2020.12.13.22.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Dec 2020 22:53:20 -0800 (PST) From: Nicholas Piggin To: linux-kernel@vger.kernel.org Cc: Nicholas Piggin , linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, Anton Blanchard , Andy Lutomirski Subject: [PATCH v2 0/5] shoot lazy tlbs Date: Mon, 14 Dec 2020 16:53:07 +1000 Message-Id: <20201214065312.270062-1-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 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: This is another rebase, on top of mainline now (don't need the asm-generic tree), and without any x86 or membarrier changes. This makes the series far smaller and more manageable and without the controversial bits. Thanks, Nick Nicholas Piggin (5): lazy tlb: introduce lazy mm refcount helper functions lazy tlb: allow lazy tlb mm switching to be configurable lazy tlb: shoot lazies, a non-refcounting lazy tlb option powerpc: use lazy mm refcount helper functions powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN arch/Kconfig | 30 ++++++++++ arch/arm/mach-rpc/ecard.c | 2 +- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/smp.c | 2 +- arch/powerpc/mm/book3s64/radix_tlb.c | 4 +- fs/exec.c | 4 +- include/linux/sched/mm.h | 20 +++++++ kernel/cpu.c | 2 +- kernel/exit.c | 2 +- kernel/fork.c | 52 ++++++++++++++++ kernel/kthread.c | 11 ++-- kernel/sched/core.c | 88 ++++++++++++++++++++-------- kernel/sched/sched.h | 4 +- 13 files changed, 184 insertions(+), 38 deletions(-)