From patchwork Tue Oct 16 13:13:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 10643531 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 AFDD813AD for ; Tue, 16 Oct 2018 13:14:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C93428C31 for ; Tue, 16 Oct 2018 13:14:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 904E229654; Tue, 16 Oct 2018 13:14:00 +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 3BFE528C31 for ; Tue, 16 Oct 2018 13:14:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D59896B0003; Tue, 16 Oct 2018 09:13:58 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D07596B0005; Tue, 16 Oct 2018 09:13:58 -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 BF6786B0006; Tue, 16 Oct 2018 09:13:58 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by kanga.kvack.org (Postfix) with ESMTP id 813116B0003 for ; Tue, 16 Oct 2018 09:13:58 -0400 (EDT) Received: by mail-pg1-f197.google.com with SMTP id e6-v6so17057292pge.5 for ; Tue, 16 Oct 2018 06:13:58 -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=a64q9IsY9mfK+JGEdi2vqlrBaBM9lMLc6dBKgesPus8=; b=J+3MBBvHctEl8ltdxC/F4uRbR0ScG4woC6DmzF6i0md32Gofml2nj8ENAKh7OSyRV9 tg1idsSyBB5EaMX+yRBZAJdxwFskHQu1SF6T46a94nb6PKa0//mLowa+esVbT4u6q+Tt HVva4j5jEmMfUDLIK7ErpH5L3XfRD2aDaig1uCQMSNDc6BBTWZPXKal5+zF+cXyMw2Kg IknPV2ZJYC+0Uc6SF7DRcNYszSrGGW2w99nxibmVDqIxif5nVki+XST98Mcs/zONb7/D 9cFr1guyugoX+9c/zlM3w1qjYZT0mxqYsAiu9OkvCq2s8aF4OmxUNEJNpMMMoMjUXCdn 6gtA== X-Gm-Message-State: ABuFfoiTI85Rly5G823guvRP0ZKnZt/jhyvSPjEsL1aNUUu//lLc3CO3 l6fQFjYpssYmzkRi2trlFEaEN5ybYlOfduETgSy+yqUt+yLTqmW5RaWozlEY4v9I4Mul2ETnOi6 bvdhiQRenzPRO729r5tNuzywjlq+3TgIJVOjBNKqi5AQEu8WCOlhWw8rGBCo1o30spEyfcU0fo1 9FBFoPzMwDnzu79En8Io/J9NPIOs/7ndZZfaVi8eTrDGTRoy//ZQ8nGhrisNb6cPv0YeNAPcPTS 9Nk5qGpDOfj4e8sZx9nWYmfzs1+ez3Xfb3B9MOHrcpU/m5Fb5EteIPYgNEHmd3SAdoGTpnvM/Ei xquTJ9NyzWqiINFa4u/AeVJ3O+YbhGmKoijUAQBgaNtaTyjpD33PXmuEa9JdgkoUiHrsvvAwhWy J X-Received: by 2002:a63:41c2:: with SMTP id o185-v6mr19827737pga.11.1539695638210; Tue, 16 Oct 2018 06:13:58 -0700 (PDT) X-Received: by 2002:a63:41c2:: with SMTP id o185-v6mr19827702pga.11.1539695637484; Tue, 16 Oct 2018 06:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539695637; cv=none; d=google.com; s=arc-20160816; b=H0zyEOmfqNNUuEP2FKK8y6kPKADcA/ydjUTwkqeF/4RB1YIMauxiPp2lP9xYTLSk0e sCpyw1BqaL1zis8D4OnKUkSWd6A2OnHodi68KjzGjjE8oJaCQGBspRsv61pIvSNQj+8Y 65kw59M/iM31uwA4JX+In3Msg5yn/r0FXqBiZ3mwvkUhXj/ZD1CCXno97YChc/VLivS0 3JgbFGziVklqWgizqpeCqYv0X01wePxhzaG9gEyTQEce0GQ7IzTzt6mV40vVDa/1e2pe tDHaZo4KksxYB+ZqKmkuTLoNvVVbZ0iXEmpaZMVaP4sFGoW5F/bbwTVjc46lNznIij5r 7yoA== 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; bh=a64q9IsY9mfK+JGEdi2vqlrBaBM9lMLc6dBKgesPus8=; b=OnAevrZlxlPBnLQwn+KacyhGnKWXUz2z14ylN1yAFXK0d/M5PWHXCNQFFF+K769+rE oSKRI4aoSvDn0vvRwzZuMx58K4mxg0bKRUgYNoTnyB0OprBf9vi1Qzx41fsObatQLwLq U1zeDxPzFovQG0jT8DpcKuSosISe3HagXW/E+yT/TJ3hIr6yNFPiJdImOSfF3LhDnCKA ydl12BTYiMu5cEI/aC/KXSi4HqbbsXiSU687/8BGcxonQSd7q9uelb3u1x3OqTiiz8uZ JqWNMnml53wmaRdHmwtrmwKFEqVJespSuafJqP94c9gB84JO5bRFJBvn3jPkVnVgUgGY Srxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fm4P1UIG; spf=pass (google.com: domain of npiggin@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=npiggin@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id p7-v6sor4663480pga.39.2018.10.16.06.13.57 for (Google Transport Security); Tue, 16 Oct 2018 06:13:57 -0700 (PDT) Received-SPF: pass (google.com: domain of npiggin@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fm4P1UIG; spf=pass (google.com: domain of npiggin@gmail.com designates 209.85.220.65 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=a64q9IsY9mfK+JGEdi2vqlrBaBM9lMLc6dBKgesPus8=; b=Fm4P1UIGZcZlSKjY/TiRr3qRMVWRSvmx3cUaLtDHArZq5cTRjdHwdh0jIwo2Tdm3DT sYbM/EBo61INU00lYEP70p9e3w1oLsW4SDhLk0jx9ZQBj4FxPN8+0IYDcdKTA12kPs/z P1cIBYYQH6itjnUgwwzV7Ki13ac69Th1OylXYonanQRV0kFPFC6FhDWjaKXnca0LMveb AmbLWUguC9lOH3Uk9CC43noJrRd33CuDkf6tqprJ+Fa2C9XrERR1eA8HIsuNHmqVFO0L AKL2RZ23ZkdJpjLKMJYfX5WeGJftOSZsg/MKMeZRjmUrrxk4MxmzAiPzFxtV6N97xPBk xzDw== X-Google-Smtp-Source: ACcGV63fufuC78nwRl2J1kK16yYyt2v0azobVvGKFe3gFlVrmI37vE3DAVJ2CPDaDJTkoMmSWv/sPA== X-Received: by 2002:a63:81c8:: with SMTP id t191-v6mr20202153pgd.399.1539695636307; Tue, 16 Oct 2018 06:13:56 -0700 (PDT) Received: from roar.local0.net ([60.240.252.156]) by smtp.gmail.com with ESMTPSA id j62-v6sm16043423pgd.40.2018.10.16.06.13.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 06:13:55 -0700 (PDT) From: Nicholas Piggin To: Andrew Morton Cc: Nicholas Piggin , Linus Torvalds , linux-mm , linux-arch , Linux Kernel Mailing List , ppc-dev , Ley Foon Tan Subject: [PATCH v2 0/5] mm: dirty/accessed pte optimisations Date: Tue, 16 Oct 2018 23:13:38 +1000 Message-Id: <20181016131343.20556-1-npiggin@gmail.com> X-Mailer: git-send-email 2.18.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 Since v1 I fixed the hang in nios2, split the fork patch into two as Linus asked, and added hugetlb code for the "don't bother write protecting already writeprotected" patch. Please consider this for more cooking in -mm. Thanks, Nick Nicholas Piggin (5): nios2: update_mmu_cache clear the old entry from the TLB mm/cow: don't bother write protecting already write-protected huge pages mm/cow: optimise pte accessed bit handling in fork mm/cow: optimise pte dirty bit handling in fork mm: optimise pte dirty/accessed bit setting by demand based pte insertion arch/nios2/mm/cacheflush.c | 2 ++ mm/huge_memory.c | 24 ++++++++++++++++-------- mm/hugetlb.c | 2 +- mm/memory.c | 19 +++++++++++-------- mm/vmscan.c | 8 ++++++++ 5 files changed, 38 insertions(+), 17 deletions(-)