From: Wei Yang <richard.weiyang@gmail.com>
To: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org,
linux-mm@kvack.org, akpm@linux-foundation.org,
liam.howlett@oracle.com, willy@infradead.org,
richard.weiyang@gmail.com
Subject: Re: [PATCH 2/2] maple_tree: refactor mas_wr_store_type()
Date: Sat, 12 Oct 2024 03:31:41 +0000 [thread overview]
Message-ID: <20241012033141.3p2ieftywbkmlw4k@master> (raw)
In-Reply-To: <20241011214451.7286-2-sidhartha.kumar@oracle.com>
On Fri, Oct 11, 2024 at 05:44:51PM -0400, Sidhartha Kumar wrote:
>In mas_wr_store_type(), we check if new_end < mt_slots[wr_mas->type]. If
>this check fails, we know that ,after this, new_end is >= mt_min_slots.
>Checking this again when we detect a wr_node_store later in the function
>is reduntant. Because this check is part of an OR statement, the statement
>will always evaluate to true, therefore we can just get rid of it.
>
>We also refactor mas_wr_store_type() to return the store type rather
>than set it directly as it greatly cleans up the function.
>
>Suggested-by: Liam Howlett <liam.howlett@oracle.com>
>Suggested-by: Wei Yang <richard.weiyang@gmail.com>
>Signed-off-by: Sidhartha <sidhartha.kumar@oracle.com>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2024-10-12 3:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 21:44 [PATCH 1/2] maple_tree: check for MA_STATE_BULK on setting wr_rebalance Sidhartha Kumar
2024-10-11 21:44 ` [PATCH 2/2] maple_tree: refactor mas_wr_store_type() Sidhartha Kumar
2024-10-12 3:31 ` Wei Yang [this message]
2024-10-15 2:04 ` Liam R. Howlett
2024-10-12 3:31 ` [PATCH 1/2] maple_tree: check for MA_STATE_BULK on setting wr_rebalance Wei Yang
2024-10-15 2:03 ` 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=20241012033141.3p2ieftywbkmlw4k@master \
--to=richard.weiyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=liam.howlett@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maple-tree@lists.infradead.org \
--cc=sidhartha.kumar@oracle.com \
--cc=willy@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