Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1043070lqt; Fri, 7 Jun 2024 06:38:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2XE3qBQl4/pPtKFM0HwNF/LDiiFAwXRqJI584p+TkPhzzp5jjaDNjsUAIKYKgMiESMYm/Y0KnesQk1PZqve86z7d8YAdPcROsQw8vig== X-Google-Smtp-Source: AGHT+IGWb/KkrkCPLdtgQ8PI6rDqBzSJnxKtAEWIaLEbwqc3Ar/3f+Vh/rvden4gnttX9r19UX7X X-Received: by 2002:a17:906:1305:b0:a68:67e4:7f06 with SMTP id a640c23a62f3a-a6cd5610885mr172320866b.10.1717767529682; Fri, 07 Jun 2024 06:38:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717767529; cv=pass; d=google.com; s=arc-20160816; b=dmgkvn/k7AyJ5eE2rTrhAQ6kdh5AZKG0jCWOaksq5ytEntLxtBigGjul3kMvwZQ2MI ROgihBdbQbjCues26YNyQCO82E64QnK0xHqBrrbefoqUvnV16dVWZ2/S8iXtz3XGN/ml kwu7YSLvzm4UBIgIu1ThxMgVVP5TvSqc5ehHrR19m9ZdmU0o1hvuwEZ/iitufx93rY+d FD1USZr1iiy3QR9ejvmbPvYM6A8bfTAxOWMIoGVzi3s2oRp0veFWGMLUSnjdlmwS5cqu fCHtdJ+OKm1YZLHEqcu6tX8oEzWfHsJmPlHAn42R2h3bqWIs2ER6yJNZrib7q7yiIGWN fSww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=OsnPTo/8GBKfAm5hQE1/ElT4VESU6abIi/S302Yoa/A=; fh=J7malWytlKxLPKXrGEh8MJ3jK5AD0uGdNpPAlJlQl6o=; b=WFj86UedtrZ+Bo1OSDgU3pIWwI2TSPl1jt2/+w2y/buB3yn2IHtmHYOaCaccmIaAh+ 9z6K98Eb4B5bEfSxBaX0GzoAIsLQO4/UePqQG05ru01v+try+d8JUgjqpS+VUDSX6hjF eydmy0w79ei+yMyxOhbaacgv9/IojBIJP/9X+qGDk3Ta+Eyn7z6wGF+00RdBg36RcKG3 rjK1h5BXWBtc/z1vgSwzHLBgwfvcINdxs8QxWhlnOiz+vzOtWl6teQUAO7r9eXqs2E7n 3SNKEybFMgg8JDWiKB3iKGKnD9LRG21rfRjbb7256vlE4jBxwUUajSQwisicTtOYz2dK l0cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="af0/R9R3"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206175-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206175-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6ef7a8c697si4785266b.116.2024.06.07.06.38.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 06:38:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206175-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="af0/R9R3"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206175-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206175-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 381AF1F22929 for ; Fri, 7 Jun 2024 13:38:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4EFD194C8E; Fri, 7 Jun 2024 13:36:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="af0/R9R3" Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 AE4C215B54A; Fri, 7 Jun 2024 13:36:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717767416; cv=none; b=U1kDyAQsOuKe10tpq65odbEUwQ027sM5vQToY8oxB5WJEpAmJXPCjMVu/DowCb9XdG1C2vJQcYqpiLmSubOs6TfoNi7j8ndiidReIcfaz/Ej5bIXkaxsIAkIbrObxqzMJlzNOhwV4JOMKcVXZuDzPluwkCqdMf35Kerr/BuSyLQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717767416; c=relaxed/simple; bh=aTqDPs2BV1TkSSf7DvtFtL1V0gHpXhKpZ4wD3WJPDVw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bF0Wguu2ifoh8AsyI8HaAtGQyaE7ignVdj/rt+b8pa1MrhA3oikaKKbM/vLaZb2pi66VCNIwJt5OOBIKcDTgJ62aNLF+AUhrwKpZ+IkRj80xJqOMcM3YbnT42A+lZAirp2Dm0IelftEn3euY/U1X8Ufw+Hjv1m9N8MXC++lpBBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=af0/R9R3; arc=none smtp.client-ip=209.85.167.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3d1ffa16080so317169b6e.2; Fri, 07 Jun 2024 06:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717767414; x=1718372214; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OsnPTo/8GBKfAm5hQE1/ElT4VESU6abIi/S302Yoa/A=; b=af0/R9R3mDpuB8ZFPLusmdPtNUss5tCutbO17vRKBa/l3Ci5m1NVBObLZt6gqlT5h/ g3JJh74JUvt6jvy1qBR1M4NG6NWlBs8wdkmLD77NmM63aslXAFGktpVsMFB8q1WKvjn4 PhkTV9jOyJIF/7n9fLXfgezzTnAiq0MFVb3JkO4lauJVhhHjZ5K+GhTx5gwSR6un/m8+ skJT/vNIjwxF0J+dr7cYMRXKHjutQ6K2UR8WakfE7JyhHi/sOZwxLZahQloAWroDF9NY nBfaEvbjFFFL1KNiU5S3CQ3llGubgVjifUh60m2FeAYXSMn6NKawP3qBKe8Zh6oHDef5 ouRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717767414; x=1718372214; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OsnPTo/8GBKfAm5hQE1/ElT4VESU6abIi/S302Yoa/A=; b=KDkhpr4HnspWu6Whpgxm6RZ9h8j3gT4nJfTWDmjnLYnfMh4bbWhFx5+LiLJs2JuEQ8 Fp9RcSeN4vpwAGAA0tzPD6rmQb48lpa1OKble4di079DX69muipdKXQzTT5TQfOwRHKM HGuaYq/jzl4urebZwovL7Cr9TArXOnFSDXg+2WZ2l3/+dwo6eYh2/v11128Xyw0Ig5+e urSlDUyfzrIrf6KXwUdga4vdd+VcCpWqZ1K0LM73R1pI22+aMPGImKKJfTXM2Ozfbhhi 4KmCkxCA9yvjHUrFcA74neAeVZjIYsEzDYuiib/NRVm2ZaXnCOwSoOIZBFLf0TpJFchs NK8w== X-Forwarded-Encrypted: i=1; AJvYcCU8ja98orwGriMUWPd9puF1UDCkPbU1NeUnO59UbzF3AOrf3gE2i7isRKZsdCkvDvdqRvACNZDGSILDVhGRypA3XCTVHNVNiSIr0MPu1mkJfRpTtix45efoU3jJNiaIOOrOSW3lmwABTg== X-Gm-Message-State: AOJu0YxJTgpTTxap7NwYyi93LDur5X94px36I1WHND2b0foyAb5djc01 k00DMd+xyVY86jrcX/vq+B8iM77bIPGKZdwDsCDpuJafnecRUFI6M95hwm17aZZ2lxDkV9KeeO9 1SpXJu4hK2bAUq3AW3Cf4HSyKz7U= X-Received: by 2002:a05:6808:21a0:b0:3c8:64b7:7814 with SMTP id 5614622812f47-3d210f98377mr2592800b6e.5.1717767413813; Fri, 07 Jun 2024 06:36:53 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240607122357.115423-1-david@redhat.com> <20240607122357.115423-2-david@redhat.com> In-Reply-To: <20240607122357.115423-2-david@redhat.com> From: Lance Yang Date: Fri, 7 Jun 2024 21:36:42 +0800 Message-ID: Subject: Re: [PATCH v1 1/6] fs/proc/task_mmu: indicate PM_FILE for PMD-mapped file THP To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton , Jonathan Corbet , "Kirill A . Shutemov" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 7, 2024 at 8:24=E2=80=AFPM David Hildenbrand = wrote: > > Looks like we never taught pagemap_pmd_range() about the existence of > PMD-mapped file THPs. Seems to date back to the times when we first added > support for non-anon THPs in the form of shmem THP. > > Fixes: 800d8c63b2e9 ("shmem: add huge pages support") > Cc: Kirill A. Shutemov > Signed-off-by: David Hildenbrand LGTM. Feel free to add: Reviewed-by: Lance Yang Thanks, Lance > --- > fs/proc/task_mmu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index 5aceb3db7565e..08465b904ced5 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -1522,6 +1522,8 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned = long addr, unsigned long end, > } > #endif > > + if (page && !PageAnon(page)) > + flags |=3D PM_FILE; > if (page && !migration && page_mapcount(page) =3D=3D 1) > flags |=3D PM_MMAP_EXCLUSIVE; > > -- > 2.45.2 > >