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 40C4222759C for ; Wed, 8 Apr 2026 06:30:00 +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=1775629800; cv=none; b=b0ir1Z3+YDg1C74YDVcga+4O7pjOKVKQwa+cTFi9gcPOmm/3+EKUo0/REWBshAlFfZs2i0Hia/3ZztER8Vt2QgVjj2L8tyfFbbVVZPDC8kju/TpcF9IRmW46QZsjg9p6UyFSC2VklWL5yvuWb4WrbXPc2cqlaOX8qpdALacul+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775629800; c=relaxed/simple; bh=ovbUEOVjJO64+CfNHS3rFZZC8A0ewJiMcBpdXhlNrS8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ih7bUOdPTJVAOIS+6RfD6b/3bO3SQJbauTUu31MTKnYz2MJT/NBPVAIBhiSo38urCqYQxi93f6StNAr5rYBdLVn+xNPQAQji3MxSLyTgFl+z986I50SC5peXLUYT97VcEoAO9ZV06Pz6THgyMhltYdAbOV6HkVJ6osAu1ZpK0MQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c9Dp0WlO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c9Dp0WlO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E8DCC19425; Wed, 8 Apr 2026 06:29:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775629799; bh=ovbUEOVjJO64+CfNHS3rFZZC8A0ewJiMcBpdXhlNrS8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c9Dp0WlO0O9Ngp1mzaFP1ikpqJfn2/KNRZpSjEil7gT7ayajSd1vQijyYAKVJLx8f KLfsDOELg0wHJKIz7fYGnwGm/1NNDjEqp1iUvNhCsakaE9KEfYm0evdvdEU9pGM/5Y GJSKQghniPmjhEnCSOVAaIRKf1VMQdeHvwzacicq+N2USAnSP3kWM9FA5siW/D2Wj3 4B+ovkrAo9hnQZHGF1yQnd5mypogkWVXvByUeqsgY3NDlknraq/sgBdjLW2fseczcg suBYcoO8pnUfObxCK6iHsZcRH9aVKzSl0I5Z0AqLB3rzZXivBNAMjxsTIsk/UsT/6E wQEq7xOHmXnlQ== Date: Wed, 8 Apr 2026 07:29:55 +0100 From: Lorenzo Stoakes To: Andrew Morton 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: References: <20260212193045556CbzCX8p9gDu73tQ2nvHEI@zte.com.cn> <02e1b8df-d568-8cbb-b8f6-46d5476d9d75@google.com> <20260405140132.3a518740c6c1d68843f44aaf@linux-foundation.org> <20260407142142.cd093ccafe62eaaadb5cf11c@linux-foundation.org> 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: <20260407142142.cd093ccafe62eaaadb5cf11c@linux-foundation.org> On Tue, Apr 07, 2026 at 02:21:42PM -0700, Andrew Morton wrote: > 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 > Yes, sure. We could possibly achieve similar by doing a quick search first then trying the broader search as suggested by Hugh? But want to make sure correctness is there! Thanks, Lorenzo