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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E9D0EB64D9 for ; Thu, 29 Jun 2023 15:22:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232586AbjF2PWb (ORCPT ); Thu, 29 Jun 2023 11:22:31 -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-Google-Smtp-Source: ACHHUZ49j4zxCkMnm+oSSx+2qlaiByXDG1BTDACn1CIjXnwSTZE7XCbDUFEFLrSlPKTofnqYvOeuSg== 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: 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