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 38596C77B75 for ; Fri, 21 Apr 2023 09:47:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 75D596B0071; Fri, 21 Apr 2023 05:47:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 70E8F6B0072; Fri, 21 Apr 2023 05:47:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FCB56B0074; Fri, 21 Apr 2023 05:47:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 519D76B0071 for ; Fri, 21 Apr 2023 05:47:22 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 1098AC09BD for ; Fri, 21 Apr 2023 09:47:22 +0000 (UTC) X-FDA: 80704920324.06.79FA508 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 7553B100003 for ; Fri, 21 Apr 2023 09:47:20 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="r4/lRog7"; spf=pass (imf14.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682070440; a=rsa-sha256; cv=none; b=M/aRHdsLnEn5dJ3mUyXyPNt6PTVSCngrcqAn5eilJTCX5k6qTBz09cHhg3nxa1i+5otg4K gijmuyy5Jm3uFrMqY13tER0YOJi4/bZ4SzSNyU+cw3GpMEguZ55G0tAUGNcLw/XTWN1LaA FeGtLeb1a8ve+rHzsFasyeucROm3QLA= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="r4/lRog7"; spf=pass (imf14.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682070440; h=from:from: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:dkim-signature; bh=81sgrFarPYiImBZ/frDHNsehohc+AoBFb8P8q7KyphY=; b=r2x5HZqfvfmwiqt+02l8UAUEmSHY2+50FT5QQOzsZAsK+kE3VHvUBdp/M97JgpBBIkhZK3 lwdngKhDC6cr9UW5XVM/sgL1ANEbY2MsYR4g77KT0ZQP2EFGNBXJ61bpsL+kM3ZNSlp6U3 YGElH/q0p3TAiRcrXpxLdoDrWLuoNNM= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4DE7D64EDD; Fri, 21 Apr 2023 09:47:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2AA8C433EF; Fri, 21 Apr 2023 09:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682070438; bh=fKqK+GzpChjAOILY545FjBePRbKgk2Eht2CkeE/ERgg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r4/lRog723RNM6nmx6hLlLpexpsmDHIHHd7tnPlJAXSmsZDdur6gvmTPy5tj/2pX8 bqIpyqQ0rmQHujsWcLulZKTgFA/nfRe+J1T5k5NlYokBElZxOu54RRrdjQyf/uEdVc +n2R3MEcanlf8/414r5CcWPkEdubYixBB0JLEBQoS/CknyUlgPuio8RyWVt79N9Vof Rjg6qPLdKnBPiiuLZTgF2r5AvHaGYxtum7ugm61nHM5TUkbKXzujrksWd1u0oQ3O8H K2bJHx2s0yUlNXAyDtADXKoGI45RUhluQjidEkQBHn1cVadz6zjO320aLy14LORpJL aYLEnBM7PwH/A== Date: Fri, 21 Apr 2023 12:47:06 +0300 From: Mike Rapoport To: Michal Hocko Cc: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, Dan Williams Subject: Re: [Lsf-pc] [LSF/MM/BPF TOPIC] reducing direct map fragmentation Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: X-Rspamd-Queue-Id: 7553B100003 X-Rspamd-Server: rspam01 X-Stat-Signature: hjnkmkazmbzss5hconduw9u1ginesgon X-HE-Tag: 1682070440-889104 X-HE-Meta: U2FsdGVkX1+UOvW0xz73lpkZRRgpq+NGHbDaTMMV9QsYwGTKCB9DnZc8iQwSauPk2sQg5YDZ/SsLm8QrDimQqSoaOSNcuhHqV3EV7mreXRFXrTlyy/J1/uO66rYaIiutaD9O5spx/McGuhuxonontWsinb6WpctF20KPvWI3gwqqcG8TZSg/hqKJLSaxMjbtYxMnCdx0B6q6yQcxKMRYDWDP8fWlCVYTy8zcuyJz5f6gqBX+LCjqzw3MoIUnC3AlRJGmRJgSpW/IclDIX+p1l1Y5rqdC9Ghwbu/fK1BR0oQ2L8+vP5xo2vuFJw1cKglU+ONC3BXV/iRQw06zGaGFLog3akVjBRLVRYFeoUyzf+IEUgJRL7JDj8SQJ6b/R9iIlHunqysZ6d8D09vqWYelmoJt1NzMtBQSwx2hPs/u/D/RN/3LGCDR/xvmZC/Jxoc8p0mUTY8MLM11oI04HfsVdZ/Wxgj502iiL/YQjL9xZFCrQwQterqziZOY0Sx4wQpymPdkx7ztGc3e8+kYJOPBdKEui3CK6p8+gaMgw9D1xc3W4v7w7elwcJTeEybUMiytaKVn+0ZsOKDrNNWXAvMlEdsgxHc2oREDoOx9aAJKeYMd34vEE/sXAB528fN6b5JBaiQo/qyPuaxJ/JmrAKlPeFycM0NSpBMyVdUd/ICozuiRdjrlgnDoJHpXpJrHJNddhM07mlai3FBTJZq5/aC5wPVZQX03WsYfs/wUCl2QVrQztjYZDhc4ROzsEUG6OgSZWBjqCGMmbYdHFZXMnzCcKaTmUsn8t5uvQ4KfaBTxwwRVkM+TaHXUjdbFXArUOGPZednAhX1dP8uv+FAK9+/Pu5L5pxmaHaaLtfzkAOIcP0AXkD+3envQpmCZzcBXvu2PPfhqaCo0ksfcWkpKQK03J/RspRzAdFHG+4583kjA/qLfQs2gaVi7IQW+FB/S8JGMrsTYAtroXxe2SYQf+eN ZzHZb3hU tXlM/1CuV8tZdHFPiCCsBZoG1tA0eOAyx7cUujRjZd5kMoQFwxt4Yb+30iExGHm/d5qmWLwxHuMDyYbSU4YOJ2FWs+bjEu+J1ODpcBwOxRCYD8IwAznUy8NzrhQeCsC0yZqgnM74/QfYRtzmbRrD1h5reVexvORZieWu/uz6xPxwdFu75yd8j2CLYwXuEFcegbfzJW6iQD/dKmljTDIb1UbaFlx3rnVUL6LAt6tWzN9mlPfquqzmZq6aRRx+vUzI+dyjpZlQBXAYJ9n736+Gmj1WnYBfatLL0qfN+ 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: On Fri, Apr 21, 2023 at 11:05:20AM +0200, Michal Hocko wrote: > Hi, > > On Wed 01-02-23 20:06:37, Mike Rapoport wrote: > [...] > > My current proposal is to have a cache of 2M pages close to the page > > allocator and use a GFP flag to make allocation request use that cache. On > > the free() path, the pages that are mapped at PTE level will be put into > > that cache. > > Are there stil open questions which would benefit from a discussion at > LSFMM this year? Yes, I believe. I was trying to get some numbers to see what would be the benefit of __GFP_UNMAPPED and I couldn't find a benchmark that will produce results with good signal-to-noise ratio. So while it seems that there's a general agreement on how to implement caching of 2M pages, there is still no evidence that it will be universally useful. It would be interesting to discuss the reasons for inconclusive results, and more importantly, what should be the general direction for dealing with the direct map fragmentation. As it seems now, packing code allocations into 2M pages would be an improvement, while data allocations that fragment the direct map do not impact much the overall system performance. I'll bring the mmtest results I have to begin the discussion. > -- > Michal Hocko > SUSE Labs -- Sincerely yours, Mike.