Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp998013lqj; Mon, 3 Jun 2024 07:23:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXaxPIDyl40TaTrEUqihjTyD2I9zIHBPx0ig0KuzpCVrmH9kcaDRRwUUn1y2Ib/DoA08LLyShjjM+5EyYrJBJioz0jWLTxA7gO6Oo7z3A== X-Google-Smtp-Source: AGHT+IExtjMQK9BQ31YgW9zYfRxIk7uxFMlNcVZM7W/VKGFiTl83Jks/xWhQre32RlFd15E65TCQ X-Received: by 2002:a05:622a:1998:b0:43a:b207:907 with SMTP id d75a77b69052e-43ff5270fa5mr107582361cf.16.1717424584036; Mon, 03 Jun 2024 07:23:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717424584; cv=pass; d=google.com; s=arc-20160816; b=zFLT3OziYVAJUjrAexnFwwCAJCVIRzu4W2hiz7AFzQOdeR8AK2r9+05JCHiUQs36X8 VpVgCBzQ9b45MnCW44YXvMZu0cIOCN8hhF9dgcf7/MH5aMT3Fx1xa+LNmme1yTVP/mgS ktUyDhctvOuK42g5GUPOhXJdHAxSoSntkfl9HhH49W1GCLNdGqCF1QJgoHn+/gTl/xsI KUE41dNbs9nJrCN3jUZ0gbL4MAiCKXjVRkRNj1sQ4ItCDVPS7Ho3phtCPcjUNyq9VopQ TINf4I9besI1VpnpeNaIBQ2syABaTQjhX5smZZjp28lo3wkYYozR/Ny2AhbpG+ok6xB4 ve1g== 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; bh=UMPvBERLQPjIU5/i9ydiF+mg7YA0ahjPIQIB0SOC99k=; fh=cSTifENnmdw3pjG49JK/Ho0wgXmm73ZK8fYPzqAsT4A=; b=m5HqrAnJ+FDYKk7MlT7iI0o2tjejV89Ii7MreQ05BWwKWotQNTMTlbZsFPf18pw7LZ Rk5XIulGmrukoJhL0MaUnm+DHxiKMMerUKyMXw1ewq/OhzQLhywLfNUg7R9GLYtlAuAw kYlWZjjHkgGlJNb6XQJZsNDRQP4m4Yg0TxGl4QUt8Ug3gBlMiYP5myWhPRWG+bCgGnQB sclJvXHoHOw3eG6o5G3Bps2IWK6zcfaoBqPXRNglA3LxQldS9LD98w6GFYYySt1E78R1 hM6zTKFfE6nWLUFZY9wk3zjJMDXUZ+/NT/f44xS32phw3HhH49WMQ92PHpWPZMJSAJWq 8ZBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=R5fGs8Ih; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-199173-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199173-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff259e5f7si87886621cf.630.2024.06.03.07.23.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 07:23:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199173-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=R5fGs8Ih; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-199173-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199173-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1B9601C2511E for ; Mon, 3 Jun 2024 13:05:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCCF512CDA8; Mon, 3 Jun 2024 13:04:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="R5fGs8Ih" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6198382D6C for ; Mon, 3 Jun 2024 13:03:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717419838; cv=none; b=ioIdEe8l6O2T84m8WPdNAkATVZodzelnNprl4cBsUWE7d2j70OaESOgIXmQwsh+10J3Ic0e2LBMhX3FiOzXInMFtgbq8azPPA4AANlFcHuIQex5V8NtO3IBkROcyojrc7O+ViTw3/s4fk3ejD1llxAi5sZajCNPivnI6hVXcDDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717419838; c=relaxed/simple; bh=Gp2MfHdVZEu1en50q5BUnNu2k4eXlpARHLMKRHuQscM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LggGusv+1hfurksrvar6BDWl6ZGxqnFS23MNp8wP3FHhclPcRLAy6p7QL+Z8IiCIALY8cao5aCI2bnE9BzTmCeWOCj3nI7ZwL59FSx/0jsLUMq2N0zllsRkV608kv6EZL5hqlH2tXXbT20gi5t0nkL7SlwP3+fcFlzxZdWAbQ3U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=R5fGs8Ih; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=UMPvBERLQPjIU5/i9ydiF+mg7YA0ahjPIQIB0SOC99k=; b=R5fGs8IhNsEY+p5V5XpfsaHuM+ sWR/GRjtMKk0iSHLv0te9NyIn9Vm9vpLgmPD8Q3v1Uiro5kPWEryZwooKyDLtd/O6NkHHUS41mocj LWLPc1NfOHYOzJ40COgCBAsXO26ByP2feypflB7maa3U5VPRpLy7OMP9TbQiQBwKS8DUam72Nehx3 688tOeZJwBMzOqoPBGma+W2B/m1elkUz0sCLHFacP9m0jzCLR7Wkx8sC0fkDlia+WDkEn+sX+u19f C+I59OW+ZtB9UO50/xU9wOm4p1Qmrp8Gu9U7lYMgjasKjaKQ/d3wdsl1N8CtgukzqRfAn8xRtTwRV RdiXpwNg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE7Lr-0000000E7RL-3aOQ; Mon, 03 Jun 2024 13:03:51 +0000 Date: Mon, 3 Jun 2024 14:03:51 +0100 From: Matthew Wilcox To: Yajun Deng Cc: akpm@linux-foundation.org, rppt@kernel.org, hannes@cmpxchg.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: pass the pfn to set_pageblock_migratetype Message-ID: References: <20240603124100.2834-1-yajun.deng@linux.dev> 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: <20240603124100.2834-1-yajun.deng@linux.dev> On Mon, Jun 03, 2024 at 08:41:00PM +0800, Yajun Deng wrote: > It is necessary to calculate the pfn in the set_pageblock_migratetype(), > but most of the callers already have the pfn. > > To reduce the calculation, pass the pfn to set_pageblock_migratetype(). It's not exactly a hard computation though. Have you done any measurements that show this patch is an improvement?