From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4A48427FB05 for ; Fri, 20 Mar 2026 02:42:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773974552; cv=none; b=lnDcTeizP8QssjF92DMjUAT1cc1v9B6Fyv+dsIV/76CmvSrtS6Mq4Ker5uIaA1yb5RI+qH6RVn1baOgtSFtKtlpyKZ++MpidI3/L3tEh4Tv8WvrqnaKtE7KQKUPxvDJcimIwG7BmtF43lYCRwy6ylnJPlWDkggG2ViL8tyzz8fE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773974552; c=relaxed/simple; bh=TPIt0aBis5cE3gzpZl873T22Zi6MPYtEfWcqQG62h/Y=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=iFiQLxN6RGXIJ1fkrYqAKfp+dwp0FaOmonVKflGMuDUkqepHb5snSDO0Wwj3t2VXSn57Wm4Xv/m7Uq/RFQAAY0T8j4rXcQNijFMyL00Wjbhu2mZbSCZBvM+9aM4T4iMflyvveeSei16fxNKMML8KlmLESwNsnaJPp2YbHK1ibWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=gq9Vbett; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="gq9Vbett" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D7E9C19424; Fri, 20 Mar 2026 02:42:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1773974551; bh=TPIt0aBis5cE3gzpZl873T22Zi6MPYtEfWcqQG62h/Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gq9VbettmW669rLbKhI6xVzxAXrqyhqG8+pPvC3SVi6fErJoOx4XECHd/ombAZSf+ w38Tm7avGJ7B+waRV1PB/tmEn07Imr9l1cZ1WNg82515XZYnon8tMUi2/X4F3oLI2f I6xlfrCF76XfagoIaNAyKBKJSuhCqJeQOppP58SQ= Date: Thu, 19 Mar 2026 19:42:30 -0700 From: Andrew Morton To: Pedro Falcato Cc: "Liam R. Howlett" , Lorenzo Stoakes , Vlastimil Babka , Jann Horn , David Hildenbrand , Dev Jain , Luke Yang , jhladky@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] mm/mprotect: micro-optimization work Message-Id: <20260319194230.bc660ec7c99b5d0e9ac9e902@linux-foundation.org> In-Reply-To: <20260319183108.1105090-1-pfalcato@suse.de> References: <20260319183108.1105090-1-pfalcato@suse.de> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Thu, 19 Mar 2026 18:31:04 +0000 Pedro Falcato wrote: > After a long session of performance-cat herding, here's the first version > I am relatively ok with. > > Micro-optimize the change_protection functionality and the > change_pte_range() routine. This set of functions works in an incredibly > tight loop, and even small inefficiencies are incredibly evident when spun > hundreds, thousands or hundreds of thousands of times. AI review has questions: https://sashiko.dev/#/patchset/20260319183108.1105090-1-pfalcato%40suse.de