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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 6CC80C4743E for ; Tue, 8 Jun 2021 17:11:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F2BCD61359 for ; Tue, 8 Jun 2021 17:11:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2BCD61359 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4D9946B006C; Tue, 8 Jun 2021 13:11:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B0FB6B006E; Tue, 8 Jun 2021 13:11:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 378C96B0070; Tue, 8 Jun 2021 13:11:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id 0813C6B006C for ; Tue, 8 Jun 2021 13:11:00 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 929CD8249980 for ; Tue, 8 Jun 2021 17:11:00 +0000 (UTC) X-FDA: 78231196680.11.D661BDA Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by imf30.hostedemail.com (Postfix) with ESMTP id 4061EE000251 for ; Tue, 8 Jun 2021 17:10:58 +0000 (UTC) Received: by mail-lj1-f182.google.com with SMTP id e11so27949369ljn.13 for ; Tue, 08 Jun 2021 10:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=etyKwyH/Z6zsvIPi36f/jr7sZJSDRryKbRXIKyys1es=; b=IywdZbGoCLgy8Pngf2ClQ8CLffHPaiViyi6GgffnbvaGdE1YPmAaJLr0qrF3j5oxea DhICDT6RT6i3ONdWc1W/roz/ZwrQHoMVFo/0NAy16CfGpJUb4wN+q8T5qjWqtuaTcnqT SIls+fZdW5OfZbDp4dczeg3YLhea/V5jNsSCY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=etyKwyH/Z6zsvIPi36f/jr7sZJSDRryKbRXIKyys1es=; b=pFLGV/gi31fTJFS5tOXIPiCxASkdS0KvrAHVgZkBTsLLD4FZw6xpBhACtQJAWYQ9yF sBwRf/CNGLLAW7kTHIUbowSSHwuuf5/QLptliL/LqTnOknLBP+/WMF0E23f09q8OYm53 664K0WWDkJfKMNprnGPpZfwF1Z3+W1+NbRl8g31gyBmbTUErzB03tDz/F1G5kuvF5xuN TzsZbxOm/T4THgZWqDt8i5xdEl5q80SqFK0lAP9kQ4jUtv7ctgiMcsd5rKuv4sudnCG1 7EMvwWP9gQcTpzGwaUMuanRjDloK0Ih72bTyZNObxGSmYIW+2LX/5ha1LLb9kssEbULm njTg== X-Gm-Message-State: AOAM531Swj3Rcmsu0StCNWgp2tOMIETNse1niWvX0QjnradsgJ78EDQJ Bu694q02wfTq6p5y/6VWqUZYXZQV107HoHYfKaY= X-Google-Smtp-Source: ABdhPJzxQyjBCwtj6l1n3q8ndinZ0KPEQ0LT5DbOdQ9SmUTS5xhobTS+/NuwT8z1WDYpArJPhj9QVA== X-Received: by 2002:a2e:a7d3:: with SMTP id x19mr19333701ljp.120.1623172257982; Tue, 08 Jun 2021 10:10:57 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id m29sm27499lfp.203.2021.06.08.10.10.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Jun 2021 10:10:57 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id i10so33263675lfj.2 for ; Tue, 08 Jun 2021 10:10:57 -0700 (PDT) X-Received: by 2002:a05:6512:3f82:: with SMTP id x2mr15509421lfa.421.1623172256802; Tue, 08 Jun 2021 10:10:56 -0700 (PDT) MIME-Version: 1.0 References: <20210607055131.156184-1-aneesh.kumar@linux.ibm.com> In-Reply-To: From: Linus Torvalds Date: Tue, 8 Jun 2021 10:10:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 00/11] Speedup mremap on ppc64 To: Nick Piggin Cc: "Aneesh Kumar K.V" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "mpe@ellerman.id.au" , "linuxppc-dev@lists.ozlabs.org" , "kaleshsingh@google.com" , "joel@joelfernandes.org" , Christophe Leroy , "Kirill A . Shutemov" Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=IywdZbGo; dmarc=none; spf=pass (imf30.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.208.182 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org X-Rspamd-Server: rspam02 X-Stat-Signature: f1isxmbw5q7kmpaniya6z3ctfn58wyxc X-Rspamd-Queue-Id: 4061EE000251 X-HE-Tag: 1623172258-904817 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: On Mon, Jun 7, 2021 at 3:10 AM Nick Piggin wrote: > > I'd really rather not do this, I'm not sure if micro benchmark captures everything. I don't much care what powerpc code does _itnernally_ for this architecture-specific mis-design issue, but I really don't want to see more complex generic interfaces unless you have better hard numbers for them. So far the numbers are: "no observable difference". It would have to be not just observable, but actually meaningful for me to go "ok, we'll add this crazy flag that nobody else cares about". And honestly, from everything I've seen on page table walker caches: they are great, but once you start remapping big ranges and invallidating megabytes of TLB's, the walker caches just aren't going to be your issue. But: numbers talk. I'd take the sane generic interfaces as a first cut. If somebody then has really compelling numbers, we can _then_ look at that "optimize for odd page table walker cache situation" case. And in the meantime, maybe you can talk to the hardware people and tell them that you want the "flush range" capability to work right, and that if the walker cache is so important they shouldn't have made it a all-or-nothing flush. Linus 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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 6A0EDC47082 for ; Tue, 8 Jun 2021 17:11:38 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C379C6127A for ; Tue, 8 Jun 2021 17:11:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C379C6127A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Fzxbr5Zlcz3bvr for ; Wed, 9 Jun 2021 03:11:36 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=IywdZbGo; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=2a00:1450:4864:20::22a; helo=mail-lj1-x22a.google.com; envelope-from=torvalds@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=IywdZbGo; dkim-atps=neutral Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FzxbK37M5z301N for ; Wed, 9 Jun 2021 03:11:07 +1000 (AEST) Received: by mail-lj1-x22a.google.com with SMTP id e11so27949419ljn.13 for ; Tue, 08 Jun 2021 10:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=etyKwyH/Z6zsvIPi36f/jr7sZJSDRryKbRXIKyys1es=; b=IywdZbGoCLgy8Pngf2ClQ8CLffHPaiViyi6GgffnbvaGdE1YPmAaJLr0qrF3j5oxea DhICDT6RT6i3ONdWc1W/roz/ZwrQHoMVFo/0NAy16CfGpJUb4wN+q8T5qjWqtuaTcnqT SIls+fZdW5OfZbDp4dczeg3YLhea/V5jNsSCY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=etyKwyH/Z6zsvIPi36f/jr7sZJSDRryKbRXIKyys1es=; b=solts5WEtipu0toglF4FzuoT5yMcrWiyl7mq3HElssM46q89ROj2qoIZvnzSGm2RcG c6fCzCdjCI8p4aYSiLUtC/oNUT+JYD66DJtH5HXBbDgEErESrfVuchTv8hzwCzUXHzRA 0x2qhQ8d2jImtyExiA0aZAVdewHqZc4bJOExgLRrfAj3qS9sZBGo75U1n9SUgtRxoZRP cTUPvQpVJOTd7/j+Cm+0gKIw/JnlCvXfHAIDxhghwqfm7aPy+ZhmihUcXaudX6n+uJC6 LBzwmnCwQpO/1diVySRS0IrBICBlxjIeMvJHUI4pYRkxcBuZUDTQLibW0b6eOb52pRlj ETtw== X-Gm-Message-State: AOAM533W7d38Uz8rlkYXQmxNEvUWFX5OzQK9+07Fj2SDVDGmCUp49eif N8HmZ/7lu8VMaJEJTmgflYoO0b9mxvXsy0AtTtQ= X-Google-Smtp-Source: ABdhPJzWP9qnbMpP5OCqHjK+j/tW9qPal/sy3ERWeRZD8ROemqyrS/v6s3YWwI2LUJa/qZfQ81ppkA== X-Received: by 2002:a2e:96c9:: with SMTP id d9mr2344708ljj.0.1623172258149; Tue, 08 Jun 2021 10:10:58 -0700 (PDT) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id x1sm30058lfa.21.2021.06.08.10.10.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Jun 2021 10:10:57 -0700 (PDT) Received: by mail-lf1-f54.google.com with SMTP id f11so33109368lfq.4 for ; Tue, 08 Jun 2021 10:10:57 -0700 (PDT) X-Received: by 2002:a05:6512:3f82:: with SMTP id x2mr15509421lfa.421.1623172256802; Tue, 08 Jun 2021 10:10:56 -0700 (PDT) MIME-Version: 1.0 References: <20210607055131.156184-1-aneesh.kumar@linux.ibm.com> In-Reply-To: From: Linus Torvalds Date: Tue, 8 Jun 2021 10:10:41 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 00/11] Speedup mremap on ppc64 To: Nick Piggin Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Aneesh Kumar K.V" , "linux-mm@kvack.org" , "kaleshsingh@google.com" , "joel@joelfernandes.org" , "Kirill A . Shutemov" , "akpm@linux-foundation.org" , "linuxppc-dev@lists.ozlabs.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Jun 7, 2021 at 3:10 AM Nick Piggin wrote: > > I'd really rather not do this, I'm not sure if micro benchmark captures everything. I don't much care what powerpc code does _itnernally_ for this architecture-specific mis-design issue, but I really don't want to see more complex generic interfaces unless you have better hard numbers for them. So far the numbers are: "no observable difference". It would have to be not just observable, but actually meaningful for me to go "ok, we'll add this crazy flag that nobody else cares about". And honestly, from everything I've seen on page table walker caches: they are great, but once you start remapping big ranges and invallidating megabytes of TLB's, the walker caches just aren't going to be your issue. But: numbers talk. I'd take the sane generic interfaces as a first cut. If somebody then has really compelling numbers, we can _then_ look at that "optimize for odd page table walker cache situation" case. And in the meantime, maybe you can talk to the hardware people and tell them that you want the "flush range" capability to work right, and that if the walker cache is so important they shouldn't have made it a all-or-nothing flush. Linus