Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2368010rdb; Mon, 25 Dec 2023 07:42:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHC4TqOEVIsZpL4VqOdVg93ni2QHslJD0yeXAFGCCuxC+2YUm7fn5RWaE2tujFYAbdUPsBm X-Received: by 2002:a05:6e02:1647:b0:360:9d1:4d5c with SMTP id v7-20020a056e02164700b0036009d14d5cmr497484ilu.53.1703518970217; Mon, 25 Dec 2023 07:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703518970; cv=none; d=google.com; s=arc-20160816; b=Hxb7a9DgchEWdi4h6SL+DH9b23QpzONNUgFudfKw4d7td9F30ES9zl8hkQK3vOmDyK 6rQuusI/eIzM7T4MqygA28nGxJstZVe6p9KZc8eg4UyjYz6bkjtzFZV7eKFM67w0hlYO FFLLgBdJpQb5429P5j6gASLTYNzhITtsT4T/lsUikVqPZZh1Zs1VTT2TVxm14O7GMRla FmjM2TtFmmstsPtzIy1c0slH6mW5sROvz3V7Xk96gpSjQ6G7cyJD2d1ANIr064JLJvcD dn1D82BuDaILS+D9D7Q91HUWxg+JrZSvzKUYZU2JkoL9uN2JFo8FjTgPbXy0Duu/Eayz pPGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yfsKP9bIoO8NvpKIkLPbcIhRdzO+flqkLdSJDquLXy8=; fh=/eB6HUzNSvYx2dAvYlLKzOh2LpypuaMCQ6+511R8GRs=; b=C3U+2ZZlQdYUlx7JMWoKGycpfYBXZBFIXmkfac9n8YThcZ1T6bF6VI17mmQoLZZ+LZ 534eTRwHUCwzObk07adVTLGNcisYp5PQwmHCkbGP6HeKPVG65Q+BHniIASAXyEGFYXGO /Od6D37Y6+fkY1XPGAZDl5omwXDZ7pYhRhYPULUkujiAX+6G2u71LHlM+pz75J9SF/37 wwuVykg0cueMJSCLsw8+ZLJrPmRPhTxlsQhJaOZcGmo/Dk1t8KbhhIK+bSPScFlybiC1 TVtUVN0S6neTU0/aEx9hd2dbgaaYc0mvPc5o2Fhqpr8p0vL0xCf+zCYt7S52OIsqJCS+ yDDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ArDZfHgm; spf=pass (google.com: domain of linux-kernel+bounces-11113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11113-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d1-20020a170902854100b001cc2c4fdbecsi7662141plo.649.2023.12.25.07.42.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 07:42:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ArDZfHgm; spf=pass (google.com: domain of linux-kernel+bounces-11113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11113-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 51E6F281F0C for ; Mon, 25 Dec 2023 15:42:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B78052F6E; Mon, 25 Dec 2023 15:42:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ArDZfHgm" X-Original-To: linux-kernel@vger.kernel.org Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 4FC5E52F61 for ; Mon, 25 Dec 2023 15:42:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=yfsKP9bIoO8NvpKIkLPbcIhRdzO+flqkLdSJDquLXy8=; b=ArDZfHgm9NpwhpmuBY0DyuZTCr WXWDp+yexk2QHiIYRKXyILgsMsnGit+sw+bIMtRbyxEuoUv49jtE9FI8HTlMcXOLx+QVMzSA/eYrb IvILvCEvaIYoS1NV5qR25qWofarizrqOydBNUAoLQkoMZ1T2AXJsk4tApgNxIaQFjboNLLNi6APj8 PMBB60TdoW7qDQHpy5ptZsaF3T+eQXILKoJkkeZxSGt//3KNplRhujzEsEsjDqTESXOdfsKZed4xm EHo6GtVpwG5JXbDSNc0bfpYZ/DEQLo56+zdt2b96rjfDJeAyrt8WCDdos+FZCOCIHG3pYr72Hehu5 jRA+h5lw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rHn5o-00GDb6-6W; Mon, 25 Dec 2023 15:42:12 +0000 Date: Mon, 25 Dec 2023 15:42:12 +0000 From: Matthew Wilcox To: Yu Zhao Cc: Kairui Song , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, Suren Baghdasaryan Subject: Re: [PATCH 3/3] mm, lru_gen: try to prefetch next page when canning LRU Message-ID: References: <20231222102255.56993-1-ryncsn@gmail.com> <20231222102255.56993-4-ryncsn@gmail.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Sun, Dec 24, 2023 at 11:41:31PM -0700, Yu Zhao wrote: > On Fri, Dec 22, 2023 at 3:24 AM Kairui Song wrote: > > > > From: Kairui Song > > > > Prefetch for inactive/active LRU have been long exiting, apply the same > > optimization for MGLRU. > > I seriously doubt that prefetch helps in this case. > > Willy, any thoughts on this? Thanks. It _might_ ... highly depends on microarchitecture. My experience is that it offers more benefit on AMD than on Intel, but that experience is several generations out of date and it may just not be applicable to modern AMD. It's probably more effective on ARM Cortex A cores than on ARM Cortex X cores ... maybe we can get someone from Android (Suren?) to do some testing?