Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp407356pxb; Thu, 21 Jan 2021 09:50:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwrZvVhDajCzPjexyGFPinIfDyD5Jjsd/cr2K+3PiY4yxjmETRAE4hL2wku0CFHpPQI1gs X-Received: by 2002:aa7:d4c8:: with SMTP id t8mr234008edr.199.1611251445214; Thu, 21 Jan 2021 09:50:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611251445; cv=none; d=google.com; s=arc-20160816; b=REdu1Kk/z6eYiSHSpIMqy8YYMPK8V3sKCFMmdLtqkK4GBovvKLfJjCbnHHHhTxjSKx 9Jt3L5XE3WHcffnwQFgzfigkLePYe0bV9UUVtPigELxb948xhk2lCnDSqKNi+938bvPz /lSXlW+iFFAed7/6H8eZAk6lXGo1wWbedIGz+zvrMKqe98iifiSK6plkWFPwgZqtWTLU 442M+OL7zQ/XTHNdRPQpDRqDBgO6h26ZlVWaWqBZtYNEaDMlY8gOiooloZJHikhbu2at 1u19S+gg7QjJBDdFbOWrRiwn5K0T8FKw2+tgJNZHuTQE58nuBRqKlagDprOtgQGAGfs6 5xDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ad0mxazjm7YsXdPdx/fSH1Qi+ouX8xbPpf4AgFcpbq0=; b=ucHXyRibLXIcLZqWO7MM43QZ4/XBrGmOfMhhUMWS2Y21J5hx4xhbQ0pWExxJA7VH3U nc7Ki4pG4cXBzdJPcrFdil0OgmMVesg/6j4GWDR9Gge+CPdkCrJ8Shv7bbsptWlv8MUW r5Qw6tMetPofU3XfMxu2T5RGW1IGTbzrY5nmVPsRuehfJiL6HEyuL9ZXzb2BY4vLgs0B hnawapzHmDBDngk7ZgDUbFakmQMmdACc+lh5McNRDqdVaXAgT6OFOu+g5tYx4to5PJ/O WRloZVve8/5c6C1JF2ZkZg8xby1AgX/YQJOSQJSS/i6nVyqor6nELhkoj2WaIdsbn859 qbpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NGspuxFU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j2si1971441ejb.229.2021.01.21.09.50.21; Thu, 21 Jan 2021 09:50:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NGspuxFU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732764AbhAURrm (ORCPT + 99 others); Thu, 21 Jan 2021 12:47:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:52410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389052AbhAURrD (ORCPT ); Thu, 21 Jan 2021 12:47:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6BE78207C5; Thu, 21 Jan 2021 17:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611251182; bh=MqX1kerCnT40Z0xUUgTg70OGnK4xYYiDNavID8LlQrY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NGspuxFUB31C87kP59HWiHNPgyq/YeRGDTPlXo8XWQtnyPGQgSfZBEmO69dZUZ1zS tXU+b8PaH4/ecjgOk4iL7UdtFg9GLMPwhGoBWHRkIzImvJfs8fQlUdSjdZDpBXJhAR vGEfEWujxyFISdtdYeu0d/ewV5zvrM2pD01Dqn/uLWbXa/6tST84Qd72JoQ0A1MjbH ggp8y0yeznRsAIdM5eVd8cTMTSHxgm+4Z778aHW3A5CuMmXBQx4P/OkLaHPWjaIupk xAEtdnV69D0RGFgYLwBYnu8UXTVilbn24R/dbRvrTSegnUN+maQITF9F4JAMMQdZh3 ZotB5XHRCj0YQ== Date: Thu, 21 Jan 2021 17:46:16 +0000 From: Will Deacon To: Prathu Baronia Cc: linux-kernel@vger.kernel.org, chintan.pandya@oneplus.com, Prathu Baronia , Catalin Marinas , Vincenzo Frascino , "glider@google.com" , Geert Uytterhoeven , Andrew Morton , Anshuman Khandual , Andrey Konovalov , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 0/1] mm: Optimizing hugepage zeroing in arm64 Message-ID: <20210121174616.GA22740@willie-the-truck> References: <20210121165153.17828-1-prathu.baronia@oneplus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210121165153.17828-1-prathu.baronia@oneplus.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 21, 2021 at 10:21:50PM +0530, Prathu Baronia wrote: > This patch removes the unnecessary kmap calls in the hugepage zeroing path and > improves the timing by 62%. > > I had proposed a similar change in Apr-May'20 timeframe in memory.c where I > proposed to clear out a hugepage by directly calling a memset over the whole > hugepage but got the opposition that the change was not architecturally neutral. > > Upon revisiting this now I see significant improvement by removing around 2k > barrier calls from the zeroing path. So hereby I propose an arm64 specific > definition of clear_user_highpage(). Given that barrier() is purely a thing for the compiler, wouldn't the same change yield a benefit on any other architecture without HIGHMEM? In which case, I think this sort of change belongs in the core code if it's actually worthwhile. Will