linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "zhaoyang.huang" <zhaoyang.huang@unisoc.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Zhaoyang Huang <huangzhaoyang@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	ke.wang@unisoc.com
Subject: Re: [PATCH 2/2] mm: introduce __GFP_TRACKLEAK to track in-kernel allocation
Date: Wed, 14 Sep 2022 09:26:51 +0100	[thread overview]
Message-ID: <YyGQS0Af7Vu7KPAj@casper.infradead.org> (raw)
In-Reply-To: <1663126621-26926-2-git-send-email-zhaoyang.huang@unisoc.com>

On Wed, Sep 14, 2022 at 11:37:01AM +0800, zhaoyang.huang wrote:
> ---
> v2: code update
> v3: update code and Documentation

This is really not good enough.  What changed?

The documentation is also not good enough.  It needs to mention:

 - This cannot be used for GFP_HIGHMEM allocations.
 - This cannot be used for pages which are mapped into userspace.

I also still want to see selftests.  order-0, order-N (with and without
__GFP_COMP).  What happens if you allocate an order-N page without
GFP_COMP, take an extra ref on the first page, call free_pages() and
then one of the recently-freed pages is allocated again while you still
have the reference on the first page?

I believe Andrew also suggested that 

if (PageTrackleak(page))

become always-false if the CONFIG option is disabled.

> +#ifdef CONFIG_HAVE_DEBUG_KMEMLEAK

This is the wrong CONFIG option, it should be CONFIG_DEBUG_KMEMLEAK.


Add to this the very real question of how useful is this, and I'm not
getting warm fuzzy feelings about where this patchset is heading.



  reply	other threads:[~2022-09-14  8:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  3:37 [PATCH 1/2] mm: fix logic error of page_expected_state zhaoyang.huang
2022-09-14  3:37 ` [PATCH 2/2] mm: introduce __GFP_TRACKLEAK to track in-kernel allocation zhaoyang.huang
2022-09-14  8:26   ` Matthew Wilcox [this message]
2022-09-14  4:35 ` [PATCH 1/2] mm: fix logic error of page_expected_state Zhaoyang Huang
2022-09-14  7:35 ` Matthew Wilcox
2022-09-14  8:14   ` Zhaoyang Huang
2022-09-14 10:51 ` Zhaoyang Huang
  -- strict thread matches above, loose matches on Subject: below --
2022-09-13  6:10 [PATCH 1/2] mm: fix logic error of bulkfree_pcp_prepare zhaoyang.huang
2022-09-13  6:10 ` [PATCH 2/2] mm: introduce __GFP_TRACKLEAK to track in-kernel allocation zhaoyang.huang

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=YyGQS0Af7Vu7KPAj@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=huangzhaoyang@gmail.com \
    --cc=ke.wang@unisoc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=zhaoyang.huang@unisoc.com \
    /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;
as well as URLs for NNTP newsgroup(s).