From patchwork Thu Jun 27 12:48:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 11019633 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 F2AFD13B4 for ; Thu, 27 Jun 2019 12:48:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E258028A71 for ; Thu, 27 Jun 2019 12:48:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D613A28A7E; Thu, 27 Jun 2019 12:48:45 +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=-2.9 required=2.0 tests=BAYES_00,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 6FC8928A71 for ; Thu, 27 Jun 2019 12:48:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D7798E0003; Thu, 27 Jun 2019 08:48:44 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 588D08E0002; Thu, 27 Jun 2019 08:48:44 -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 475E98E0003; Thu, 27 Jun 2019 08:48:44 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by kanga.kvack.org (Postfix) with ESMTP id 0D3198E0002 for ; Thu, 27 Jun 2019 08:48:44 -0400 (EDT) Received: by mail-ed1-f70.google.com with SMTP id f19so5870796edv.16 for ; Thu, 27 Jun 2019 05:48:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id; bh=vX0WNZwdF3DW0KTKR0Wkmszsjql33DA2/oAzcqt2JrA=; b=cILEm+zn/1cHROTwnYsE/AAIuXkLkEBkW92qo3SzUoSBjGMOqJA4wi6LG2Y9h7gOE8 ZrDTgvG4dXVC+tpFiCW8PgJpCsL8pnB4tnMo2OaxwzKtDpEABuMoSCOO3EIJr5Uh1rP6 Ib0AFNqSQyTTt54WtFrhw3xUfNIXqUMGO5wx3V/G/GUg2N5lYrtVoDdP9baHwsTdVlq/ h9ygpU5UT+QEg3d3HEqNEZ6ArrKupWJ52Ni6c1raGUvRZzB0fyMCHkHCMV/eVLkPAqjr 4fEYmGqcNzdyoiz/ruPMMRRnrOBWyX6xJTV2PUydF/VaXQ2eUBXr0dX3qDDDHbgcvc31 U1tQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com X-Gm-Message-State: APjAAAVy1/aA/4IevKQgCfBhU5NOSBof46hJNEQTwy6BVLZz4Q+If8uA dyZcjRhw6wxiJd6f3MHGzjHbbV9JpVaOlcw38FjT07Z8I0IfaWr/Qj0tuTfiaZM23dMfLo0yF71 6Q3DrpD7MGHPP6anprJsZW2llUdbm8wx48RHFfkyh6AabjOQIvE6PivKLXe4cACfCDA== X-Received: by 2002:a50:c8c3:: with SMTP id k3mr3893773edh.189.1561639723505; Thu, 27 Jun 2019 05:48:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrLfe4PvSKQLEQqrN3rv4PKCAmBBT63nuVa80eRIK3XXUBTzFnM1Uhy3Grw1Y19sswFQvz X-Received: by 2002:a50:c8c3:: with SMTP id k3mr3893721edh.189.1561639722771; Thu, 27 Jun 2019 05:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561639722; cv=none; d=google.com; s=arc-20160816; b=eCWcKsw/7WdUWjCXBsPQ+fSa88yVimHPKdD3qgYt5KRyOAtggLXfSjM9QSpDNTNqHE k+OwCdRFavGUrtSiKdd1xWFSlkn5M96m3aWrmojXZrUkzFuwjhS134ztECqIMnAxeurH usatM+7PwO0vPa1LJFRfElHi/MQ/yfhjc0pTJUM+zkSP85wTngOzPvbg7oy3ZhhBhOjZ 0GVkfzxepEV/1j6nVenzt6f/4rbUc/5Is5WG3RxMNK1QpXna7ppoLy/jmyon8EeK4dkD KuKHJcMJy1GKmQXXEcvbkpxId7r7IElsmB/aAwJJKlbw+gudH/av/rCiaJ4epF4YOIA0 72fw== 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; bh=vX0WNZwdF3DW0KTKR0Wkmszsjql33DA2/oAzcqt2JrA=; b=eUTl6QKyb14m+1JIkOxYWPHW5rg8nwjO4lcB4r7DxV1djQz/2iXCz+2oIYPaFbI5qs DfCAm5neHZOGvKrb8EDomUXourTRMzJGEB99DDpzLb4hUDGh5lNk3D6B4q38Pu4z6fgi /skFMZEDFwqadXEYANcxtnVFrStZVM/AqlVGOAH6WNe2/3WK1Kr/nxRrtGduDFSDah9H HUiiXvnprC64QtYaby7znsz/qSX30dGHUeVS0kxjY7UcWnkrFWgO6HXyXquA6x6tfeaq 8/Y/KvaccxhHIsD085Gtg2fyPTqj1ZA6wey5Di3Bsm7pTo/C4l8fejhPE5QWYbM9GhFd tdxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com Received: from foss.arm.com (foss.arm.com. [217.140.110.172]) by mx.google.com with ESMTP id y6si1386344ejp.270.2019.06.27.05.48.42 for ; Thu, 27 Jun 2019 05:48:42 -0700 (PDT) Received-SPF: pass (google.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) client-ip=217.140.110.172; Authentication-Results: mx.google.com; spf=pass (google.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DF6942B; Thu, 27 Jun 2019 05:48:41 -0700 (PDT) Received: from p8cg001049571a15.arm.com (unknown [10.163.1.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9656E3F718; Thu, 27 Jun 2019 05:48:38 -0700 (PDT) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Mark Rutland , Marc Zyngier , Suzuki Poulose , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC 0/2] arm64/mm: Enable THP migration Date: Thu, 27 Jun 2019 18:18:14 +0530 Message-Id: <1561639696-16361-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 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 This series enables THP migration without split on arm64 by subscribing to ARCH_ENABLE_THP_MIGRATION. Before that it modifies arm64 platform THP helpers like pmd_present() and pmd_trans_huge() to comply with expected generic MM semantics as concluded from a previous discussion [1]. Initial THP migration and stress tests look good for various THP sizes. I will continue testing this further. But meanwhile looking for some early reviews, feedbacks and suggestions on the approach. This is based on linux-next tree (next-20190626). Question: Instead of directly using PTE_SPECIAL, would it be better to override the same bit as PMD_SPLITTING and create it's associated helpers to make this more clear and explicit ? [1] https://lkml.org/lkml/2018/10/9/220 Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Suzuki Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Anshuman Khandual (2): arm64/mm: Change THP helpers to comply with generic MM semantics arm64/mm: Enable THP migration without split arch/arm64/Kconfig | 4 ++++ arch/arm64/include/asm/pgtable.h | 32 +++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-)