[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y5moxP0l4j8z/GG9@arm.com>
Date: Wed, 14 Dec 2022 10:43:16 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: Waiman Long <longman@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Muchun Song <songmuchun@...edance.com>
Subject: Re: [PATCH 1/2] mm/kmemleak: Simplify kmemleak_cond_resched() usage
On Sat, Dec 10, 2022 at 06:00:47PM -0500, Waiman Long wrote:
> The presence of a pinned argument and the 64k loop count make
> kmemleak_cond_resched() a bit more complex to read. The pinned argument
> is used only by first kmemleak_scan() loop.
>
> Simplify the usage of kmemleak_cond_resched() by removing the pinned
> argument and always do a get_object()/put_object() sequence. In
> addition, the 64k loop is removed by using need_resched() to decide if
> kmemleak_cond_resched() should be called.
Not sure why we ended up with the 'pinned' argument, get/put_object()
can be nested.
Reviewed-by: Catalin Marinas <catalin.marinas@....com>
Powered by blists - more mailing lists