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 5972DC6FD18 for ; Tue, 18 Apr 2023 15:46:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232317AbjDRPp7 (ORCPT ); Tue, 18 Apr 2023 11:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229978AbjDRPp6 (ORCPT ); Tue, 18 Apr 2023 11:45:58 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B819025 for ; Tue, 18 Apr 2023 08:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681832708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=27YuiGTc/1Ayk3pIwHwifC0cK9cQSm41NYDsP6qMI7E=; b=XS1Tc/bHEi38qr7Gc25pbbTUMs2Bz3kxEqvIejB42R/jsgi8w1gzA8fDviVb6RLpAIf/Dp 6AadyyoR5boJQTtYE+YrtEXiJE1RWbwKqQfw9AjM/vnLcdE/qbmdRRN012QrvqubqgpxRx blupIuO76m0AAGCTDelh93Gq3PDVGSc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-413-M3EEYkDLNcyJjA6PlJo9pQ-1; Tue, 18 Apr 2023 11:45:07 -0400 X-MC-Unique: M3EEYkDLNcyJjA6PlJo9pQ-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f0b0c85c4fso42470575e9.0 for ; Tue, 18 Apr 2023 08:45:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681832706; x=1684424706; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=27YuiGTc/1Ayk3pIwHwifC0cK9cQSm41NYDsP6qMI7E=; b=BVvM/OeFWBs5pc7QWWZRTMvuOJN9u6XSY8y71IFmxNbFJCSsa/wdQHeCdJ2JF4oK9b R3kTWtlXyyO5Ktb9t+34Y8LkyaZ4mbWPZva0NMuz+prsa5tMgV8znp7joUWHaOIcPO4b VITM0EmX/Bp+Ig0rFW690ok4GdFM1sNtiAJwedTAcyxfSudIojhovWhTXzc20/XB0DBw nRqdIuKYyvWCMnK6AllpGNRlfjM7OGI9KC3ax6VVEPjH+NoNrLNbgLsY/uWnm/om1Cos +mXhVTg2+BPyiHmnQ0ijBPRkYZwUChiAWEbb1Sz8IUiVkuv5/bnXKiTuLT3S71bJ3rdV /Q6g== X-Gm-Message-State: AAQBX9cTuOqvlOOzAv/RI6nbvOHCbljVHbpMup148A6Mx/hHCb3Owt8q diH6VVUzZMQmfMjUZ0mXJz0TgkqzxfIG7dWV+AR+f4bWHb2DKpu1hteReQ4yHoQjeU926O2j8Vu 5Dx8/iluDfW1riemfpU0= X-Received: by 2002:a5d:6dcc:0:b0:2ef:b8ae:8791 with SMTP id d12-20020a5d6dcc000000b002efb8ae8791mr2341917wrz.10.1681832706617; Tue, 18 Apr 2023 08:45:06 -0700 (PDT) X-Google-Smtp-Source: AKy350boD2pgyaTgtT87B/OGZT/ZiXFytTcP4U4+Qx8x/yMODSTgYDG7+n20ySQtuSYJgFc2NPKTdg== X-Received: by 2002:a5d:6dcc:0:b0:2ef:b8ae:8791 with SMTP id d12-20020a5d6dcc000000b002efb8ae8791mr2341904wrz.10.1681832706235; Tue, 18 Apr 2023 08:45:06 -0700 (PDT) Received: from ?IPV6:2003:cb:c715:3f00:7545:deb6:f2f4:27ef? (p200300cbc7153f007545deb6f2f427ef.dip0.t-ipconnect.de. [2003:cb:c715:3f00:7545:deb6:f2f4:27ef]) by smtp.gmail.com with ESMTPSA id z10-20020a5d654a000000b002daeb108304sm13380984wrv.33.2023.04.18.08.45.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Apr 2023 08:45:05 -0700 (PDT) Message-ID: Date: Tue, 18 Apr 2023 17:45:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 01/33] s390: Use _pt_s390_gaddr for gmap address tracking To: "Vishal Moola (Oracle)" , Andrew Morton , Matthew Wilcox Cc: linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org References: <20230417205048.15870-1-vishal.moola@gmail.com> <20230417205048.15870-2-vishal.moola@gmail.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230417205048.15870-2-vishal.moola@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On 17.04.23 22:50, Vishal Moola (Oracle) wrote: > s390 uses page->index to keep track of page tables for the guest address > space. In an attempt to consolidate the usage of page fields in s390, > replace _pt_pad_2 with _pt_s390_gaddr to replace page->index in gmap. > > This will help with the splitting of struct ptdesc from struct page, as > well as allow s390 to use _pt_frag_refcount for fragmented page table > tracking. > > Since page->_pt_s390_gaddr aliases with mapping, ensure its set to NULL > before freeing the pages as well. > > Signed-off-by: Vishal Moola (Oracle) > --- [...] > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > index 3fc9e680f174..2616d64c0e8c 100644 > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -144,7 +144,7 @@ struct page { > struct { /* Page table pages */ > unsigned long _pt_pad_1; /* compound_head */ > pgtable_t pmd_huge_pte; /* protected by page->ptl */ > - unsigned long _pt_pad_2; /* mapping */ > + unsigned long _pt_s390_gaddr; /* mapping */ > union { > struct mm_struct *pt_mm; /* x86 pgds only */ > atomic_t pt_frag_refcount; /* powerpc */ The confusing part is, that these gmap page tables are not ordinary process page tables that we would ordinarily place into this section here. That's why they are also not allocated/freed using the typical page table constructor/destructor ... -- Thanks, David / dhildenb