From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 1348BC54FCF for ; Wed, 25 Mar 2020 16:16:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D932A20772 for ; Wed, 25 Mar 2020 16:16:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D932A20772 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7CA606B0032; Wed, 25 Mar 2020 12:16:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 77AA06B00B8; Wed, 25 Mar 2020 12:16:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 690516B00BA; Wed, 25 Mar 2020 12:16:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0200.hostedemail.com [216.40.44.200]) by kanga.kvack.org (Postfix) with ESMTP id 4CDAE6B0032 for ; Wed, 25 Mar 2020 12:16:02 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 25672181AB18D for ; Wed, 25 Mar 2020 16:16:02 +0000 (UTC) X-FDA: 76634386164.02.trade47_8befcb1fa641d X-HE-Tag: trade47_8befcb1fa641d X-Filterd-Recvd-Size: 2809 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Mar 2020 16:16:01 +0000 (UTC) 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 826631FB; Wed, 25 Mar 2020 09:16:00 -0700 (PDT) Received: from [172.16.1.108] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9CDEA3F52E; Wed, 25 Mar 2020 09:15:56 -0700 (PDT) Subject: Re: [RFC PATCH v4 0/6] arm64: tlb: add support for TTL feature To: Zhenyu Ye Cc: will@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, aneesh.kumar@linux.ibm.com, akpm@linux-foundation.org, npiggin@gmail.com, peterz@infradead.org, arnd@arndb.de, rostedt@goodmis.org, maz@kernel.org, suzuki.poulose@arm.com, tglx@linutronix.de, yuzhao@google.com, Dave.Martin@arm.com, steven.price@arm.com, broonie@kernel.org, guohanjun@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, arm@kernel.org, xiexiangyou@huawei.com, prime.zeng@hisilicon.com, zhangshaokun@hisilicon.com References: <20200324134534.1570-1-yezhenyu2@huawei.com> From: James Morse Openpgp: preference=signencrypt Message-ID: Date: Wed, 25 Mar 2020 16:15:58 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200324134534.1570-1-yezhenyu2@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Hi Zhenyu, On 3/24/20 1:45 PM, Zhenyu Ye wrote: > In order to reduce the cost of TLB invalidation, the ARMv8.4 TTL > feature allows TLBs to be issued with a level allowing for quicker > invalidation. This series provide support for this feature. > > Patch 1 and Patch 2 was provided by Marc on his NV series[1] patches, > which detect the TTL feature and add __tlbi_level interface. How does this interact with THP? (I don't see anything on that in the series.) With THP, there is no one answer to the size of mapping in a VMA. This is a problem because the arm-arm has in "Translation table level hints" in D5.10.2 of DDI0487E.a: | If an incorrect value for the entry being invalidated by the | instruction is specified in the TTL field, then no entries are | required by the architecture to be invalidated from the TLB. If we get it wrong, not TLB maintenance occurs! Unless THP leaves its fingerprints on the vma, I think you can only do this for VMA types that THP can't mess with. (see transparent_hugepage_enabled()) Thanks, James