From patchwork Wed Jul 25 15:52:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 10544239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 98C941822 for ; Wed, 25 Jul 2018 15:52:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89A4C2A5F0 for ; Wed, 25 Jul 2018 15:52:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8814C2A680; Wed, 25 Jul 2018 15:52:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 279342A5F0 for ; Wed, 25 Jul 2018 15:52:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 38EAA6B0276; Wed, 25 Jul 2018 11:52:57 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 33CD66B027C; Wed, 25 Jul 2018 11:52:57 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1DE6B6B0287; Wed, 25 Jul 2018 11:52:57 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by kanga.kvack.org (Postfix) with ESMTP id CD35B6B0276 for ; Wed, 25 Jul 2018 11:52:56 -0400 (EDT) Received: by mail-pg1-f199.google.com with SMTP id e19-v6so5014374pgv.11 for ; Wed, 25 Jul 2018 08:52:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id; bh=Sll2UMvuwhVkvvsOKC9mJFTiOP/KV0klMmqKpQKNl5A=; b=mLvVUmGTxQX/q5gtxmjG1vKVWFVtvctpxYn9WioH47H18yZpFaa0l+jIupaFpPcM4q 5xiiZuyRDCgtAO119M5D00cxLKPG16kKME1Svc+l6Cct5vP7WcuUs6rDpdlWn42IQmBA 7tow1EobIIb6yqE6Zmxrdxvn5V/KjXyav7WRChb1hT7cEUpEUUvLQrdcJ2exaAYazF1k 6i2syX5P1Tmsq6p3ka4Aa66OENXdTgW+c0J1Ny+djdhtTLGl5FqY8/Wey7nSMVtPfy2Z Md+XFolrk1EhZrv6TLSOjdr8E5QaiEjW1+MLp7SfPDAVqf3Me57T2oNGdjtAnN4oRw5e ULkQ== X-Gm-Message-State: AOUpUlFnUqzpGvRo8nceEw7m4rRvDquUPJ7yqUl8nKdKUqiKyMl2JWWl mD6pijpMcQzw1BKNdKIH4R8QXpXsTdIQNqK3JmQmmlBXrspk6GX0aPahMvgXki8NCYyrDpkAt2R N4qUCKjK3GjAkb2otyPy0sQUtV1PDs8n9+zKAHLrGvul1rLhypXx1Zph62op3c4YZ5ybUa/AJ8R bdMfx40VMY7wx0eMtYnlh4K9gOiq6ZaOGZjh+M5op9BZeP7TXKN/S9zqrw156dwyCIPY3ikTxe7 ctOOqMPZ8x1VicR/q4LtsbNhK5fCbUvDunDLPNs9pqiAPXAScRpjIgeK+GYagdF+7PgWkQ8/a4r JKfdRe+u2S1ZnaEMC42zgNrQXTtIpHtoClSXozniV2fiLFlJIXqT6uF7oro4AXyCUSPtbYCjtB/ e X-Received: by 2002:a65:4d05:: with SMTP id i5-v6mr20782588pgt.58.1532533976531; Wed, 25 Jul 2018 08:52:56 -0700 (PDT) X-Received: by 2002:a65:4d05:: with SMTP id i5-v6mr20782556pgt.58.1532533975935; Wed, 25 Jul 2018 08:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532533975; cv=none; d=google.com; s=arc-20160816; b=yzPvs2vC/89XZq5utrQIciYGCrQWyXlensIwTevpgrKoleESpz8IVwkmEkj79Ud16y WW3uSdZ49ASAgSnfJUI1FYZclA+sgCFPP84VOpldjAZmQPh1VRS9EViWRkUXMnGURPNR +A3AAcyBTe5yLXoB0tzwKyOpJ01z0R53UG6qgPlOZ1ORiBSrOMLpcEdH6/iL6wZLLAU2 E5WggrX0Od+ii9YIZfq9r114nMn1SmtLlJvzPtv7/3mVdhS+GCuCiDun0zinsXR/4n+5 P/WMqScECDeXudkFoMIffqq1dUgcrkiL2m+TBIfZ+JXoYPIfcrYtk9PAiM00W7cRHdxc XM0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Sll2UMvuwhVkvvsOKC9mJFTiOP/KV0klMmqKpQKNl5A=; b=aQaFHVHCDdm5ENPZRCd4NIlz9xC5P3KJW+zquPtk0L9pBvffyB7oNMkHMKQQEQmITm 0C6Y/xbSTiLEXhaPSorv2PYYfaXq79iWJlFvi6hrggkLQ93CbI+4kJxxXTocppQ9imPB 6I5YRAS6VdCDXcnfux/XxwCXi24Of7XkwsvakdrT3LvjynczN5EQmWItpUn+lIc+jwyC 48qU98gvFnJGAI+bOhQlRLtVllU2zpFwArevCw/7A8DifXaQVH88H0e0IuCt29hQGXjV Jb8xcKUzgWiK601WdHlSJp3bJlaaGwT+rnq0PirQvkWqQPY6Bo57vbLLjSytPcg+PUQB GWrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h8KIHQQY; spf=pass (google.com: domain of npiggin@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=npiggin@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id l22-v6sor3998003pgo.200.2018.07.25.08.52.55 for (Google Transport Security); Wed, 25 Jul 2018 08:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of npiggin@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h8KIHQQY; spf=pass (google.com: domain of npiggin@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=npiggin@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Sll2UMvuwhVkvvsOKC9mJFTiOP/KV0klMmqKpQKNl5A=; b=h8KIHQQY3N4x9LeZDncrhj9E4oxrZ7FqIev0dY7tvJsmr+Vjp9Evo8Ho9iFQR0niQm kpcQxh+f2Fz141EQwnKnpQXkC5D0khAbxjrxOAuBu6+3+AZnYZEXE1Jubflp516Osm0j reeEIN0bEoNME99mf4gWhMWZctHVAXCSx2TK3iNHvJvQ6ZSkJEcMLvRwkSi3e8JDNdyz 1XW9Laiu2YETKuXZkJXTmCblWSlREENEkcgERxmsrULWck/Y1ktg/fdqL+Z0Ni2dueoP N2gaHRx5VP+V0hoqogQtQsWgGOraNldfCXOBmgOga5oe+HmChF1Nny6n0RjEW33Rx4IY gRQg== X-Google-Smtp-Source: AAOMgpeHcVwAnu2+WRuP1MS4bilZCTxSEyeBP0uvaV6QN1VjCVBelf4hmb7wnmudy+QvvcglDUBygA== X-Received: by 2002:a63:9b19:: with SMTP id r25-v6mr21107128pgd.44.1532533975544; Wed, 25 Jul 2018 08:52:55 -0700 (PDT) Received: from roar.au.ibm.com ([61.69.188.107]) by smtp.gmail.com with ESMTPSA id j72-v6sm23438315pge.19.2018.07.25.08.52.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 08:52:55 -0700 (PDT) From: Nicholas Piggin To: linux-mm@kvack.org Cc: Nicholas Piggin , linux-arch@vger.kernel.org Subject: [RFC PATCH 0/4] possibilities for improving invalidations Date: Thu, 26 Jul 2018 01:52:42 +1000 Message-Id: <20180725155246.1085-1-npiggin@gmail.com> X-Mailer: git-send-email 2.17.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: X-Virus-Scanned: ClamAV using ClamSMTP I wonder if we could make some improvements to zapping pages to reduce TLB flushes under PTL, and to single threaded pte updates to reduce atomic operations. This might require some changes to arch code, particularly the last patch. I'd just like to see if I've missed something fundamental with the mm or with pte/tlb behaviour. Thanks, Nick Nicholas Piggin (4): mm: munmap optimise single threaded page freeing mm: zap_pte_range only flush under ptl if a dirty shared page was unmapped mm: zap_pte_range optimise fullmm handling for dirty shared pages mm: optimise flushing and pte manipulation for single threaded access include/asm-generic/tlb.h | 3 +++ mm/huge_memory.c | 4 ++-- mm/madvise.c | 4 ++-- mm/memory.c | 40 ++++++++++++++++++++++++++++++++------- 4 files changed, 40 insertions(+), 11 deletions(-)