Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754820Ab3HEHUT (ORCPT ); Mon, 5 Aug 2013 03:20:19 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40760 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752112Ab3HEHUR (ORCPT ); Mon, 5 Aug 2013 03:20:17 -0400 Date: Mon, 5 Aug 2013 09:20:13 +0200 From: Michal Hocko To: KOSAKI Motohiro Cc: Andrew Morton , "linux-mm@kvack.org" , LKML , dave.hansen@intel.com, KAMEZAWA Hiroyuki , bp@suse.de, Dave Hansen Subject: Re: [PATCH resend] drop_caches: add some documentation and info message Message-ID: <20130805072013.GA10146@dhcp22.suse.cz> References: <1374842669-22844-1-git-send-email-mhocko@suse.cz> <20130729135743.c04224fb5d8e64b2730d8263@linux-foundation.org> <51F9D1F6.4080001@jp.fujitsu.com> <20130731201708.efa5ae87.akpm@linux-foundation.org> <20130802073304.GA17746@dhcp22.suse.cz> <51FD653A.3060004@jp.fujitsu.com> <20130804080751.GA24005@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2651 Lines: 57 On Sun 04-08-13 21:13:44, KOSAKI Motohiro wrote: > On Sun, Aug 4, 2013 at 4:07 AM, Michal Hocko wrote: > > On Sat 03-08-13 16:16:58, KOSAKI Motohiro wrote: > >> >>> You missed the "!". I'm proposing that setting the new bit 2 will > >> >>> permit people to prevent the new printk if it is causing them problems. > >> >> > >> >> No I don't. I'm sure almost all abuse users think our usage is correct. Then, > >> >> I can imagine all crazy applications start to use this flag eventually. > >> > > >> > I guess we do not care about those. If somebody wants to shoot his feet > >> > then we cannot do much about it. The primary motivation was to find out > >> > those that think this is right and they are willing to change the setup > >> > once they know this is not the right way to do things. > >> > > >> > I think that giving a way to suppress the warning is a good step. Log > >> > level might be to coarse and sysctl would be an overkill. > >> > >> When Dave Hansen reported this issue originally, he explained a lot of userland > >> developer misuse /proc/drop_caches because they don't understand what > >> drop_caches do. > >> So, if they never understand the fact, why can we trust them? I have no > >> idea. > > > > Well, most of that usage I have come across was legacy scripts which > > happened to work at a certain point in time because we sucked. > > Thinks have changed but such scripts happen to survive a long time. > > We are primarily interested in those. > > Well, if the main target is shell script, task_comm and pid don't help us > a lot. I suggest to add ppid too. I do not have any objections to add ppid. > >> Or, if you have different motivation w/ Dave, please let me know it. > > > > We have seen reports where users complained about performance drop down > > when in fact the real culprit turned out to be such a clever script > > which dropped caches on the background thinking it will help to free > > some memory. Such cases are tedious to reveal. > > Imagine such script have bit-2 and no logging output. Because > the script author think "we are doing the right thing". > Why distro guys want such suppress messages? I am not really pushing this suppressing functionality. I just understand that there might be some legitimate use for supressing and if that is a must for merging the printk, I can live with that. [...] -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/