From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1BCAF29E11D for ; Tue, 7 Apr 2026 21:21:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775596904; cv=none; b=AM+eiQIPjtVuD/wEZtnhZFGQ3LIM8HVdvOSpCMUQ46f67cCLFDpYZ3auS1jGqP+TIYJK2cxQKGfUxAsRk2bk5ZIVZG5pJiPmTksrJHLe6HN3ngNdyrcOxJYBbmKAiUW+pe0jcT0jlHcY+Rd/5nC++spjPVLXxInuOE7kU+67Rbc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775596904; c=relaxed/simple; bh=flRlnuqB+MkUrPTOekHdwaceWpK62RG0kNmM4HTgjUk=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=F2aipfU3p5YF68VGaO7ZIjeiMdkSrdOMDV1zAZkqTgCrZStkmRdsGwCHf6jRGyt1NJotUJV9qoRPJyncdD+gqnaPxkAfohVDf819qCG3CeJUgFj9aKwcfpiUszzaAXP77XOO2GxlJDaKDlqRAJhsXhnPoNooxBs8ZS4Qr996YXY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=lMRg/l/X; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="lMRg/l/X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59B7FC116C6; Tue, 7 Apr 2026 21:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1775596903; bh=flRlnuqB+MkUrPTOekHdwaceWpK62RG0kNmM4HTgjUk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lMRg/l/X13Y/iSRcAsT5Zn/Sofzb4N6k2MmNKq+nd7Ut6VdDFbMXMeGxT58R0LG8o o8fhkG9PzUzRy/PvjOJspXVchGGJCKj8uUD7oCmXpuMeg2Rl/P6xUYGBJtHF0UwnrR Xi4S5YT1SorcgV+cGeps/so/PTTNxLb2XUqf4kEk= Date: Tue, 7 Apr 2026 14:21:42 -0700 From: Andrew Morton To: "Lorenzo Stoakes (Oracle)" Cc: Hugh Dickins , xu.xin16@zte.com.cn, david@kernel.org, chengming.zhou@linux.dev, wang.yaxin@zte.com.cn, yang.yang29@zte.com.cn, Michel Lespinasse , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] ksm: Optimize rmap_walk_ksm by passing a suitable address range Message-Id: <20260407142142.cd093ccafe62eaaadb5cf11c@linux-foundation.org> In-Reply-To: References: <20260212193045556CbzCX8p9gDu73tQ2nvHEI@zte.com.cn> <02e1b8df-d568-8cbb-b8f6-46d5476d9d75@google.com> <20260405140132.3a518740c6c1d68843f44aaf@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Tue, 7 Apr 2026 10:43:12 +0100 "Lorenzo Stoakes (Oracle)" wrote: > > Thanks, Hugh. Administreevia: > > > > I've removed this patch from the mm-stable branch and I reworked its > > [1/2] "ksm: initialize the addr only once in rmap_walk_ksm" to be > > presented as a singleton patch. > > > > For now I've restaged this patch ("ksm: optimize rmap_walk_ksm by > > passing a suitable address range") at the tail of the mm-unstable > > branch and I'll enter wait-and-see mode. > > > > Given we're at -rc7 now, I think we should delay this patch until 7.2, unless > I'm much mistaken wrt Hugh's concerns. > > I'm concerned this is a subtle way of breaking things so we really want to be > confident. > > We should also bundle up the test at > https://lore.kernel.org/all/20260407140805858ViqJKFhfmYSfq0FynsaEY@zte.com.cn/ > with this patch (should we find it's ok) as a separate series. > > Really overall I think safest to yank until 7.2 honestly. OK. But let's not lose sight of those potential efficiency gains: Time_ms Nr_iteration_total Skip_addr_out_of_range Skip_mm_mismatch Before: 228.65 22169 22168 0 After : 0.396 3 0 2