linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Miaohe Lin <linmiaohe@huawei.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: Tue, 16 Mar 2021 17:27:45 -0700	[thread overview]
Message-ID: <952e9130-a084-20a7-aa7c-486fe9ccc8c6@oracle.com> (raw)
In-Reply-To: <4b3e9ea6-69e3-493c-342e-92117f274e06@huawei.com>

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.

All the cleanup patches in this series should be good to go.
-- 
Mike Kravetz


  reply	other threads:[~2021-03-17  0:28 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 [this message]
2021-03-17  1:44       ` Miaohe Lin

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=952e9130-a084-20a7-aa7c-486fe9ccc8c6@oracle.com \
    --to=mike.kravetz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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