linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Michal Hocko <mhocko@suse.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
	Dan Williams <dan.j.williams@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/hotplug: Enumerate memory range offlining failure reasons
Date: Tue, 18 Aug 2020 09:08:45 +0200	[thread overview]
Message-ID: <0005c6bb-da4c-f1f3-3c86-dc1712369281@redhat.com> (raw)
In-Reply-To: <20200818065817.GI28270@dhcp22.suse.cz>

On 18.08.20 08:58, Michal Hocko wrote:
> On Tue 18-08-20 11:58:49, Anshuman Khandual wrote:
>>
>>
>> On 08/18/2020 11:35 AM, Michal Hocko wrote:
>>> On Tue 18-08-20 09:52:02, Anshuman Khandual wrote:
>>>> Currently a debug message is printed describing the reason for memory range
>>>> offline failure. This just enumerates existing reason codes which improves
>>>> overall readability and makes it cleaner. This does not add any functional
>>>> change.
>>>
>>> Wasn't something like that posted already? To be honest I do not think
>>
>> There was a similar one regarding bad page reason.
>>
>> https://patchwork.kernel.org/patch/11464713/
>>
>>> this is worth the additional LOC. We are talking about few strings used
>>> at a single place. I really do not see any simplification, constants are
>>> sometimes even longer than the strings they are describing.
>>
>> I am still trying to understand why enumerating all potential offline
>> failure reasons in a single place (i.e via enum) is not a better idea
>> than strings scattered across the function. Besides being cleaner, it
>> classifies, organizes and provide a structure to the set of reasons.
>> It is not just about string replacement with constants.
> 
> This is a matter of taste. I would agree that using constants to
> reference standardized messages is a good idea but all these reasons
> are just an ad-hoc messages that we want to print more or less as a
> debugging output. So all the additional LOC don't really seem worth it.
> 

Agreed, it's not like they are scattered over multiple functions. I
don't see any real advantage here that justify 37 insertions(+), 9
deletions(-).

-- 
Thanks,

David / dhildenb


      reply	other threads:[~2020-08-18  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18  4:22 [PATCH] mm/hotplug: Enumerate memory range offlining failure reasons Anshuman Khandual
2020-08-18  6:05 ` Michal Hocko
2020-08-18  6:28   ` Anshuman Khandual
2020-08-18  6:58     ` Michal Hocko
2020-08-18  7:08       ` David Hildenbrand [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=0005c6bb-da4c-f1f3-3c86-dc1712369281@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.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;
as well as URLs for NNTP newsgroup(s).