linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>
Cc: kernel@collabora.com, kernelci@groups.io,
	Will Deacon <will@kernel.org>,
	Gabriel Krisman Bertazi <krisman@collabora.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH V3] selftests: vm: Add test for Soft-Dirty PTE bit
Date: Thu, 3 Mar 2022 11:18:28 -0700	[thread overview]
Message-ID: <537c7ca4-6dde-cbb8-2c44-271acf96666d@linuxfoundation.org> (raw)
In-Reply-To: <52f17759-c7b9-c13b-2c58-f9f2656d26f6@collabora.com>

On 2/27/22 11:55 PM, Muhammad Usama Anjum wrote:
> Hi,
> 
> Andrew had already accepted the patch. I'll send an iteration.
> 
> On 2/26/22 5:35 AM, Shuah Khan wrote:
>>> +#define PAGEMAP_PATH        "/proc/self/pagemap"
>>
>> Why is this names PATH - it is the file name right?
> I'll update the names of the macros.
> 
>>> +
>>> +int clear_refs;
>>> +int pagemap;
>>> +
>>
>> Get rid of these globals and pass these in - please find name
>> that clearly indicates them as fds
>>
> I'll update their names to indicate fds. This is a standalone test
> application. Shouldn't the usage of global variables be fine?
> 

It makes it harder to maintain. Unless there is reason, avoid globals.
I am not seeing a need for globals in this case, other than convenience.

thanks,
-- Shuah


  reply	other threads:[~2022-03-03 18:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 21:23 Muhammad Usama Anjum
2022-02-26  0:35 ` Shuah Khan
2022-02-28  6:55   ` Muhammad Usama Anjum
2022-03-03 18:18     ` Shuah Khan [this message]
2022-02-28  9:37 ` David Hildenbrand
2022-03-03 18:19   ` Shuah Khan
2022-03-03 18:39     ` Gabriel Krisman Bertazi
2022-03-03 21:46       ` Shuah Khan
2022-03-04 16:14         ` Gabriel Krisman Bertazi

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=537c7ca4-6dde-cbb8-2c44-271acf96666d@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=kernel@collabora.com \
    --cc=kernelci@groups.io \
    --cc=krisman@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shuah@kernel.org \
    --cc=usama.anjum@collabora.com \
    --cc=will@kernel.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