Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1310060lqb; Thu, 30 May 2024 06:52:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxOSPjvx4AQUafAV6Q39M1PZRS2GpzVkUQv85ZWeW70nbK0kC8e44yjn0jSK/E6fDss84NK7DhFAdadWvgf4lBwViZwPckKSwxkmOFFg== X-Google-Smtp-Source: AGHT+IHhmPdb6b4amDot7t7K/kLgS5R63/FK0INCzSjCoVZzeSEZebo8Sy5uIqlmeo6k7lU8WI7t X-Received: by 2002:a05:6a20:12d5:b0:1af:9edd:9cb3 with SMTP id adf61e73a8af0-1b2645bf0b1mr2559072637.17.1717077142364; Thu, 30 May 2024 06:52:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717077142; cv=pass; d=google.com; s=arc-20160816; b=pvUTX43Pm/9JY0MQ7IZ9YlJLt1uNDRsL3kQEWBT7mu/QcfMbv7mCvBZ48BI6w3AaO9 ymtc9RhhuECbJgof8qdgTAFJ5BbWrzgP8zsVQq6caRbpfX5wf/bplB2Uov5MBWLLATpz obhbKYIrLrfRxWjrlsnOEBY4Flmm2Uf9y4/L4fMrr0pQRePAdDkn9AIaG+g9Q18i3yGJ 3tPSeX5bzmFuc/sIYMJcUA1EvDn7Uk6asj8PNLsiSjEk1Z9Y1BVLMUFEbjee+VNsgFTW 4ojbfrsd79WaeUWjx5m4LxD41hliesvkRQL+hMx68d9Mbw5N5UbsKjwzMIR/CNreNShG oONQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=5J5ytoOnRmdbW4ewNk37oM5DW7MYdNtsw1vUpRPqPSs=; fh=ufFJ+MVsO2vhJpUCh8hqj0MHf6NNABK+8diy4eULfAo=; b=LfJQ590tcOCmci6/OwufIXBzkdZNQalO+Ms2ndyQZUT68eNvDXaK3wHC22LhhceTdH 3ZV5zg1yPpnJnqfP4N/4+v/YSfNArV0ctpO41LP/PjiVeyOe4RSq7QCBzZuttGc/gePO 68b2choyrKhzJkWsiWEYkJlbc1lJWr+ulpSy8a1I5OfryzzfCKl06I3pH897tOpTddUS Rc9lCsKd67keAu52mzOorn9IKHSQzvk2ziaNonzI4YuY5DMGB8iSXSPg4G327bQSRfd6 de4J2ASGMmuB2E0HDXGpeNtK10XoLoxrjWza+JvtN9OBgnbXW/vfunLGrYKY1tkPRZQl oDOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GJcaCSCf; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195462-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195462-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6bfe0182628si722780a12.413.2024.05.30.06.52.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 06:52:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195462-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GJcaCSCf; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-195462-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195462-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 15CEEB21F8A for ; Thu, 30 May 2024 13:52:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8269186E55; Thu, 30 May 2024 13:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GJcaCSCf" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 06186186E4F for ; Thu, 30 May 2024 13:50:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717077053; cv=none; b=pdOsCy6P/Edd7QPG1b6vGMseKdv5Fd+Jl6ejLQ/16ESGFC2MVttINvs9d3PFzOtWvzKSt4FijaDi3834bVnNd9Y37WvZ/FHAL3jGc0rhj4p8A5CTIxc94UVcjCpU9Am86AHBzvc6qhv56NQlbD6GRi6lSwcK24F7T/1eFan+6VA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717077053; c=relaxed/simple; bh=KgyvEHbIGvssi6wa/01jqr/+mopRD7sfcZW3OdAMwmY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Jibc/d4KeodEWn3txQBC9EGd09qPuliRYywBB+lRd5Vf+TP22LNEG3exttbYxGrKuaZljDg/SJzCFZ9QH+xhlf0y5nxK4WahFWT0DAKnjlFicJaRXmXyISCNEl/sMsk9IRDl2XTK0mfCgOwG1Apyzt1FmbN71JgqHide9sY9R5E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=GJcaCSCf; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717077051; x=1748613051; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=KgyvEHbIGvssi6wa/01jqr/+mopRD7sfcZW3OdAMwmY=; b=GJcaCSCfIk+SX29fCJxhyDk2MHxJcDypnm3q4TMpRQ+Zswb1Vjm7W7UP GVwUNwuv5GprBcZ6L24NMvTZ/Gve7t0xedAH1c2hHE3TCOL3y2NGkJK7u mk4HxsACBOQtLy2xPThB7cWTLUW5GF8knabM0rYG0tr9AXC00hzTs3zEm 4ihb1vZsSZHuhZzqCUKA26p4AjiIw/xj6I19R/yqdFFKm3HYfR39+D1ST PRNYl9dYm9kTbTlSs4Bx6o1+Kqk/3O0PL3mNsBd5UvMMZBJq/gGBmJy1+ 6tJ9RJveYvErIuAOlJSw4dpnWeSqEFGaZvO8MIWJtL8jbjPqx6r/7NJaV Q==; X-CSE-ConnectionGUID: +OdYyag0TdaWvJb55CoNOg== X-CSE-MsgGUID: 7Q3iBOKuRva20HAIXyIllw== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="24173148" X-IronPort-AV: E=Sophos;i="6.08,201,1712646000"; d="scan'208";a="24173148" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 06:50:49 -0700 X-CSE-ConnectionGUID: z41EsDgCR8uiPNQaCCb33g== X-CSE-MsgGUID: e0kVWSzwQe+g0OS56Halmw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,201,1712646000"; d="scan'208";a="66676010" Received: from kinlongk-desk.amr.corp.intel.com (HELO [10.125.111.178]) ([10.125.111.178]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 06:50:49 -0700 Message-ID: <2a0f8cc9-a061-45cd-81df-b65d4b454b77@intel.com> Date: Thu, 30 May 2024 06:50:48 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v10 00/12] LUF(Lazy Unmap Flush) reducing tlb numbers over 90% To: Byungchul Park , "Huang, Ying" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel_team@skhynix.com, akpm@linux-foundation.org, vernhao@tencent.com, mgorman@techsingularity.net, hughd@google.com, willy@infradead.org, david@redhat.com, peterz@infradead.org, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, rjgolo@gmail.com References: <982317c0-7faa-45f0-82a1-29978c3c9f4d@intel.com> <20240527015732.GA61604@system.software.com> <8734q46jc8.fsf@yhuang6-desk2.ccr.corp.intel.com> <44e4f2fd-e76e-445d-b618-17a6ec692812@intel.com> <20240529050046.GB20307@system.software.com> <961f9533-1e0c-416c-b6b0-d46b97127de2@intel.com> <20240530005026.GA47476@system.software.com> <87a5k814tq.fsf@yhuang6-desk2.ccr.corp.intel.com> <20240530071847.GA15344@system.software.com> <871q5j1zdf.fsf@yhuang6-desk2.ccr.corp.intel.com> <20240530084120.GA12940@system.software.com> From: Dave Hansen Content-Language: en-US Autocrypt: addr=dave.hansen@intel.com; keydata= xsFNBE6HMP0BEADIMA3XYkQfF3dwHlj58Yjsc4E5y5G67cfbt8dvaUq2fx1lR0K9h1bOI6fC oAiUXvGAOxPDsB/P6UEOISPpLl5IuYsSwAeZGkdQ5g6m1xq7AlDJQZddhr/1DC/nMVa/2BoY 2UnKuZuSBu7lgOE193+7Uks3416N2hTkyKUSNkduyoZ9F5twiBhxPJwPtn/wnch6n5RsoXsb ygOEDxLEsSk/7eyFycjE+btUtAWZtx+HseyaGfqkZK0Z9bT1lsaHecmB203xShwCPT49Blxz VOab8668QpaEOdLGhtvrVYVK7x4skyT3nGWcgDCl5/Vp3TWA4K+IofwvXzX2ON/Mj7aQwf5W iC+3nWC7q0uxKwwsddJ0Nu+dpA/UORQWa1NiAftEoSpk5+nUUi0WE+5DRm0H+TXKBWMGNCFn c6+EKg5zQaa8KqymHcOrSXNPmzJuXvDQ8uj2J8XuzCZfK4uy1+YdIr0yyEMI7mdh4KX50LO1 pmowEqDh7dLShTOif/7UtQYrzYq9cPnjU2ZW4qd5Qz2joSGTG9eCXLz5PRe5SqHxv6ljk8mb ApNuY7bOXO/A7T2j5RwXIlcmssqIjBcxsRRoIbpCwWWGjkYjzYCjgsNFL6rt4OL11OUF37wL QcTl7fbCGv53KfKPdYD5hcbguLKi/aCccJK18ZwNjFhqr4MliQARAQABzUVEYXZpZCBDaHJp c3RvcGhlciBIYW5zZW4gKEludGVsIFdvcmsgQWRkcmVzcykgPGRhdmUuaGFuc2VuQGludGVs LmNvbT7CwXgEEwECACIFAlQ+9J0CGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEGg1 lTBwyZKwLZUP/0dnbhDc229u2u6WtK1s1cSd9WsflGXGagkR6liJ4um3XCfYWDHvIdkHYC1t MNcVHFBwmQkawxsYvgO8kXT3SaFZe4ISfB4K4CL2qp4JO+nJdlFUbZI7cz/Td9z8nHjMcWYF IQu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09Caj 0hloj+hFoqiticNpmsxdWKoOsV0PftcQvBCCYuhKbZV9s5hjt9qn8CE86A5g5KqDf83Fxqm/ vXKgHNFHE5zgXGZnrmaf6resQzbvJHO0Fb0CcIohzrpPaL3YepcLDoCCgElGMGQjdCcSQ+Ci FCRl0Bvyj1YZUql+ZkptgGjikQARAQABwsFfBBgBAgAJBQJUY85qAhsMAAoJEGg1lTBwyZKw l4IQAIKHs/9po4spZDFyfDjunimEhVHqlUt7ggR1Hsl/tkvTSze8pI1P6dGp2XW6AnH1iayn yRcoyT0ZJ+Zmm4xAH1zqKjWplzqdb/dO28qk0bPso8+1oPO8oDhLm1+tY+cOvufXkBTm+whm +AyNTjaCRt6aSMnA/QHVGSJ8grrTJCoACVNhnXg/R0g90g8iV8Q+IBZyDkG0tBThaDdw1B2l asInUTeb9EiVfL/Zjdg5VWiF9LL7iS+9hTeVdR09vThQ/DhVbCNxVk+DtyBHsjOKifrVsYep WpRGBIAu3bK8eXtyvrw1igWTNs2wazJ71+0z2jMzbclKAyRHKU9JdN6Hkkgr2nPb561yjcB8 sIq1pFXKyO+nKy6SZYxOvHxCcjk2fkw6UmPU6/j/nQlj2lfOAgNVKuDLothIxzi8pndB8Jju KktE5HJqUUMXePkAYIxEQ0mMc8Po7tuXdejgPMwgP7x65xtfEqI0RuzbUioFltsp1jUaRwQZ MTsCeQDdjpgHsj+P2ZDeEKCbma4m6Ez/YWs4+zDm1X8uZDkZcfQlD9NldbKDJEXLIjYWo1PH hYepSffIWPyvBMBTW2W5FRjJ4vLRrJSUoEfJuPQ3vW9Y73foyo/qFoURHO48AinGPZ7PC7TF vUaNOTjKedrqHkaOcqB185ahG2had0xnFsDPlx5y In-Reply-To: <20240530084120.GA12940@system.software.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/30/24 01:41, Byungchul Park wrote: > LUF should not optimize tlb flushes for mappings that users explicitly > change e.g. through mmap() and munmap(). We are thoroughly going around in circles at this point. I'm not quite sure what to do. Ying and I see a problem that we've tried to explain a couple of times. We've tried to show the connection between a LUF-elided TLB flush and how that could affect a later munmap() or mmap(MAP_FIXED). But these responses seem to keep going back to the fact that LUF doesn't directly affect munmap(), which is true, but quite irrelevant to the problem being described. So we're at an impasse. Byungchul, perhaps you should spin another series and maybe Ying and I have to write up a test case to show the bug that we see. Or perhaps someone else can jump into the thread and bridge the communication gap.