Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20908379rwd; Thu, 29 Jun 2023 08:27:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Yt+Pa720Q1UchtfeIDCaWEY7cSx197OQcd23DV0DbfFbUyQooWHf7Q9U/J6VCH/tXk+sJ X-Received: by 2002:a17:90a:35d:b0:25c:2260:9f5c with SMTP id 29-20020a17090a035d00b0025c22609f5cmr26033690pjf.34.1688052437365; Thu, 29 Jun 2023 08:27:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688052437; cv=none; d=google.com; s=arc-20160816; b=C8GUyFUykwyxBJSbwLWDkHiuQAyVdpoxYzz/NCGckCxtM4LGgjcAlnxI0b2CDm593T ss5ke4BiXhGYvuoxCpQyYEpUoMNrhneO3Y4CBpI8TkvyHe+vnBjnsxvrm6GH8JouvJry aRlzs5+k7QVEjpWlpz23tRxr+kxF/ySvW1eEvG3mZFSU/McN5DCACI9uutJE5VBmA0wF PUR3kxEG8qfj1JWd79bWIj8Kt8z3MuWp+KpQfCA7XLp7pk5Alb5a2uwWEM4YR/AQRpwl 43FJVskwgF/G+3mTh4aC9I+rdJH9Z4tCWCZt6IfW3LlS2587oKtBB4kkZtZKJSgpedLj 3wpQ== 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=52QGPi56OcZzeoQSr1+Puoh9x/N7TMLxPpl1Fa9yAkI=; fh=LXd7MqF1p/LwbhYQRKAi7LL0BaKo1F6OYyE4M8SdCek=; b=pp3qQXijqTUV+ivPaogDr7xivb12zHIx0C/2cebIjQb9C+HKoMaZlU3YrcFoPkOdRI PuEETOFt8ZF9Th/pm/iQWxmkeWKu9ShzzV+X3wG+ETwjk17HrQtTjzy9VciP1+nf61Nh UfdammrJJUjiRSwr6N/OQ0QEtxjRao56CdrKGXaSpxuvqDyfjss596SkF43sTRlfRUIp PlSIcZQYZjkmwuTWSmsf0GILiOH8xCIkX385Ozm9IoVlMZ5uo4udzZJ6oOa4Ws1TaDTM G5zsOZcw6E7mQQ5JJsCQlqcmrCecYClmxIOWdQRrClS+PWY0xDkdd+JXa56FBc2BYwsN yuBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=bQ+QaBv9; 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 lj15-20020a17090b344f00b00263035570e1si6438830pjb.89.2023.06.29.08.27.04; Thu, 29 Jun 2023 08:27:17 -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=@ziepe.ca header.s=google header.b=bQ+QaBv9; 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 S232183AbjF2PW3 (ORCPT + 99 others); Thu, 29 Jun 2023 11:22:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbjF2PW1 (ORCPT ); Thu, 29 Jun 2023 11:22:27 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45A262952 for ; Thu, 29 Jun 2023 08:22:26 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-7659dc74da1so74193985a.3 for ; Thu, 29 Jun 2023 08:22:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1688052145; x=1690644145; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=52QGPi56OcZzeoQSr1+Puoh9x/N7TMLxPpl1Fa9yAkI=; b=bQ+QaBv9kQgn0a/ZUWEzUp17QKK8mKbvu7OHRhiOucSgX3eSl924Wd32DWKpaETuWG AJZQFb8MZEkw10neO7Emyiwf0zs4rexcslIhj26xYbfhNY61Fs/S3zXUfnMd8nKlLHbq CU/gaxpgXz0Fcq+WROZl7v82TmZhyriMp8ghnPjAipqNQvOQZDcDHIDAAILg7qaaRj4g cROZVqbL1LvLpBfUtSNqoHdAU+QoeC+43TKUBXk9yEuGi9WwmY8edNie6xIXgtH/0lEz iYMbIENsQdCcb6GkheV3Ph/F1WPNpdDYyBYfX2SSNtzeR7J1HM4TRkmoUI53LbULfuQV wSDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688052145; x=1690644145; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=52QGPi56OcZzeoQSr1+Puoh9x/N7TMLxPpl1Fa9yAkI=; b=EoT3DZ8eJlbZV1P6WH06qhc9pIvGndjoCVTYM57JWbRbrij9gakFXqJdPWw3tC7WXk qVaoF4iqQeIVhi5kMKnaQhJ7jdb1anAoimiMS2v85aHArpF6Af85ZQF3l5JBAq8/iheF hi5vAmcKcahmp4LRA0SSLgpf0w6zykHKS1ZF2AI+U0fPZ2NzJLWSqKiwzxNu1Md6Yf88 zUYJdD27g1uQp398IVouuSlljEczzDhXC8dZpfxTefOCKsPFZBAdIfDq2GMRqp/4bA+z WG1LZvlGcZl+d4+5g++UvGXbSOGMJOMXi23XmNzcH729awokf3t64VQngUzMhQ0sBwWe lkhQ== X-Gm-Message-State: AC+VfDx0SSqo1mPPhRpUqS2B/edQhPr90QzHGPfyBzaNfoB6oqWKvea4 WNCZmLzEfQZNFAy/VTE5yvPaeg== X-Received: by 2002:a05:620a:e92:b0:767:90a:ae9e with SMTP id w18-20020a05620a0e9200b00767090aae9emr8621873qkm.65.1688052145311; Thu, 29 Jun 2023 08:22:25 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-25-194.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.25.194]) by smtp.gmail.com with ESMTPSA id r15-20020a05620a03cf00b0074e0951c7e7sm6340805qkm.28.2023.06.29.08.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 08:22:24 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1qEtTU-009snj-1H; Thu, 29 Jun 2023 12:22:24 -0300 Date: Thu, 29 Jun 2023 12:22:24 -0300 From: Jason Gunthorpe To: Hugh Dickins Cc: Gerald Schaefer , Andrew Morton , Vasily Gorbik , Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Yang Shi , Mel Gorman , Peter Xu , Peter Zijlstra , Will Deacon , Yu Zhao , Alistair Popple , Ralph Campbell , Ira Weiny , Steven Price , SeongJae Park , Lorenzo Stoakes , Huang Ying , Naoya Horiguchi , Christophe Leroy , Zack Rusin , Axel Rasmussen , Anshuman Khandual , Pasha Tatashin , Miaohe Lin , Minchan Kim , Christoph Hellwig , Song Liu , Thomas Hellstrom , Russell King , "David S. Miller" , Michael Ellerman , "Aneesh Kumar K.V" , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda , Alexander Gordeev , Jann Horn , Vishal Moola , Vlastimil Babka , linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page Message-ID: References: <54cb04f-3762-987f-8294-91dafd8ebfb0@google.com> <20230628211624.531cdc58@thinkpad-T15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Wed, Jun 28, 2023 at 10:08:08PM -0700, Hugh Dickins wrote: > On Wed, 28 Jun 2023, Gerald Schaefer wrote: > > > > As discussed in the other thread, we would rather go with less complexity, > > possibly switching to an approach w/o the list and fragment re-use in the > > future. For now, as a first step in that direction, we can try with not > > adding fragments back only for pte_free_defer(). Here is an adjusted > > version of your patch, copying most of your pte_free_defer() logic and > > also description, tested with LTP and all three of your patch series applied: > > Thanks, Gerald: I don't mind abandoning my 13/12 SLAB_TYPESAFE_BY_RCU > patch (posted with fewer Cc's to the s390 list last week), and switching > to your simpler who-cares-if-we-sometimes-don't-make-maximal-use-of-page > patch. > > But I didn't get deep enough into it today to confirm it - and disappointed > that you've found it necessary to play with pt_frag_refcount in addition to > _refcount and HH bits. No real problem with that, but my instinct says it > should be simpler. Is there any reason it should be any different at all from what PPC is doing? I still think the right thing to do here is make the PPC code common (with Hugh's proposed RCU modification) and just use it in both arches.... Jason