Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36870477rwd; Tue, 11 Jul 2023 06:47:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlHo5yPQBjpTPwU6fHzpjl8E0fvdGEnKqdK/QNHvcFOysz2ixqO6pZFBFvF9X8f/F8ZnaJfC X-Received: by 2002:a50:fc15:0:b0:51d:9db8:8257 with SMTP id i21-20020a50fc15000000b0051d9db88257mr17281026edr.30.1689083259724; Tue, 11 Jul 2023 06:47:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689083259; cv=none; d=google.com; s=arc-20160816; b=FIayNScMzBNLCrLPPOMbH9WsTAW/v4yubvVR/o9CQFjxzMW9U7Z41K+eO7tB5uuEE1 j4wmv2cAjpOd60CUtIWKmdkzgLsXH2P2NWA5Sh3Ec33zoqRTuhGNRfyLnJnH2tXSO1gf EcWwKO8Vob5xhI1FyWjlvVCBWToUGlVn6GelwDLPxDjspoIF8r6WkVpNk0H6TkI4WP2a VJD1M+CdgWPWMd/uvioXnvTD4RSVwxH5Ze8I0Ud2Rha3rMqhIoHLkGzQ2RRR3OprHDr5 T+sz/XrxM6/Cw05EGOSCjVS4zqhHa255vGLQtSymOJTegClP3010UfL9NReKRqm9cgt5 +A8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KlnB2tfvK6zA01tMfE90usFEigtkyKBwlIV/RGlhbEc=; fh=x7Vl7cgs9ZZGtlOIgYR30s73lfKPJ3hZE4zQpK0vTUs=; b=othQeqfyXs1gL3L5UEoQsl/ryKuNBw6yxOm9Xz4rQLXEo1jThPwIJ6S2OTbUJxXSUX eThnrPnAm7AePoHiBDTCj86rLjK1rNt2Wil7gOE9MDgtGKTSS4M09flY5/8OcBFSEg36 j2UuaKdb/baB3/gAzdQurWSc2Iey3ieEX57ku5p1OA8Bd0Qr1YCQ+xHx7bR1ZENC52OZ pcWPEQwblXV2xg14swtEUFQodqCtIL5GMKfP4LluHqRcWzFURmfk6Mig5svS7mu7mrjc teldofEqVysEnEXsb+pk1ilqjVFcMU7R7PDEC+qMeX5SbIFfToK6Isnvr8MLFHzLq2Q7 y0Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=CkKrD0bR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020aa7d98b000000b0051de58665c0si2107861eds.570.2023.07.11.06.47.15; Tue, 11 Jul 2023 06:47:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=CkKrD0bR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232432AbjGKMhp (ORCPT + 99 others); Tue, 11 Jul 2023 08:37:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232198AbjGKMhm (ORCPT ); Tue, 11 Jul 2023 08:37:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBD33171B; Tue, 11 Jul 2023 05:37:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KlnB2tfvK6zA01tMfE90usFEigtkyKBwlIV/RGlhbEc=; b=CkKrD0bRwFnd4JjbmnZV9d1FGE NFbm5ssns3ISKSsdZDQ5sCU7+tQkCpLVQbHcT0E/1gtjNJkJTIevFzmqkbyZuf1Mj4AqYOmSED1oY umjsfhCQO+J+P/dyQz4emavUaIQwzN4mUBFwsi/OFX3cVouA7VRKiagiMcPVCvFMD7FjQfkcDwm25 tWFIT6suFiVLnOgPzk18GpdH6f+xuVcN9BSpLD1MAVUNtarIxQMweeF7hG7KZ/7x361aB1MTP5PJw uVeSSiX9aso+xhA1lEWInzX6tudKcEoN9mbD8Gb7qNTipA3Ko7qBwt9lK1qJVIWREeGv+eZ3IukD8 dskKbcOw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qJCbT-00Fid1-AK; Tue, 11 Jul 2023 12:36:27 +0000 Date: Tue, 11 Jul 2023 13:36:27 +0100 From: Matthew Wilcox To: Christian Borntraeger Cc: Andrew Morton , Claudio Imbrenda , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Gerald Schaefer , linux-s390 Subject: Re: [PATCH v5 00/38] New page table range API Message-ID: References: <20230710204339.3554919-1-willy@infradead.org> <8cfc3eef-e387-88e1-1006-2d7d97a09213@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cfc3eef-e387-88e1-1006-2d7d97a09213@linux.ibm.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 11, 2023 at 11:07:06AM +0200, Christian Borntraeger wrote: > Am 10.07.23 um 22:43 schrieb Matthew Wilcox (Oracle): > > This patchset changes the API used by the MM to set up page table entries. > > The four APIs are: > > set_ptes(mm, addr, ptep, pte, nr) > > update_mmu_cache_range(vma, addr, ptep, nr) > > flush_dcache_folio(folio) > > flush_icache_pages(vma, page, nr) > > > > flush_dcache_folio() isn't technically new, but no architecture > > implemented it, so I've done that for them. The old APIs remain around > > but are mostly implemented by calling the new interfaces. > > > > The new APIs are based around setting up N page table entries at once. > > The N entries belong to the same PMD, the same folio and the same VMA, > > so ptep++ is a legitimate operation, and locking is taken care of for > > you. Some architectures can do a better job of it than just a loop, > > but I have hesitated to make too deep a change to architectures I don't > > understand well. > > > > One thing I have changed in every architecture is that PG_arch_1 is now a > > per-folio bit instead of a per-page bit. This was something that would > > have to happen eventually, and it makes sense to do it now rather than > > iterate over every page involved in a cache flush and figure out if it > > needs to happen. > > I think we do use PG_arch_1 on s390 for our secure page handling and > making this perf folio instead of physical page really seems wrong > and it probably breaks this code. Per-page flags are going away in the next few years, so you're going to need a new design. s390 seems to do a lot of unusual things. I wish you'd talk to the rest of us more.