Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1836179lqb; Sun, 26 May 2024 21:26:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUimrtvXp3Fd4LtH7LwFQdZr70wpZ9Ce4ehNx2//7cncroP8NcoG53TGmn3qdzBU+bHxWnePQxo5MJ3K5PPXhDAlNk8sZv4LY1/heSIUQ== X-Google-Smtp-Source: AGHT+IFVLDriDMlzZY1byfbpwHU42I2PDQQffgbaS/xSwKHT4v3ae69NVTqdW5tcrGiky8u0Lorx X-Received: by 2002:a17:907:7703:b0:a5a:63bf:5175 with SMTP id a640c23a62f3a-a626407d42cmr541250366b.10.1716783968980; Sun, 26 May 2024 21:26:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716783968; cv=pass; d=google.com; s=arc-20160816; b=YlrD8z23hlmd8IiK0MNESomnHMMdVy6YLbq4dXTWmVHW0hmAXBQ+EGf0+hLQkYFpRv +cbm3A9C3DBGkfhgbglvsAjWHov3m6w3/SwL1dLJFkqREb3Z/g3UJiEEQYfJKhHWzU7k RKxkMfPT1O2jiGkIsE/OCaHRN26mUMyjt74VlqyKOrvSlu4bXmtnSWiWWohFVJMbcz6j PGQYcxLwDpBd+JatyLjcTa37gvhw5QG7v70J3e/egneeJXAMohGZQxm8K5rgkA8WGVVt BGyhH57sUCfVlZK4qKbZRoiJG8SqObaCpTBiroSMso0dpZfLr76gAFkEsctAaJrgpp1v zQXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=l6oCOXvLOJALUWMbpjYp310y2Y8p1SALGMH3zUJQMnE=; fh=+ruaI8I0sb53dVSbOx5iQFXGLxMfqVefVJBOLMvHBB0=; b=xU9QHWbJL/Ol2eFb41ZETRr3zdHVSF6siMs6ck8OwmsKA1RBM6qt43aVAjvnRshtto DpmC5nhAvWihlXpnYlOnuinDHwn6WAh/QZ/b5MOFBA8w8pKynd2zP0j+RwPtgWFIvCk/ buXTZF014oNPuTiCfYqvUAlCZFGvCfsGcChQ50HziebCMlIfMQD5Z8Xtvk8QoMhJdZSv HxMRaKOxpTBtz9PmvOrLPnXG0w1tvKfEDk9n3vUZlP6rHSbFRdtfdSchQlUynIeEA/zs r1ffBfdkvlhZ/r9Xudff5i6V1kyIlQS8Fj5/fzIzaQAtCOV6GlsKmcL/zXjoR3fPdkOp uFgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-190013-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190013-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cdd034esi336409866b.962.2024.05.26.21.26.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 21:26:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190013-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-190013-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190013-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id B5C681F22727 for ; Mon, 27 May 2024 04:26:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71CC8C121; Mon, 27 May 2024 04:26:01 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 326B57464 for ; Mon, 27 May 2024 04:25:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716783961; cv=none; b=RIPHA1RbjMv+u+VK/t3ymnPwboxrvl0uZU36TpC21132axMHKM0/Y/8O445BdMDbSJFPIn8yyr3s/lOVcU/NC7EeT9Jq4yIyE0+OnRMMYjiD6hlB9q1kpQd6yvFS/v9qLQHz5EZtjFwDqq4XDshNiE8l/Jj15dtifR6Q1em1Hz4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716783961; c=relaxed/simple; bh=2nkS9YJqi2q5hg2fjuiqBzOlQ+eCe7Zt5pjG4NGCcfw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UjYLnx4FlwbuxltpbsfbZC8qaERw8/RJt1TqxYMIINF1i6yAYJy5HsM0qX3KCGcdQCRKLJW9rHgUGeVNvdzs0qBER4sGakVwCXpMuajSoSIdDOoj29lWlaFuSxmUG8r/1R9UWGI28j2R1MO0WQCZ49JrfJCwU1Mxoo8ott3SfPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d6dff70000001748-3b-66540b51522c Date: Mon, 27 May 2024 13:25:48 +0900 From: Byungchul Park To: Dave Hansen Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel_team@skhynix.com, akpm@linux-foundation.org, ying.huang@intel.com, 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 Subject: Re: [PATCH v10 00/12] LUF(Lazy Unmap Flush) reducing tlb numbers over 90% Message-ID: <20240527042548.GD12937@system.software.com> References: <20240510065206.76078-1-byungchul@sk.com> <982317c0-7faa-45f0-82a1-29978c3c9f4d@intel.com> <20240527015732.GA61604@system.software.com> <20240527034614.GA12937@system.software.com> <20240527041946.GC12937@system.software.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240527041946.GC12937@system.software.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIIsWRmVeSWpSXmKPExsXC9ZZnkW4gd0iawa5zZhZz1q9hs/i84R+b xaeXDxgtXmxoZ7T4uv4Xs8XTT30sFpd3zWGzuLfmP6vF+V1rWS12LN3HZHHpwAImi+O9B5gs 5t/7zGaxedNUZovjU6YyWvz+AVR8ctZkFgdBj++tfSweO2fdZfdYsKnUY/MKLY/Fe14yeWxa 1cnmsenTJHaPd+fOsXucmPGbxWPeyUCP9/uusnls/WXn0Tj1GpvH501yAXxRXDYpqTmZZalF +nYJXBnLbk9gLrjOW9Gz+wJbA+M2ri5GTg4JAROJ1S86mbsYOcDspg86IGEWAVWJc/OOMoPY bALqEjdu/ASzRYDsUyuXs3cxcnEwC/xnkrj/sBUsISwQIjHtwxomEJtXwELi+O2frCBFQgIr mCRmte1mg0gISpyc+YQFxGYW0JK48e8lE8hiZgFpieX/OEBMTgFLiXufpEAq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UoP76oNCe1+BCjNAeL kjivV3hqgpBAemJJanZqakFqEUyWiYNTqoFxeqQLe5bQzdvqVXPNJm2dLD/rQcfbG/PePHhR 0/vpXanBMoG/T+R9V0XnPzOZJLNz3bXeI+GBU+fvfNRoN/m97Wcv9U3ZKSd285tzv/raNffl hccMJnd+lZspn5D6PL2q6eK6/tQuM0NP3hO9Gf7brvodv2Hr8kGqQ4/zS/vqE0JMftVWUk/U lFiKMxINtZiLihMB9x5nwqsCAAA= X-CFilter-Loop: Reflected On Mon, May 27, 2024 at 01:19:46PM +0900, Byungchul Park wrote: > On Mon, May 27, 2024 at 12:46:14PM +0900, Byungchul Park wrote: > > On Sun, May 26, 2024 at 07:43:10PM -0700, Dave Hansen wrote: > > > On 5/26/24 18:57, Byungchul Park wrote: > > > ... > > > > Plus, I will add another give-up at code changing the permission of vma > > > > to writable. > > > > > > I suspect you have a much more general problem on your hands. Just > > > tweaking the VFS or mmap() code likely isn't going to cut it. > > What a stupid idiot I am. > > I already discuss the exact cases with Nadav Amit at the very beginning > around v1. I didn't remember it when I was answering to you. > > mmap() or changing the permission by user already performs TLB flush > needed within that code, which LUF never touch. > > Worth noting currently LUF touchs only unmapping during migration or > reclaim. Other updating mapping would perform TLB flush it needs, as is. > I guess updating page cache is also already perform TLB flush needed. This may not be the case tho.. I might need to work on page cache. Byungchul > I need to check it. Probably, it would already do. > > Byungchul > > > LUF is interested in limited folios that are migratable or reclaimable > > in lru for now. So, IMHO, fixing a few things is going to cut it. > > > > > I guess we'll see what you come up with next, but this email was really > > > just the result of Vlastimil and I chatting on IRC for five minutes > > > about this set. > > > > > > It has absolutely not been tested nor reviewed enough. I hope the > > > performance gains stick around once more of the bugs are gone. > > > > Sure. It should be. > > > > Byungchul