From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6BA1C00140 for ; Tue, 9 Aug 2022 00:59:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 28B3E8E0001; Mon, 8 Aug 2022 20:59:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 23A606B0072; Mon, 8 Aug 2022 20:59:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 128D98E0001; Mon, 8 Aug 2022 20:59:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 03AC66B0071 for ; Mon, 8 Aug 2022 20:59:21 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id C77C61201FF for ; Tue, 9 Aug 2022 00:59:20 +0000 (UTC) X-FDA: 79778245680.12.90E3668 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by imf15.hostedemail.com (Postfix) with ESMTP id 49A8CA0162 for ; Tue, 9 Aug 2022 00:59:20 +0000 (UTC) Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oLDaN-0002nz-Ex; Mon, 08 Aug 2022 20:59:07 -0400 Message-ID: Subject: Re: [PATCH] mm: align larger anonymous mappings on THP boundaries From: Rik van Riel To: Andrew Morton Cc: linux-mm@kvack.org, kernel-team@fb.com, Matthew Wilcox Date: Mon, 08 Aug 2022 20:59:06 -0400 In-Reply-To: <20220808150931.49e9940bfc350227fc63b420@linux-foundation.org> References: <20220808164658.5079a9a0@imladris.surriel.com> <20220808150931.49e9940bfc350227fc63b420@linux-foundation.org> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-rNuzObzlkbPi2l5oFygM" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660006760; a=rsa-sha256; cv=none; b=v56P2chdCPL3hd4xmBGuBgnGQRikSSF4YPI4JYRxgl4d1Q++Nqf5vxUkdoaj2ScdRjM/sT EKLyARai3ELD09XDAJ6Xn4WbOBu/r67dtYrFX4UXBf2qtIzvYvRUEZejZix0oyR+v9dJmG o/v6fs6gVGW/DjOTPie89L0XxX2lY80= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; spf=none (imf15.hostedemail.com: domain of riel@shelob.surriel.com has no SPF policy when checking 96.67.55.147) smtp.mailfrom=riel@shelob.surriel.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660006760; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9ewhy/j1Tya/mhoksux1HRVMemV2spaCcYn7cCQDMOI=; b=4GeaesG7oAaIrFB3oxs1SYKxQuYMjKrhTKQ4oJ1t9s6RL7ifqrwXivyu3LJ9Nb/Y1ig1bH dn26PiTehksmMfuC7NZe4AhOngnUfGGmf5phypcHTWalhuf5hGFHnC4Z0bwn8N/PynUBOa a0aILm7aiFapQh5p8VBe+0HEjyZBBF4= X-Rspamd-Server: rspam06 X-Rspam-User: X-Stat-Signature: 8zru6fwu1ckfa1synahrbws4rw1gc8y4 X-Rspamd-Queue-Id: 49A8CA0162 Authentication-Results: imf15.hostedemail.com; dkim=none; spf=none (imf15.hostedemail.com: domain of riel@shelob.surriel.com has no SPF policy when checking 96.67.55.147) smtp.mailfrom=riel@shelob.surriel.com; dmarc=none X-HE-Tag: 1660006760-163636 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --=-rNuzObzlkbPi2l5oFygM Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2022-08-08 at 15:09 -0700, Andrew Morton wrote: > On Mon, 8 Aug 2022 16:46:58 -0400 Rik van Riel > wrote: >=20 > > Align larger anonymous memory mappings on THP boundaries by > > going through thp_get_unmapped_area if THPs are enabled for > > the current process. > >=20 > > With this patch, larger anonymous mappings are now THP aligned > > when checking in /proc/PID/maps, but only when THP is enabled > > for that process. > >=20 >=20 > What are the runtime effects of this change? The runtime effect is that when a malloc library allocates an arena that is a multiple of 2MB in size, the entire arena can be mapped using THPs, resulting in a lower TLB miss rate. --=20 All Rights Reversed. --=-rNuzObzlkbPi2l5oFygM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmLxsVoACgkQznnekoTE 3oOg5Af+JEZKWFLjMr+ankyWQSFzk0dRAYu6GeoFvr3axjFYMcxzGuU27xJoQ7vN tSX63VGZr1Dx3cEy/OCx6UTU/UQmZcJxMVXrJRMOgjxmxZh6Sia3kgswhQpEqztl LtOwyJGmmNNpyJAdRSVkdTvU6ZYFXHzcSvbVCYe5VoTQwEJW+Ft+XGCXmqJZPgJ2 Q+8GOAjjqHLEvY9ied5QCdCku85WfwxualJ6qhDzk3/amfzzvkujDK1JSnBBFSzD y8aAKofdkoFa50W3ACXZTasP+InbBrdwf5Nwz2Fq1STKe6z/Rw5+l2jwPt5Qvahj 6+nxoqu45IIf/v4u9H/PsUBuMY9hog== =PxAg -----END PGP SIGNATURE----- --=-rNuzObzlkbPi2l5oFygM--