linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Haifeng Xu <haifeng.xu@shopee.com>
Cc: hannes@cmpxchg.org, shakeelb@google.com, muchun.song@linux.dev,
	akpm@linux-foundation.org, cgroups@vger.kernel.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/memcg: Skip high limit check in root memcg
Date: Tue, 21 Feb 2023 16:21:17 +0100	[thread overview]
Message-ID: <Y/ThbQNqrdny4+Pf@dhcp22.suse.cz> (raw)
In-Reply-To: <99bdfbec-2de4-b432-9649-09557d3f95d6@shopee.com>

On Tue 21-02-23 22:21:45, Haifeng Xu wrote:
[...]
> >> The test result show that with or without the patch, the time taken is almost the same.
> > 
> > This is in line with my expectation. So the question is whether the
> > additional check is really worth it. 
> 
> This patch doesn't bring any obvious benifit or harm, but the high
> limit check in root memcg seems a little weird.  Maybe we can add this
> check

Well, I do not see the code to look weird TBH. There is nothing wrong in
doing the check for the root memcg. It is a bit pointless but it is not
incorrect.

> It all depends on your viewpoint.

From my POV, I prefer changes that either fix something (correctness
issue or a performance issue/improvement) or improve readbility. The
check doesn't fix anything and I am not convinced about an improved
readabilit either.

Thanks for the patch anyway!
-- 
Michal Hocko
SUSE Labs


      reply	other threads:[~2023-02-21 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10  9:45 Haifeng Xu
2023-02-14 15:56 ` Michal Hocko
2023-02-21 10:29   ` Haifeng Xu
2023-02-21 12:20     ` Michal Hocko
2023-02-21 14:21       ` Haifeng Xu
2023-02-21 15:21         ` Michal Hocko [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=Y/ThbQNqrdny4+Pf@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=haifeng.xu@shopee.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=shakeelb@google.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