From: Miaohe Lin <linmiaohe@huawei.com>
To: Mike Kravetz <mike.kravetz@oracle.com>, <akpm@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>
Subject: Re: [PATCH v2 5/5] mm/hugetlb: avoid calculating fault_mutex_hash in truncate_op case
Date: Wed, 17 Mar 2021 09:44:50 +0800 [thread overview]
Message-ID: <fb988ad4-8a1b-14ef-ed94-7658b2af8ab2@huawei.com> (raw)
In-Reply-To: <952e9130-a084-20a7-aa7c-486fe9ccc8c6@oracle.com>
On 2021/3/17 8:27, Mike Kravetz wrote:
> On 3/15/21 11:49 PM, Miaohe Lin wrote:
>> On 2021/3/16 11:07, Mike Kravetz wrote:
>>> On 3/15/21 7:27 PM, Miaohe Lin wrote:
>>>> The fault_mutex hashing overhead can be avoided in truncate_op case
>>>> because page faults can not race with truncation in this routine. So
>>>> calculate hash for fault_mutex only in !truncate_op case to save some cpu
>>>> cycles.
>>>>
>>>> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
>>>> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
>>>> Cc: Mike Kravetz <mike.kravetz@oracle.com>
>>>> ---
>>>> v1->v2:
>>>> remove unnecessary initialization for variable hash
>>>> collect Reviewed-by tag from Mike Kravetz
>>>
>>> My apologies for not replying sooner and any misunderstanding from my
>>> previous comments.
>>>
>>
>> That's all right.
>>
>>> If the compiler is going to produce a warning because the variable is
>>> not initialized, then we will need to keep the initialization.
>>> Otherwise, this will show up as a build regression. Ideally, there
>>> would be a modifier which could be used to tell the compiler the
>>> variable will used. I do not know if such a modifier exists.
>>>
>>
>> I do not know if such a modifier exists too. But maybe not all compilers are intelligent
>> enough to not produce a warning. It would be safe to keep the initialization...
>>
>>> The patch can not produce a new warning. So, if you need to initialize
>>
>> So just drop this version of the patch? Or should I send a new version with your Reviewed-by tag and
>> keep the initialization?
>>
>
> Yes, drop this version of the patch. You can add my Reviewed-by to the
> previous version that included the initialization and resend.
>
Will do. Many thanks. :)
> All the cleanup patches in this series should be good to go.
>
prev parent reply other threads:[~2021-03-17 1:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 2:27 Miaohe Lin
2021-03-16 3:07 ` Mike Kravetz
2021-03-16 6:49 ` Miaohe Lin
2021-03-17 0:27 ` Mike Kravetz
2021-03-17 1:44 ` Miaohe Lin [this message]
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=fb988ad4-8a1b-14ef-ed94-7658b2af8ab2@huawei.com \
--to=linmiaohe@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.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