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 A6700C77B75 for ; Fri, 21 Apr 2023 12:41:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 40FCA6B0071; Fri, 21 Apr 2023 08:41:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BF0A6B0072; Fri, 21 Apr 2023 08:41:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 286CE6B0074; Fri, 21 Apr 2023 08:41:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 169BC6B0071 for ; Fri, 21 Apr 2023 08:41:54 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E193780377 for ; Fri, 21 Apr 2023 12:41:53 +0000 (UTC) X-FDA: 80705360106.27.6EB7ED4 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf18.hostedemail.com (Postfix) with ESMTP id F3BE21C000D for ; Fri, 21 Apr 2023 12:41:51 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=oy6SfmEE; spf=pass (imf18.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682080912; 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=6FALasuRwzLOUODu8sYAmn2sYoUU+U5uaMsB0mfZr9M=; b=6fdYGb7MnFKIvYeP/xmPgJvhmT9Cfdn440WheSkQdqi3+ur1boZS8+DR19e3qrnEjBmihY O+CQsELHvMDWhX1De2oh4dvIgt7M5hblGFY5T+s3DwR2h1MTpERu+TzQXn383TK1fJuFtL DsyHj1vL2Sp65xUhuZ1DpNk3MRVT9gw= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=oy6SfmEE; spf=pass (imf18.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682080912; a=rsa-sha256; cv=none; b=XH1tuhF2vMCYboCSQ2i0xs/YaAXOqlyUlmrIG9R47mC41vEAH3wt/7IosH5njtnw7oUBOC FDpfIQ6wQu2SIBYguMLX/6V+5e+bZECV+iCfshKASs0XFnG/qn3XkYLTGYQXskcfIQdUST IkgdFT9RnPfus/q5ttOzbnKRKdOVT1c= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8DB7B1FDE5; Fri, 21 Apr 2023 12:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1682080910; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6FALasuRwzLOUODu8sYAmn2sYoUU+U5uaMsB0mfZr9M=; b=oy6SfmEEfYSIzpu8CnFnYVBgxqSiS4ApEpjqc1ZMwU0wB4CBq/UV5K5ShVJGUxt7/TfzIt c8KXiNh7UJvKO3IBpflDSTX5CzLXguoqwBMVjhmgGUWtQqci3reBhjkjaPqaJ99vPspLiV QYLyEC1+sf3razBI4oAk+otlcs9tne4= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5C10D1390E; Fri, 21 Apr 2023 12:41:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6SAOFI6EQmTEPgAAMHmgww (envelope-from ); Fri, 21 Apr 2023 12:41:50 +0000 Date: Fri, 21 Apr 2023 14:41:49 +0200 From: Michal Hocko To: Mike Rapoport 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-Server: rspam04 X-Rspamd-Queue-Id: F3BE21C000D X-Stat-Signature: 5o5u45w3nxo3t5j1cbidjhzj4q7ff9o9 X-HE-Tag: 1682080911-294555 X-HE-Meta: U2FsdGVkX19zp7Wg+XZmheRqprsmxfWW6BQEbgvsX0EKNnA70kHqQftITXw1JWUa5Z/hO3UTaVpWIIyfFEVsa1taBM4fnOEFpIilYLPCSKLhmZoEIs8oleZAFAWP2X4AocVrh7NzzlCa8cHi9Wgn0ihhwT7YH3ZxOi6D9XgjX3PzZX9WnsgAlaeP4TT+J0NZt4Rmjk0QmmpInIHzLnprgv9x468lb3EAny6lztJZAK5uWUccLy8qbXoo9v68wKA8PugDRf8UROm0xKYZioaIcWru7oJ+Hs7+bPhbOw9QO44e2OwhijF8iK1m3FUA+tg+A2si8fLjxN9oZb4fpQxceKLP5A3so1T5+FOxSHslBmVRKryqVpeOm34qITqW3mnNDTW/8qQkCeKXS5Hg6nmJ+oFKoCEhqKhx6/c30I1CUcAokPM2u3ZixsefCs8NeOlBWUAdYUtNFbWGhnkyOEkURkMKM1kWBkMzMlOmtVgKbWI2Nwlbf2lQxSRAz/LsocNlPTs7eOla841XO8ZjvORK3sOvBqZbBQxD9Lg/1OBmywgPmoh5bSthF35OhNWsLOVJEsi2Ru8EPjdwjbDnD8NTRI2pAuU9ZpDRqTj6QG0bN6xn5sliVlMeLEiqaf1O2mchGIJL+Q4//pqKT8MtbcEtcB/UHzFEL/XWPE37v6r/HMhflOObOdHr++6zH/REwG4hc0V9hlTi8NutzC4++hUn8hGhRkF5op30kd2td9Q3frAeHtvLr3aW7LXvffDjbEx63m1FktZfj0FDApqOEwy+B7666O9orcdrWsmGPcJN4jo+yn3ERFPM1XxcPgA+5MI4rJ5vHFB1GYBBuiRvFS9fQ7kvvJ4oyqIzOrn42E/Qd264s6k1QafI2r992uPVHMswNQuRxQdDziV6Ztg5fVSTvV7RP0aiIbLthwtY5qzdHNW9EckrxDBb/yiWPiN97PeH2cJlUAloM9HZqs3y/W3 aaLGBg0q WTdUcx/9RVgwWnWbtcYQjkHW5nyAltxAbs80BCwdBboamihmoM1Ggllt8qCaxQa8d5NqsODsbKSDW1IhBMzP6rUeiUgM2T/VjbumzdBEq0m4RO+Cc49NGqNL2JwJpkbczCm5gHIWHOJ9l/9QMiPXLnBaXgA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri 21-04-23 12:47:06, Mike Rapoport wrote: > 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. Makes sense. Thanks! -- Michal Hocko SUSE Labs