linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: jack@suse.cz, akpm@linux-foundation.org, hannes@cmpxchg.org,
	mhocko@suse.com, vdavydov.dev@gmail.com, jlayton@redhat.com,
	nborisov@suse.com, tytso@mit.edu, mawilcox@microsoft.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	mcgrof@kernel.org, keescook@chromium.org, wuqixuan@huawei.com
Subject: Re: [PATCH v4] mm: introduce validity check on vm dirtiness settings
Date: Thu, 21 Sep 2017 13:52:06 +0200	[thread overview]
Message-ID: <20170921115206.GB16731@quack2.suse.cz> (raw)
In-Reply-To: <1506002392-11907-1-git-send-email-laoar.shao@gmail.com>

On Thu 21-09-17 21:59:52, 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.
> 
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>

Looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

Just one nit below:

> +
> +    /* needn't do validity check if the value is not different. */
> +	if (ret == 0 && write && dirty_background_ratio != old_ratio) {

Whitespace before the comment is broken. Generally I don't think the
comment brings much so I'd just delete it.

								Honza

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

--
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>

  reply	other threads:[~2017-09-21 11:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 13:59 Yafang Shao
2017-09-21 11:52 ` Jan Kara [this message]
2017-09-21 23:12 Yafang Shao
2017-09-26 23:59 ` Andrew Morton
2017-09-27  1:38   ` Yafang Shao
2017-09-27  2:54     ` Andrew Morton
2017-09-27  4:14       ` Yafang Shao
2017-09-27 19:33         ` Andrew Morton
2017-09-28  1:27           ` Yafang Shao

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=20170921115206.GB16731@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jlayton@redhat.com \
    --cc=keescook@chromium.org \
    --cc=laoar.shao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mawilcox@microsoft.com \
    --cc=mcgrof@kernel.org \
    --cc=mhocko@suse.com \
    --cc=nborisov@suse.com \
    --cc=tytso@mit.edu \
    --cc=vdavydov.dev@gmail.com \
    --cc=wuqixuan@huawei.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