mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	mptcp@lists.linux.dev, Mat Martineau <martineau@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>, Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Eric Biggers <ebiggers@kernel.org>,
	Christoph Paasch <cpaasch@openai.com>,
	Gang Yan <yangang@kylinos.cn>
Subject: Re: [PATCH net-next 0/6] mptcp: misc. features for v6.18
Date: Tue, 2 Sep 2025 23:38:31 +0200 (GMT+02:00)	[thread overview]
Message-ID: <739c86b1-5cf5-4525-919f-1ca13683b77f@kernel.org> (raw)
In-Reply-To: <aLdfOrQ4O4rnD5M9@arm.com>

2 Sept 2025 23:18:56 Catalin Marinas <catalin.marinas@arm.com>:

> On Tue, Sep 02, 2025 at 08:50:19PM +0200, Matthieu Baerts wrote:
>> Hi Catalin,
>>
>> 2 Sept 2025 20:25:19 Catalin Marinas <catalin.marinas@arm.com>:
>>
>>> On Tue, Sep 02, 2025 at 08:27:59AM -0700, Jakub Kicinski wrote:
>>>> On Tue, 2 Sep 2025 16:51:47 +0200 Matthieu Baerts wrote:
>>>>> It is unclear why a second scan is needed and only the second one caught
>>>>> something. Was it the same with the strange issues you mentioned in
>>>>> driver tests? Do you think I should re-add the second scan + cat?
>>>>
>>>> Not sure, cc: Catalin, from experience it seems like second scan often
>>>> surfaces issues the first scan missed.
>>>
>>> It's some of the kmemleak heuristics to reduce false positives. It does
>>> a checksum of the object during scanning and only reports a leak if the
>>> checksum is the same in two consecutive scans.
>>
>> Thank you for the explanation!
>>
>> Does that mean a scan should be triggered at the end of the tests,
>> then wait 5 second for the grace period, then trigger another scan
>> and check the results?
>>
>> Or wait 5 seconds, then trigger two consecutive scans?
>
> The 5 seconds is the minimum age of an object before it gets reported as
> a leak. It's not related to the scanning process. So you could do two
> scans in succession and wait 5 seconds before checking for leaks.
>
> However, I'd go with the first option - do a scan, wait 5 seconds and do
> another. That's mostly because at the end of the scan kmemleak prints if
> it found new unreferenced objects. It might not print the message if a
> leaked object is younger than 5 seconds. In practice, though, the scan
> may take longer, depending on how loaded your system is.
>
> The second option works as well but waiting between them has a better
> chance of removing false positives if, say, some objects are moved
> between lists and two consecutive scans do not detect the list_head
> change (and update the object's checksum).

Thank you for this very nice reply, that's very clear!

I will then adapt our CI having CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF
to do a manual scan at the very end, wait 5 seconds and do another.

Cheers,
Matt


  reply	other threads:[~2025-09-02 21:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01  9:39 Matthieu Baerts (NGI0)
2025-09-01  9:39 ` [PATCH net-next 1/6] mptcp: use HMAC-SHA256 library instead of open-coded HMAC Matthieu Baerts (NGI0)
2025-09-01  9:39 ` [PATCH net-next 2/6] mptcp: make ADD_ADDR retransmission timeout adaptive Matthieu Baerts (NGI0)
2025-09-01  9:39 ` [PATCH net-next 3/6] selftests: mptcp: remove add_addr_timeout settings Matthieu Baerts (NGI0)
2025-09-01  9:39 ` [PATCH net-next 4/6] selftests: mptcp: add checks for fallback counters Matthieu Baerts (NGI0)
2025-09-01  9:39 ` [PATCH net-next 5/6] net: Add rfs_needed() helper Matthieu Baerts (NGI0)
2025-09-01  9:39 ` [PATCH net-next 6/6] mptcp: record subflows in RPS table Matthieu Baerts (NGI0)
2025-09-02 14:26 ` [PATCH net-next 0/6] mptcp: misc. features for v6.18 Jakub Kicinski
2025-09-02 14:51   ` Matthieu Baerts
2025-09-02 15:27     ` Jakub Kicinski
2025-09-02 18:25       ` Catalin Marinas
2025-09-02 18:50         ` Matthieu Baerts
2025-09-02 21:18           ` Catalin Marinas
2025-09-02 21:38             ` Matthieu Baerts [this message]
2025-09-02 22:21               ` Christoph Paasch
2025-09-02 14:29 ` Matthieu Baerts
2025-09-02 19:09   ` Jakub Kicinski
2025-09-02 19:25     ` Matthieu Baerts
2025-09-02 20:53       ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=739c86b1-5cf5-4525-919f-1ca13683b77f@kernel.org \
    --to=matttbe@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=cpaasch@openai.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@kernel.org \
    --cc=edumazet@google.com \
    --cc=geliang@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=yangang@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®