Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp30869lqe; Tue, 26 Mar 2024 19:12:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVUTxVX4E9hsGtlw4IMd6xKX7oHdvuzhWgc5C6TJ6adaw46i3Vic+ScdbhzLi1jsyKYRQ3uvPlZDRIgc9kRBCA0mfFa1eqIPE14g8l0qw== X-Google-Smtp-Source: AGHT+IGAH+uwKvHIaiBqnBVda+GvjJapaLaj+ozATohiKowaAjBWuKO5RQDetDO4mmt4rdSci4f/ X-Received: by 2002:a50:d789:0:b0:56b:d1c2:9b42 with SMTP id w9-20020a50d789000000b0056bd1c29b42mr1292295edi.29.1711505538117; Tue, 26 Mar 2024 19:12:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711505538; cv=pass; d=google.com; s=arc-20160816; b=A67cgkUl6HA2XfGAruA5k1jlfGxeexKP5udbb94oSApS4Gc/UjcsnvpUq4ERT32Z1Q UtPUFwpAI/X2/kmUoEI/qz74RUCEubd8x7DOHyiWxHSy8CGBIFyHAw+Hx5xn5wNGtDJn Z1s4K5dKI4FiutoclCRaXeDm7m2ANvimRXgaJjcUihUf8+Feo5//0Yjd5xVQGjgBQWD9 OiMLDnWWe90lZzF36OtpZLR5sxoVIuwN6tSyx/xZQ18EnOBgmASNOUcI0HvMzxONsidk A9z5UsS79SUN1tY0zYhhBbgb4yrPaV7dkdFi9vrmY6g+yBTL1mbMDEL6Bno7rCpm2LBM dP1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=uwUOUJFev6SeeJTav481VchkFk0enH4AA6PGxDjAHGs=; fh=N/6XC2aH7IGT/XNCHe+Bq9L7/8YPRDVjneg9Yq0v+e0=; b=wUbOerh9RR2w75EqAbDv6zBaI9mBjZgu77lCZ+gnpMQ2546MZ2uS7+MnldeIVUK2sJ YwzwSz47azOhHYTP/hJ0AwcbqeC+IWppn56kK/EUwBQdQacSAIJZQg0rUPJbkC0F9gUL y4CGAuPSfwcN4xLKchTYzr8X1eLD2Ebr+Dv8BQPX8zHr5o9zMDXiSplSSC1Pmh2dx0Na JywCH1kxeLIha6Bd5WdLmT+RrgTP68PCG/CLUfw5VU0Jo/jja0SXYlWyERsrjbSQXa+b U9pAaqbxhMFVgNViO4PkSgcaZWGBUHMv92g/Q//G5DHYDb2fKoIEZSCtzwkesjUy0HAK iXyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Kftvu67U; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-120203-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120203-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n14-20020a05640205ce00b00568addc2a5asi4325371edx.212.2024.03.26.19.12.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 19:12:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120203-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Kftvu67U; arc=pass (i=1 spf=pass spfdomain=bytedance.com dkim=pass dkdomain=bytedance.com dmarc=pass fromdomain=bytedance.com); spf=pass (google.com: domain of linux-kernel+bounces-120203-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120203-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 90D331F3D947 for ; Wed, 27 Mar 2024 02:06:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFE122232B; Wed, 27 Mar 2024 02:06:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="Kftvu67U" Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F741219E4 for ; Wed, 27 Mar 2024 02:06:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711505175; cv=none; b=Zh/a3uiJCjDwb5WLdOQ52TBpC7Map5XjD8t20en/YorkpOvbXja8JCVLSOP8yNmCDZlZUruNijq2qDQi2aVMUKBXBHGnb/1HBOVif8rykTpbVOkmWM179pA107k9jgErWvAgftNHLjm4vruRcfdt88HnNbCElHrK0y9lWD9uDV4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711505175; c=relaxed/simple; bh=i9TQlwS4jHXsBaCog0XSG78A4Gp0vefPX1kFJMw18KI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eTsIc4Ln+ZLQOWXa3KqfYifd7ywDKzZ5rut+mT3QKBkOjVRYndW0y3oY4bHZlfJ49JbXpwP2ITjK0BJ51NpUSLuvOyZlWSNuB6sz4KaZEceFRzOH/9Oi+08GerMOvVcay6T9jsPZprCqR6fbuUC0FNkWvbuQJnr0gKv+TOFwpdQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=Kftvu67U; arc=none smtp.client-ip=209.85.215.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-5d862e8b163so1316942a12.1 for ; Tue, 26 Mar 2024 19:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1711505173; x=1712109973; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=uwUOUJFev6SeeJTav481VchkFk0enH4AA6PGxDjAHGs=; b=Kftvu67UI9npnD99ZX/Mh4LtelUsJoh9yClU5hJL+jy7ezcHGbDUeao7e6X3tn/jso ephFbNpvmEUjvxvg+5tsdqWR34SJwrLAgZQVTpihlWX8GG2N0Chkx/reggmBIS4jhWeo A7EBa0r2Bbl4kCmNOOF1/MSeHWuH+uUrGl48sKZjxCHorUy60I2qJj9KLBOHbFC7gdCY k08s3yq+Zt5et3dd8R6zHM0AhFwXtZlC9O+ctxx9xr4TuRw2OiNnodyJGc238dbxAJcx 0YRqQyLPa5v8tr2ZBJusnRk36+0J5vYUPAYWvrZRB97tNP4Wm8C/dD4/+DR/lzGAZBbs 9vOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711505173; x=1712109973; h=content-transfer-encoding:in-reply-to: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=uwUOUJFev6SeeJTav481VchkFk0enH4AA6PGxDjAHGs=; b=C7yRCTuxwSpSRQj3XBpX0GEe0CnizmbhSsn2VnGK0aloZ3Wib4AosooZRfVKjBrdNW LBV1rIr0fkIf9DA7oJ0Pmpuc3H8PArOfblmlhhZdOBUF7RSncmVYaNpfp8S91Cuu6biC QUflmoK9Lj82GaN2LzHMQdFABOJ5+v5VCgHZUsfgHD4b5XqUHYaJxFYuI71OCjRkLWmV SG2ZTOVaqCGCfmZ/f9qaqFv3qHWCrbWA7L9PdeYHbcsNYNW5tjC7HcOmB0RD/QzNHhgd YunnlRsv4Uv2bkG8ZfdrfHMJCarIF6D4ED3B9dZK8H+rOTd3tD5/t7TT3Peqw27Jxgvs OxiQ== X-Forwarded-Encrypted: i=1; AJvYcCW6cNkElkSvrpIFx2kIGVL/7c4JajKkLncDU0uW958TtX3sZAtHYqGKLpWVLeFY9xjdIL0PG1dZx4T2rynYJ6o2NA+gwdQsycx1VEif X-Gm-Message-State: AOJu0YzUktz+XGHRaQvsS13HQEgFi6nzAVAQRpY2zhKHz1lBIdE13Zd6 Egbmeqg+GB8bNQC2kQ72nbN6zCaPOKAcs44tXVi0sY9L6C6+Hzd3eyAQALyzzCw= X-Received: by 2002:a05:6a20:7fa6:b0:1a3:b00a:7921 with SMTP id d38-20020a056a207fa600b001a3b00a7921mr15025519pzj.5.1711505173271; Tue, 26 Mar 2024 19:06:13 -0700 (PDT) Received: from [10.254.105.249] ([139.177.225.230]) by smtp.gmail.com with ESMTPSA id ld8-20020a170902fac800b001e009717560sm7618786plb.232.2024.03.26.19.06.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Mar 2024 19:06:12 -0700 (PDT) Message-ID: Date: Wed, 27 Mar 2024 10:06:06 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] mm: pgtable: add missing pt_index to struct ptdesc Content-Language: en-US To: Vishal Moola Cc: akpm@linux-foundation.org, hughd@google.com, david@redhat.com, rppt@kernel.org, willy@infradead.org, muchun.song@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <283624c2af45fb2090b41a6b1b5481bb0a45bad7.1709541697.git.zhengqi.arch@bytedance.com> From: Qi Zheng In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/3/27 03:25, Vishal Moola wrote: > On Mon, Mar 04, 2024 at 07:07:19PM +0800, Qi Zheng wrote: >> In s390, the page->index field is used for gmap (see gmap_shadow_pgt()), >> so add the corresponding pt_index to struct ptdesc and add a comment to >> clarify this. > > Yes s390 gmap 'uses' page->index, but not for the purpose page->index is > supposed to hold. It's alright to have a variable here, but I'd rather > see it named something more appropriate to the purporse it serves. Make sense. > > You can take look at this patch from v5 of my ptdesc conversion series > for more info: > https://lore.kernel.org/linux-mm/20230622205745.79707-3-vishal.moola@gmail.com/ Oh, but it seems that this patch has not been merged? > >> Signed-off-by: Qi Zheng >> --- >> include/linux/mm_types.h | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h >> index 5ea77969daae..5240bd7bca33 100644 >> --- a/include/linux/mm_types.h >> +++ b/include/linux/mm_types.h >> @@ -425,6 +425,7 @@ FOLIO_MATCH(compound_head, _head_2a); >> * @_pt_pad_1: Padding that aliases with page's compound head. >> * @pmd_huge_pte: Protected by ptdesc->ptl, used for THPs. >> * @__page_mapping: Aliases with page->mapping. Unused for page tables. >> + * @pt_index: Used for s390 gmap. >> * @pt_mm: Used for x86 pgds. >> * @pt_frag_refcount: For fragmented page table tracking. Powerpc only. >> * @_pt_pad_2: Padding to ensure proper alignment. >> @@ -450,6 +451,7 @@ struct ptdesc { >> unsigned long __page_mapping; >> >> union { >> + pgoff_t pt_index; >> struct mm_struct *pt_mm; >> atomic_t pt_frag_refcount; >> }; >> @@ -475,6 +477,7 @@ TABLE_MATCH(flags, __page_flags); >> TABLE_MATCH(compound_head, pt_list); >> TABLE_MATCH(compound_head, _pt_pad_1); >> TABLE_MATCH(mapping, __page_mapping); >> +TABLE_MATCH(index, pt_index); >> TABLE_MATCH(rcu_head, pt_rcu_head); >> TABLE_MATCH(page_type, __page_type); >> TABLE_MATCH(_refcount, __page_refcount); >> -- >> 2.30.2 >>