From: Yafang Shao <laoar.shao@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Jan Kara <jack@suse.cz>,
akpm@linux-foundation.org, Johannes Weiner <hannes@cmpxchg.org>,
vdavydov.dev@gmail.com, jlayton@redhat.com, nborisov@suse.com,
Theodore Ts'o <tytso@mit.edu>,
mawilcox@microsoft.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mm: introduce validity check on vm dirtiness settings
Date: Tue, 26 Sep 2017 19:45:45 +0800 [thread overview]
Message-ID: <CALOAHbB-H8vtGH4PE8Tr+jmvrQZc3bRXqnG9R1QBQfJKvaHP4g@mail.gmail.com> (raw)
In-Reply-To: <20170926112656.tbu7nr2lxdqt5rft@dhcp22.suse.cz>
2017-09-26 19:26 GMT+08:00 Michal Hocko <mhocko@kernel.org>:
> On Tue 26-09-17 19:06:37, Yafang Shao wrote:
>> 2017-09-26 18:25 GMT+08:00 Michal Hocko <mhocko@kernel.org>:
>> > On Wed 20-09-17 06:43:35, Yafang Shao wrote:
>> >> we can find the logic in domain_dirty_limits() that
>> >> when dirty bg_thresh is bigger than dirty thresh,
>> >> bg_thresh will be set as thresh * 1 / 2.
>> >> if (bg_thresh >= thresh)
>> >> bg_thresh = thresh / 2;
>> >>
>> >> But actually we can set vm background dirtiness bigger than
>> >> vm dirtiness successfully. This behavior may mislead us.
>> >> We'd better do this validity check at the beginning.
>> >
>> > This is an admin only interface. You can screw setting this up even
>> > when you keep consistency between the background and direct limits. In
>> > general we do not try to be clever for these knobs because we _expect_
>> > admins to do sane things. Why is this any different and why do we need
>> > to add quite some code to handle one particular corner case?
>> >
>>
>> Of course we expect admins to do the sane things, but not all admins
>> are expert or faimilar with linux kernel source code.
>> If we have to read the source code to know what is the right thing to
>> do, I don't think this is a good interface, even for the admin.
>
> Well, it is kind of natural to setup background below the direct limit
> in general so I am not sure what is so surprising here. Moreover setting
> a non default drity limits already requires some expertise. It is not
> like an arbitrary value will work just fine...
>
>> Anyway, there's no document on that direct limits should not less than
>> background limits.
>
> Then improve the documentation.
I have improved the kernel documentation as well, in order to make it
more clear for the newbies.
>> > To be honest I am not entirely sure this is worth the code and the
>> > future maintenance burden.
>> I'm not sure if this code is a burden for the future maintenance, but
>> I think that if we don't introduce this code it is a burden to the
>> admins.
>
> anytime we might need to tweak background vs direct limit we would have
> to change these checks as well and that sounds like a maint. burden to
> me.
Would pls. show me some example ?
> --
> Michal Hocko
> SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-09-26 11:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 22:43 Yafang Shao
2017-09-26 10:25 ` Michal Hocko
2017-09-26 11:06 ` Yafang Shao
2017-09-26 11:26 ` Michal Hocko
2017-09-26 11:45 ` Yafang Shao [this message]
2017-09-26 11:54 ` Michal Hocko
2017-09-26 13:33 ` Jan Kara
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=CALOAHbB-H8vtGH4PE8Tr+jmvrQZc3bRXqnG9R1QBQfJKvaHP4g@mail.gmail.com \
--to=laoar.shao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=jack@suse.cz \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mawilcox@microsoft.com \
--cc=mhocko@kernel.org \
--cc=nborisov@suse.com \
--cc=tytso@mit.edu \
--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