linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Jiazi Li <jqqlijiazi@gmail.com>,
	linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org
Subject: Re: [PATCH 1/2] maple_tree: fix alloc node fail issue
Date: Fri, 11 Oct 2024 01:09:45 +0000	[thread overview]
Message-ID: <20241011010945.usgu7kqjdzimrwo3@master> (raw)
In-Reply-To: <20240626160631.3636515-1-Liam.Howlett@oracle.com>

On Wed, Jun 26, 2024 at 12:06:30PM -0400, Liam R. Howlett wrote:
>From: Jiazi Li <jqqlijiazi@gmail.com>
>
>In the following code, the second call to the mas_node_count will
>return -ENOMEM:
>
>	mas_node_count(mas, MAPLE_ALLOC_SLOTS + 1);
>	mas_node_count(mas, MAPLE_ALLOC_SLOTS * 2 + 2);
>
>This is because there may be some full maple_alloc node in current
>maple state. Use full maple_alloc node will make max_req equal to 0.
>And it leads to mt_alloc_bulk return 0.
>As a result, mas_node_count set mas.node to MA_ERROR(-ENOMEM).
>
>Find a non-full maple_alloc node, and if necessary, use this non-full
>node in the next while loop.
>
>Fixes: 54a611b60590 ("Maple Tree: add new data structure")
>Suggested-by: Liam R. Howlett <Liam.Howlett@oracle.com>
>Signed-off-by: Jiazi Li <jqqlijiazi@gmail.com>
>Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>

Reviewed-by: Wei Yang <richard.weiyang@gmail.com>


This looks good to me.

I don't see it is in the master. Not sure this is missed.

-- 
Wei Yang
Help you, Help me


  parent reply	other threads:[~2024-10-11  1:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 16:06 Liam R. Howlett
2024-06-26 16:06 ` [PATCH 2/2] maple_tree: Add some alloc node test case Liam R. Howlett
2024-10-11  1:17   ` Wei Yang
2024-10-15  1:15     ` Liam R. Howlett
2024-10-15 13:31       ` Wei Yang
2024-10-15 13:52         ` Liam R. Howlett
2024-10-11  1:09 ` Wei Yang [this message]
2024-10-15  1:17 ` [PATCH 1/2] maple_tree: fix alloc node fail issue Liam R. Howlett

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=20241011010945.usgu7kqjdzimrwo3@master \
    --to=richard.weiyang@gmail.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jqqlijiazi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.org \
    /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