linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-mm@kvack.org, Igor Zhbanov <i.zhbanov@omprussia.ru>,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	cgroups@vger.kernel.org
Subject: Re: [PATCH 1/2] mm/memcontrol: return 1 from cgroup.memory __setup() handler
Date: Thu, 3 Mar 2022 11:14:06 +0100	[thread overview]
Message-ID: <20220303101406.GE10867@blackbody.suse.cz> (raw)
In-Reply-To: <9f8d4ddb-81ce-738a-d1f7-346ff9bf8ebd@infradead.org>

On Wed, Mar 02, 2022 at 04:53:19PM -0800, Randy Dunlap <rdunlap@infradead.org> wrote:
> I don't think those strings (even with invalid option values) should be
> added to init's environment.

Isn't mere presence of the handler sufficient to filter those out? [1]

(Counter-example would be 'foo=1 foo=2' where 1 is accepted value by the
handler, 2 is unrecognized and should be passed to init. Is this a real
use case?)

> I'm willing to add a pr_warn() or pr_notice() for any unrecognized
> option value, but it should still return 1 IMO.

Regardless of the handler existence check, I see returning 1 would be
consistent with the majority of other memcg handlers.

For the uniformity,
Reviewed-by: Michal Koutný <mkoutny@suse.com>

(Richer reporting or -EINVAL is by my understanding now a different
problem.)

Thanks,
Michal



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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  0:58 Randy Dunlap
2022-03-02 18:53 ` Michal Koutný
2022-03-03  0:53   ` Randy Dunlap
2022-03-03 10:14     ` Michal Koutný [this message]
2022-03-03 21:53       ` Randy Dunlap
2022-03-03 22:32         ` Michal Koutný
2022-03-03 22:53           ` Randy Dunlap

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=20220303101406.GE10867@blackbody.suse.cz \
    --to=mkoutny@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=i.zhbanov@omprussia.ru \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=vdavydov.dev@gmail.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