Re: [PATCH v4] mm: introduce validity check on vm dirtiness settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 27 Sep 2017 12:14:10 +0800 Yafang Shao <laoar.shao@xxxxxxxxx> wrote:

> 2017-09-27 10:54 GMT+08:00 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>:
> > On Wed, 27 Sep 2017 09:38:21 +0800 Yafang Shao <laoar.shao@xxxxxxxxx> wrote:
> >
> >> > And existing scripts which do not do this will cease to work correctly,
> >> > no?
> >> >
> >>
> >> The existing scritpts won't work correctly. That's also what I have
> >> worried before.
> >>
> >> But under this condition, there's a error message generated by "sysctl
> >> -w" to tell them the first setting was failure.
> >> This error message may be a reminder to them that there are some
> >> connections between background and direct limit, and should not set
> >> arbitrary.
> >> May that's better. I'm not sure.
> >
> > Maybe we can leave the logic as-is and simply print a warning when an
> > illogical state exists.
> >
> 
> You mean, just modified the  code as bellow ?
> in function  domain_dirty_limits()
> -        if (bg_thresh >= thresh)
> +     if (bg_thresh >= thresh) {
> +        pr_warn("vm direct limit should greater than background limit.\n");
>           bg_thresh = thresh / 2;
> +     }

Something like that.

> will this generate lots of log ?

Well, it's one message per write to a procfs file, when that write
causes an errant state.  Sounds manageable?  It would be nice if we
could somehow help the operator to figure out that writing in a
different order will prevent the incorrect state (and hence the
warning).

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux