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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6F0D6C77B75 for ; Tue, 18 Apr 2023 15:46:12 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Q17Yt4qP0z3fGs for ; Wed, 19 Apr 2023 01:46:10 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=U8JMYrlg; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=U8JMYrlg; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=david@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=U8JMYrlg; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=U8JMYrlg; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 4Q17Xr6Ts6z3cBF for ; Wed, 19 Apr 2023 01:45:15 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681832711; 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=U8JMYrlgiEj994b1hrSfSqrDjhhXCK47LNEPZZlIOsQi+ZB22f0Al53zFXUWl8isy99rZY /qiEg+Isjo2jy6vWzMdVtAfsrkfsetV/WtgOJsiwFZmMyk40b0apRxF8eL5nY9q9Ll9Px2 Hb+JKTRNdIWqNkGQHQPaweFerSjxz0U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681832711; 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=U8JMYrlgiEj994b1hrSfSqrDjhhXCK47LNEPZZlIOsQi+ZB22f0Al53zFXUWl8isy99rZY /qiEg+Isjo2jy6vWzMdVtAfsrkfsetV/WtgOJsiwFZmMyk40b0apRxF8eL5nY9q9Ll9Px2 Hb+JKTRNdIWqNkGQHQPaweFerSjxz0U= 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-329-hga4X2rcOOOu-bBoYyTEjw-1; Tue, 18 Apr 2023 11:45:07 -0400 X-MC-Unique: hga4X2rcOOOu-bBoYyTEjw-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f0b0c85c4fso42470635e9.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=LcqNgiRRUe1RVLHsYyC1IgAOqVW0dRgDechVRpqMZ45rQ8M/0kiz2Qfzcqv61Ls3jl 6GqnlzlC7rqUiGyaQAplUfTkRcDP4/fPzt6Qoja02WyiZwg1V8NBKLzI3p3+vaILNFlQ quhqMX0Irs9gxCMjqfjn3T9YKCp0VHCgor9DQeTsrjO4oQ3BalUYLScgnpQYo08yqsTF z5RJAZ4ykKwyEnIPxJqKeGgGVcTokhCInWVMOvlbQ6a7oiBTE+/ceYGc/gwFjVICnGpZ eFhWpkpAtNgiEo2zYvQnr8GXGMp2RsV2+g5r70VKz2sfI4coJIFsh8LYAIyOxGeRIL47 YsNw== X-Gm-Message-State: AAQBX9fpeDObMgmDdDjn//gr50LE2lDAYt6oPWqqjRwkx7y49ijK70Bw QlmWSFE3Ixaq1Wuu3Rf/mK37EXt1fV5j9EBTjH5K8BEEV8PzVQacuFukF/98CrQz2MkoYeePtR9 NQ10m9VGq6JG6cIB74rvxwPlCrg== X-Received: by 2002:a5d:6dcc:0:b0:2ef:b8ae:8791 with SMTP id d12-20020a5d6dcc000000b002efb8ae8791mr2341929wrz.10.1681832706618; 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 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 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: linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-sh@vger.kernel.org, linux-um@lists.infradead.org, linux-mips@vger.kernel.org, linux-csky@vger.kernel.org, linux-mm@kvack.org, linux-m68k@lists.linux-m68k.org, loongarch@lists.linux.dev, sparclinux@vger.kernel.org, xen-devel@lists.xenproject.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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