From patchwork Tue Aug 28 11:20:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 10578277 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 3C79B174C for ; Tue, 28 Aug 2018 11:20:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C40428D71 for ; Tue, 28 Aug 2018 11:20:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F525299CC; Tue, 28 Aug 2018 11:20:49 +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 B6AE728D71 for ; Tue, 28 Aug 2018 11:20:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 16E946B45E9; Tue, 28 Aug 2018 07:20:47 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 11E356B45EA; Tue, 28 Aug 2018 07:20:47 -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 00CE96B45EB; Tue, 28 Aug 2018 07:20:46 -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 B33406B45E9 for ; Tue, 28 Aug 2018 07:20:46 -0400 (EDT) Received: by mail-pg1-f197.google.com with SMTP id d132-v6so944938pgc.22 for ; Tue, 28 Aug 2018 04:20:46 -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=HpceU0oLMX/N4fM279jk3FPRdI+msJs42Hh+cmRV4BI=; b=id/BBSK/TLpJNhLZ8PIE2pIuaX/lVBzdgufYW/WjuzPBDyfT0lZO7IiYdDDrHQbOnq Petly+s/psBhmmy8xJBtGlKjDxkv9rlOOPcX+zHle1tI9VIUDQ8FLM4hWLY+WhhqDstj H36ShikPfOZ1Bv0cxzMJ9qwNPVr90ra8eMA7zBnWjXRLT02Q3HSaWJD1DSdD8V4+/dIE o1jl6Sd7jSh4QwHZS3L7bifMd8oJlb0/xzK+HuJ+goMQ5ACMhLyt5+JYBk5wuY/ed1IW 9LCpq0Hd3rg5yHYYYtivzKuifZpgNOVrl5vKQ0QGjcQ/8XOR30y4FfEKYlxV2m9XQRHw 86Zw== X-Gm-Message-State: APzg51CfG1ax99rMJvfLz8qVTKhqKmEYXyZ5Sjl5uyQEvoxhm+aHmJ92 7zYTrfiG5vQUn2NoeSBRgCDQL89wJBe/Pta0h1C5UFOi9zoc2qrEd/uP5yXfErpT57ea+lPDmQA HC+ybBM8ROaKSKFUvZ4w3mXjMQ1eXBc3gNcse3C0/nbbXRIu/EElsPU2GDyTiiKpobuTZ0r6H7j qLO6qGTI/8m1PZUIlE/QFSFaitGYQdVDOaYEAkm5O929u9ioJdqSZ6KVuAuP8+Fl2d7nePJwwg1 WiSfP4zZ2EmbJJmNysXDQPTCSt0L+2jCVkZsnJ0R8E94nsro5qLCm3VmjZX/gAGhtSpcB75Slo6 32VzRM8mwWDwrxK6K6k+EvZs1dw83R+Sc9J6wM2tI7LJoH1iGZrPE0iNHjOZTybxJlBEPSWDxPQ 3 X-Received: by 2002:a63:f26:: with SMTP id e38-v6mr1086431pgl.354.1535455246405; Tue, 28 Aug 2018 04:20:46 -0700 (PDT) X-Received: by 2002:a63:f26:: with SMTP id e38-v6mr1086381pgl.354.1535455245659; Tue, 28 Aug 2018 04:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535455245; cv=none; d=google.com; s=arc-20160816; b=Qq5tRNBY6V8qIGgrTjCtjzcYpsb6Vz/5Urg8GvXezQ7ysaDqtOe77EndrGYdYw2HQJ 3XznrAzBO/tG87CYhwl+r3dcv6Y/JiXyrbEcBcR9CHQnuBzeN+TXG2o+sVBJqNvl1dTT 0zJom/mSismJ3BUA67W6tSTOFKV/ctSrXKmm5pnefTw7zKjNH8BoKqyq8nTwBM4XEq3+ EQkGFjpEQXLUetx4YafR5vFiCIVJ9/a+e1lJMPQyYT3Esdm2OrPUMvGp7XQ6Q3LARAvZ xy2BBAAIG2u9vqRreVqGoUyXCwwN38btNauu/RxbOD16PlDqLQBU6vBEoj9rgWVWUHE+ PUNw== 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=HpceU0oLMX/N4fM279jk3FPRdI+msJs42Hh+cmRV4BI=; b=ZSmKaGNMwTWnA0yXQQI16IloaiRFgVTNamXjNLRqw5oFk30r3eUKKfBlfQFLILJ5UY PMHeNB83CzeiPsOuQe8q5c+/SjEK5ozAISGK986gGst7c4FYgEo4WMDylzcMn+v/GM2o 8uOPqSIl7bjNw5ZEKdv8ZimJbFOdCBwJD1HtGiRn/PlgNZ2a7GjEwmKNBSuUcwmIiVUD pOuecdOsOp2TEfbYyHwAieXCWj/8ZGn0bOTC6cQUJqBgqYB1wuq28DWu53ehEouODKPs UMseiTWGCLjeprF2yfda12vnaZwif+04Mkrol1zT9OYU2ru9EKGVTfCdcbVXx/sQl2rz 5zzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rCOeJmPh; 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 b90-v6sor177440pfe.77.2018.08.28.04.20.45 for (Google Transport Security); Tue, 28 Aug 2018 04:20:45 -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=rCOeJmPh; 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=HpceU0oLMX/N4fM279jk3FPRdI+msJs42Hh+cmRV4BI=; b=rCOeJmPhCHPAqW8RAmKC/BV6//lBIoYLvdwo8Y1ZWDr3nN76/Joq6VYhBDsADg/Mpt db3WuQC8GgM+PH0qZNVzerVwAN2jPSNeaQ7uVkhz4ecZsVmioaihbG+bWWgeKemqxeBW otm0bCjbzFWQQeZ3UVcL7N2i4jJSbm6MIvABQ8mTumDGS5B0Hey3BrFDnbydAujpgtHW NSCwqSI/C1hQ7i/v6cCbizecOJk3ugzTyRlEIKLdrw1gD1Acrl4WAc6IGn6z1hcm/kY3 ISaczXQDzH2bJkWy41h3hjtidGRrssowW7e7L7ixtm2yu8RORhxgNUqjM3BMkoAEKU8B ix6A== X-Google-Smtp-Source: ANB0Vdai8Ai69HuwiXJTCOM6FwviEsNLOgxvvBfhgZWOpPuuHrpa5AYPntmrzA0tO/7LlVzXvZDHYQ== X-Received: by 2002:a62:c9:: with SMTP id 192-v6mr1077949pfa.99.1535455245223; Tue, 28 Aug 2018 04:20:45 -0700 (PDT) Received: from roar.au.ibm.com (59-102-81-67.tpgi.com.au. [59.102.81.67]) by smtp.gmail.com with ESMTPSA id s3-v6sm3287917pgj.84.2018.08.28.04.20.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 04:20:44 -0700 (PDT) From: Nicholas Piggin To: linux-mm@kvack.org Cc: Nicholas Piggin , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Andrew Morton , Linus Torvalds Subject: [PATCH 0/3] mm: dirty/accessed pte optimisations Date: Tue, 28 Aug 2018 21:20:31 +1000 Message-Id: <20180828112034.30875-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 Here are some patches that didn't get much comment last time. It looks like x86 might benefit too though, so that might get people interested. I improved changelogs and added some comments, but no real logic changes. I hope I didn't get the x86 numbers wrong, they're more significant than I expected so it could quite well be a problem with my test (corrections welcome). Any data from other archs would be interesting too. Andrew perhaps if there aren't objections these could go in mm for a while. Thanks, Nick Nicholas Piggin (3): mm/cow: don't bother write protectig already write-protected huge pages mm/cow: optimise pte dirty/accessed bits handling in fork mm: optimise pte dirty/accessed bit setting by demand based pte insertion mm/huge_memory.c | 24 +++++++++++++++--------- mm/memory.c | 18 ++++++++++-------- mm/vmscan.c | 8 ++++++++ 3 files changed, 33 insertions(+), 17 deletions(-)