Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp459207lqp; Tue, 11 Jun 2024 09:14:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZykN6FtGnPE9qR3iH2iwDfXTbMUb0YZh+RHzUenuAYg0mh2y1y1eENL53pUndpJ4QqpcxigRXKeQ+PCQrPix2/LoJLGtSjiMOZsIOeA== X-Google-Smtp-Source: AGHT+IH8S+LRYFL5XFuciXqbmzYTcBfjyQ6gYgl0FtDARzrCpfIchCEaEwm8kMlB8Pu0n3Mkd7Db X-Received: by 2002:a05:6a20:da85:b0:1b8:3ddc:912f with SMTP id adf61e73a8af0-1b83ddc92b9mr5270538637.25.1718122451467; Tue, 11 Jun 2024 09:14:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718122451; cv=pass; d=google.com; s=arc-20160816; b=V7ptWTAIi69P6w55b1iYZAtqeanRDep6c/xdQK5PwRZV5pjnqhtvb5HW5WnARGJcGF Ic/fZf8qft+N+eIBKhZC3WPZzEeq1YxYhj8l5ZxCmCdWCHoxCQdqfYkXYCcV7RzyO8mN mvLipQIceY2ONgTi9ColMtXm7/BqJ7pT5WBsZUZNsEl/RKcEppShFUxxnBN4eZuZHZ+A CFP8fRkRU6kVIqFo/vI25T37qUuEX7Gcu+m6S4Bc0Hwqm/jLrfs5pODjJrpPA7FyXuRL MGeYcES3FZudWsPE9yl50obQXlD59Y4/xsedNcVcGzhlHKuOixZiWIhrmg3LiGPmeAbK VfmA== 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=QcRqjLgpqIHGpe2PS9pcLZoBz6DCvNoiWXtXXWQ7gVc=; fh=gLs0KKxOeI77QmPJ+MtsP6Hfuot6mnwl/E8OyMotb40=; b=P/PZPW44fpNwv0pwW2/9eV84BSCJlQF07mZ3iLKUgGpYuPRG0DZW3XopczZgkQXTtG DN/wWei3MK4w3FmJD6fP0jyUY5oePbFBgYiTBo6vtjH4ceqOz3OCMXEtV+rTA49H+/rL Uh9+FTR+I6SllQqafm9tJGuqB0eVx2egp1rZ7+h/UwZptv3JhhpGb8Y0rWHNNBaOX8aI cjcVqZHvaQiBaKiNhIg+5siUpCAi4ugtLnewfUsXi4naBdQUivZrOJWNCtCtwbkhUFLo IZpSmc63KM9F+66Sz4iGNw38hV7LWpzvFlNjiG3TDhjJ9gPFn1FWDcNiCEAc6h0uB8rq tMXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Ft5M4dBN; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Ft5M4dBN; 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-210215-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210215-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-6f099efedc0si3823059a12.244.2024.06.11.09.14.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 09:14:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210215-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=Ft5M4dBN; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Ft5M4dBN; 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-210215-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210215-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 0D303B2273C for ; Tue, 11 Jun 2024 16:10:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D25553A8E4; Tue, 11 Jun 2024 16:10:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Ft5M4dBN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="kCckAyCp"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Ft5M4dBN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="kCckAyCp" 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 443702C694 for ; Tue, 11 Jun 2024 16:10:31 +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=1718122233; cv=none; b=n7DV/+c8WrBGpn77OdGp5TcAviyDH2leMRC5izEiNPr5ml1hZ2uYEgJQvgpMFq7PZTpHDGBg31lG6El7CQZOh9t6Xhi2P6E3t0ybYlQbsyDhRa/7KuWnRPSG7DyNFgTKffByR6tg4jZfMMdWSDdyoQsyAXppk1EseO0uaIGLSSI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718122233; c=relaxed/simple; bh=n10Q89p05VcVCvPienMPsxJTwcefWgLSnoF7hKi8fn8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QjrAlqm0YwXrNlBMIn1BgveK8VGtNMdnk/Nd6mpNzJ9KlSXKDgN8np+OxkDK4DT7dJAbnRc9u3kwwo78xe3Ix/zqC43M+ch4ahs80YEKZg7orVvWONrro5XLJJAOlQC+GVXnNELANOSa+/fCsOnj/qIj5ai+0X3chneEeRsImoI= 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=Ft5M4dBN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=kCckAyCp; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Ft5M4dBN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=kCckAyCp; 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 (unknown [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 3D8EC33897; Tue, 11 Jun 2024 16:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718122229; 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=QcRqjLgpqIHGpe2PS9pcLZoBz6DCvNoiWXtXXWQ7gVc=; b=Ft5M4dBNGECUCS9SOsUDt3DVWViAXB9GA9LLG4AosSdc4kaxThOanOro7PuC37JPxvCK8t Rw2dFRct3U4RRcNpmgZJwZmaicHozSjvYQXBLk1X85hh6+SyRYj65sZ1mbW5XAQPSjnHN3 QVAK0hrdc/15sFYQO2XTJoZp00Xp+HU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718122229; 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=QcRqjLgpqIHGpe2PS9pcLZoBz6DCvNoiWXtXXWQ7gVc=; b=kCckAyCpA8jk9AGY+z9wTUUWVKs8HhQhD2HwhBJcK+pZu4yUc2obSnQK49ebWLynPv8p8E uZj+vycl0JCCVIBw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1718122229; 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=QcRqjLgpqIHGpe2PS9pcLZoBz6DCvNoiWXtXXWQ7gVc=; b=Ft5M4dBNGECUCS9SOsUDt3DVWViAXB9GA9LLG4AosSdc4kaxThOanOro7PuC37JPxvCK8t Rw2dFRct3U4RRcNpmgZJwZmaicHozSjvYQXBLk1X85hh6+SyRYj65sZ1mbW5XAQPSjnHN3 QVAK0hrdc/15sFYQO2XTJoZp00Xp+HU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1718122229; 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=QcRqjLgpqIHGpe2PS9pcLZoBz6DCvNoiWXtXXWQ7gVc=; b=kCckAyCpA8jk9AGY+z9wTUUWVKs8HhQhD2HwhBJcK+pZu4yUc2obSnQK49ebWLynPv8p8E uZj+vycl0JCCVIBw== 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 B830B13A55; Tue, 11 Jun 2024 16:10:28 +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 O1RtKvR2aGZ3bgAAD6G6ig (envelope-from ); Tue, 11 Jun 2024 16:10:28 +0000 Date: Tue, 11 Jun 2024 18:10:27 +0200 From: Oscar Salvador To: Peter Xu Cc: Christophe Leroy , Andrew Morton , Jason Gunthorpe , Michael Ellerman , Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v5 02/18] mm: Define __pte_leaf_size() to also take a PMD entry Message-ID: References: <172b11c93e0de7a84937af2da9f80bd17c56b8c9.1717955558.git.christophe.leroy@csgroup.eu> 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: X-Spamd-Result: default: False [-8.30 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[csgroup.eu,linux-foundation.org,nvidia.com,ellerman.id.au,gmail.com,vger.kernel.org,kvack.org,lists.ozlabs.org]; RCVD_TLS_ALL(0.00)[]; MISSING_XM_UA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_SEVEN(0.00)[9]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo] X-Spam-Flag: NO X-Spam-Score: -8.30 X-Spam-Level: On Tue, Jun 11, 2024 at 11:20:01AM -0400, Peter Xu wrote: > On Tue, Jun 11, 2024 at 05:08:45PM +0200, Oscar Salvador wrote: > > The problem is that we do not have spare bits for 8xx to mark these ptes > > as cont-ptes or mark them pte as 8MB, so I do not see a clear path on how > > we could remove huge_ptep_get for 8xx. > > Right, I remember I thought about this too when I initially looked at one > previous version of the series, I didn't come up yet with a good solution, > but I guess we probably need to get rid of hugepd first anyway. We may > somehow still need to identify this is a 8M large leaf, and I guess this is > again the only special case where contpte can go over >1 pmds. Yes, we definitely need first to get rid of hugepd, which is a huge step, and one step closer to our goal, but at some point we will have to see what can we do about 8MB cont-ptes for 8xx and how to mark them, so ptep_get can work the same way as e.g: arm64 (ptep_get->contpte_ptep_get). @Christophe: Can you think of a way to flag those ptes? (e.g: a combination of bits etc) > I'll leave this to Christophe, but IIUC thp is only PMD_ORDER sized, so > shouldn't apply to the 8MB pages. That might be it, yes. -- Oscar Salvador SUSE Labs