Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp140527lqp; Sun, 9 Jun 2024 21:32:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULIz4ydN4ZdSMCwlC1CW2d83WyJMVTt4Gi/+8+lEBroEitAdtPqanGLiUbescg/VRejb3N2Jnk6ETkL9yVpgbKf/J9PuwnXgVF/x0ZvQ== X-Google-Smtp-Source: AGHT+IEl9tdaT7KytFneszawgS2RcPzaT4x+asdi+5cf+vKzUe/2bNoFW5PfyKlF71LT2HyCPRa2 X-Received: by 2002:a92:c241:0:b0:375:a48d:fda1 with SMTP id e9e14a558f8ab-375a48e0215mr23023515ab.2.1717993953400; Sun, 09 Jun 2024 21:32:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717993953; cv=pass; d=google.com; s=arc-20160816; b=VD/kfGBL1YTx5hk+qu5bUkns/WeCG6pBIeTrOi7tmb94hrFmtTvaeuyvUL+kae4zkF ZpR70BWwpG+20S5BFO8m7MA+Fl35wr5fFTYdqi8K4cuxQnqQvj84yrpU6o9yCuyjG82z NCh452CrfBAfocFPX6mMxeOUDvlpjYX/Uw+2KO4AtPDaWmnucLnvcKxCbQ+klZowSTtw Uqg+afWrecCtMGWIQtECdVTKOqjm9/2RzJjaGQKU5kDSRkP3nFojh0NLjFTVBixZrqbq NXS2sQ4zIwNmbgMQXONPzwwle9O5ZcJCt4vy8knbTA6WnWcQY0UlINhcBxQX2PjwxSyY o/Ig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=IND2MoD5+fzd4/enaZpt+uNExFlFrO8ngLetTeSMsF8=; fh=s9T9s6pMv60uAWp/Xi/9pkRVD+ON3KT88m7b8guPNgY=; b=fMNOWUF8x9qmimC6v9wlnEYbRwrLo+S4V9HtwWn19MR9T4MvCTQodfWg77NjTFi0sA Gd4UXLYahUKcHr13bkDbPCaXtNcupGi57yGMrIQbLNwiaBxe6EkYrfAkwPBYimYoipds /Ab3q9dwnDjWKBsk7hdvbGHcdw0Dj3eW+eI12pC3geSvTtYrn4qSJ2L/99nvU+aPk9WB bU6FANRcrcPKdTQlOL9n5fBO0kdA1CdEimnw5Ae7+HBUK9bGdxZ31MuUWVNE6OOOR97D /STGv6Ahk6p/8REUT6g6xSvRqITaSP8gXl1AHoAKTV93jbgo0GEDfZ7xhG8bPMoDjtIN 4PJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=z77PfkTK; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=z77PfkTK; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-207616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e5be9be7d3si4199478a12.282.2024.06.09.21.32.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 21:32:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=z77PfkTK; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=z77PfkTK; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-207616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 10351B213B3 for ; Mon, 10 Jun 2024 04:32:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 80933CA62; Mon, 10 Jun 2024 04:32:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="z77PfkTK"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="h9nOCcky"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="z77PfkTK"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="h9nOCcky" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 2689D6FB6; Mon, 10 Jun 2024 04:32:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717993939; cv=none; b=DgJvFxdTiYSQpmjn+XCnvDJHfNmwfM787zugqSMgax0UjN4PzXXaGE6PPItqFx/7Tv0cxGu0g4+KDijnMM3v3g8HqNMi/sKVCdEP2YRXbYjUa3hJcc+rGInWd3n9++XOkb/k5m6Zc53lFD7dZTiuAqcQ1MpXsPN/c5lpxUnwlmo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717993939; c=relaxed/simple; bh=sq2DGq4Des/nb/60pZroDK3wA2sOgpclexWHL4QKEl4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WgLRphUSgPBqEgT5EeldDwj3P7FpJ2864MmFE7BSAXn7S82Uf5fdlGTjIINh4azcwmtzHZq/Pjp0/9NCjZctdut/MDFs4uI+hNvrSu7xySvr0YVMBtOPgzuWWgUo4AmZa4B7ATNQYevnHtJvSNGN6hg/louCzuPA2fQSrBNX+VM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=z77PfkTK; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=h9nOCcky; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=z77PfkTK; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=h9nOCcky; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3F89321A28; Mon, 10 Jun 2024 04:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1717993935; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IND2MoD5+fzd4/enaZpt+uNExFlFrO8ngLetTeSMsF8=; b=z77PfkTKm4EluD1EW77pRW/2jHupe+DZKwP4g5DBI1lB7Ns2vZ4yZHHlG7dry/MDNboApa pbxd6gUDocDxl2/9vbwgRMcOdkcnGcE3uaC2lS4rN13Prx5i3+6l8J6mKg7rlulexG+fb/ KbTvi/KM7nmIjJbybulnIj3luewEv7I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1717993935; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IND2MoD5+fzd4/enaZpt+uNExFlFrO8ngLetTeSMsF8=; b=h9nOCckyVqEiOGqdbdzc+P0c2skzkfoHu3XOh2WdwQ47UJJekByPQZaQ7W8Yv6T8w33Iju 8OzDSb6XQJA3koDg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=z77PfkTK; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=h9nOCcky DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1717993935; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IND2MoD5+fzd4/enaZpt+uNExFlFrO8ngLetTeSMsF8=; b=z77PfkTKm4EluD1EW77pRW/2jHupe+DZKwP4g5DBI1lB7Ns2vZ4yZHHlG7dry/MDNboApa pbxd6gUDocDxl2/9vbwgRMcOdkcnGcE3uaC2lS4rN13Prx5i3+6l8J6mKg7rlulexG+fb/ KbTvi/KM7nmIjJbybulnIj3luewEv7I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1717993935; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IND2MoD5+fzd4/enaZpt+uNExFlFrO8ngLetTeSMsF8=; b=h9nOCckyVqEiOGqdbdzc+P0c2skzkfoHu3XOh2WdwQ47UJJekByPQZaQ7W8Yv6T8w33Iju 8OzDSb6XQJA3koDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id BD19413A7F; Mon, 10 Jun 2024 04:32:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id XjxOK86BZmbfGAAAD6G6ig (envelope-from ); Mon, 10 Jun 2024 04:32:14 +0000 Date: Mon, 10 Jun 2024 06:32:09 +0200 From: Oscar Salvador 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" Subject: Re: [PATCH v1 1/6] fs/proc/task_mmu: indicate PM_FILE for PMD-mapped file THP Message-ID: References: <20240607122357.115423-1-david@redhat.com> <20240607122357.115423-2-david@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240607122357.115423-2-david@redhat.com> X-Spam-Flag: NO X-Spam-Score: -4.51 X-Rspamd-Action: no action X-Rspamd-Queue-Id: 3F89321A28 X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_SEVEN(0.00)[8]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[intel.com:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:dkim,suse.de:email]; DKIM_TRACE(0.00)[suse.de:+] On Fri, Jun 07, 2024 at 02:23:52PM +0200, 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 Reviewed-by: Oscar Salvador > --- > 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 |= PM_FILE; > if (page && !migration && page_mapcount(page) == 1) > flags |= PM_MMAP_EXCLUSIVE; > > -- > 2.45.2 > > -- Oscar Salvador SUSE Labs