From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f198.google.com (mail-io0-f198.google.com [209.85.223.198]) by kanga.kvack.org (Postfix) with ESMTP id A9BF36B0038 for ; Wed, 27 Sep 2017 21:27:13 -0400 (EDT) Received: by mail-io0-f198.google.com with SMTP id g32so357383ioj.0 for ; Wed, 27 Sep 2017 18:27:13 -0700 (PDT) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id j143sor305473itb.118.2017.09.27.18.27.12 for (Google Transport Security); Wed, 27 Sep 2017 18:27:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20170927123330.90dadc97988326b3c594db00@linux-foundation.org> References: <1506035552-13010-1-git-send-email-laoar.shao@gmail.com> <20170926165949.77e27aea0b92a226e7905060@linux-foundation.org> <20170926195409.0867d13620e1219ca6676821@linux-foundation.org> <20170927123330.90dadc97988326b3c594db00@linux-foundation.org> From: Yafang Shao Date: Thu, 28 Sep 2017 09:27:11 +0800 Message-ID: Subject: Re: [PATCH v4] mm: introduce validity check on vm dirtiness settings Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: linux-mm@kvack.org Got it. I will submit a new patch then. Thanks Yafang 2017-09-28 3:33 GMT+08:00 Andrew Morton : > On Wed, 27 Sep 2017 12:14:10 +0800 Yafang Shao wrote: > >> 2017-09-27 10:54 GMT+08:00 Andrew Morton : >> > On Wed, 27 Sep 2017 09:38:21 +0800 Yafang Shao 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@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org