From: Mike Kravetz <mike.kravetz@oracle.com>
To: Matthew Wilcox <willy@infradead.org>, Nghia Le <nghialm78@gmail.com>
Cc: akpm@linux-foundation.org, nathan@kernel.org,
ndesaulniers@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
lukas.bulwahn@gmail.com, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mm/hugetlb.c: remove dead store in demote_size_show()
Date: Sun, 3 Oct 2021 19:36:54 -0700 [thread overview]
Message-ID: <ccee8f63-f5dd-6231-5625-a67ad3b80a6d@oracle.com> (raw)
In-Reply-To: <YVm2MHbhEU0b7HPM@casper.infradead.org>
On 10/3/21 6:54 AM, Matthew Wilcox wrote:
> On Sun, Oct 03, 2021 at 06:41:13PM +0700, Nghia Le wrote:
>> {
>> struct hstate *h;
>> - unsigned long demote_size;
>> int nid;
>>
>> h = kobj_to_hstate(kobj, &nid);
>> - demote_size = h->demote_order;
>>
>> return sysfs_emit(buf, "%lukB\n",
>> (unsigned long)(PAGE_SIZE << h->demote_order) / SZ_1K);
>
> I'd suggest this function would look better written as:
>
> int nid;
> struct hstate *h = kobj_to_hstate(kobj, &nid);
> unsigned long demote_size = (PAGE_SIZE << h->demote_order) / SZ_1K;
>
> return sysfs_emit(buf, "%lukB\n", demote_size);
>
Thank you Nghia Le for spotting this, and thank you Matthew for the
suggestion.
This is still just in Andrew's tree and subject to modification before
the next merge window. I am still expecting additional comments on the
series.
If another version of the series is needed, I will include Matthew's
suggestion. If not, I will ask Andrew how he would prefer to fold in
the changes.
--
Mike Kravetz
next prev parent reply other threads:[~2021-10-04 2:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-03 11:41 Nghia Le
2021-10-03 13:54 ` Matthew Wilcox
2021-10-04 2:36 ` Mike Kravetz [this message]
2021-10-04 3:44 ` Nghia Le
2021-10-04 22:46 ` Mike Kravetz
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=ccee8f63-f5dd-6231-5625-a67ad3b80a6d@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=lukas.bulwahn@gmail.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nghialm78@gmail.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