From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97EE3340298 for ; Sat, 27 Jun 2026 13:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782567708; cv=none; b=VQSIg4IkNgjaW/6O63ZtdnuvnXgBQyTbT88XgeefoFOFRNPfkU5sIk76ZtdXwYPspeWpFDevDhjWnj0QemXa9ZxBDu6R9fQjpmvuXJ+7AbjLjaUM1syl7hRgpSb2VqSnG5zDRxHd4Gq544qY+fhLrOp0Yx9hFizuyupop/6Qlr0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782567708; c=relaxed/simple; bh=6JnPrzRcA7hou/7+sISrnCxvj9WqhGxmMe38PFGL+60=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I+8ry6X09Cw7C2La+3ZNNa8R8pK2gzJp0W8w0GDjQYsFySSN940ocQWaberFbG8MR2sLFoqyr6WuH0ACZ8n7YRNg5343DBqwwMqMQzXHncqeW0l4DXozVXjKFwtYdMZoBhL3wQwhh8Ld9NKCJPC6omrBR/l5QAddSUhCs825TJA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=at1Y7I+a; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="at1Y7I+a" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 316C235BB; Sat, 27 Jun 2026 06:41:40 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C12093F632; Sat, 27 Jun 2026 06:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1782567704; bh=6JnPrzRcA7hou/7+sISrnCxvj9WqhGxmMe38PFGL+60=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=at1Y7I+af8DowHuuB+q7l9RltrFaqIV6FTcFuGNWudFdFpHoZh8YbAxlcKM3OICdE uBFiBV0dAyTlY4/scGH4rEZbbNagbZrrQq35tpNi0rA4HYLuDR9incSHuOiUXypEpa EyiiAoxolA00H4b3svQV4O75gwTw4jBHwJu/W7Rc= Date: Sat, 27 Jun 2026 14:41:41 +0100 From: Catalin Marinas To: Breno Leitao Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, oleg@redhat.com, kernel-team@meta.com Subject: Re: [PATCH] mm/kmemleak: skip the remaining scan phases when interrupted Message-ID: References: <20260626-kmemleak_improve-v1-1-d40c7616f64f@debian.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: <20260626-kmemleak_improve-v1-1-d40c7616f64f@debian.org> On Fri, Jun 26, 2026 at 10:56:23AM -0700, Breno Leitao wrote: > kmemleak_scan() scans the per-cpu sections, the struct page ranges and > the task stacks in sequence. Each loop now bails out once scan_block() > reports the scan was interrupted, but the later phases are still entered > and only bail on their first scan_block() call. > > Jump straight to the gray list scan once a phase reports an interrupted > scan, so the remaining scan phases are not entered at all. This does not > change the scan results, it only avoids the pointless re-entry. > > Suggested-by: Oleg Nesterov > Signed-off-by: Breno Leitao Reviewed-by: Catalin Marinas