From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by kanga.kvack.org (Postfix) with ESMTP id 9CF746B0031 for ; Fri, 7 Feb 2014 12:56:45 -0500 (EST) Received: by mail-wi0-f174.google.com with SMTP id f8so1093144wiw.7 for ; Fri, 07 Feb 2014 09:56:45 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTP id g15si1856353wiw.22.2014.02.07.09.56.43 for ; Fri, 07 Feb 2014 09:56:44 -0800 (PST) Message-ID: <52F51E19.9000406@redhat.com> Date: Fri, 07 Feb 2014 12:55:37 -0500 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [patch] drop_caches: add some documentation and info message References: <1391794851-11412-1-git-send-email-hannes@cmpxchg.org> In-Reply-To: <1391794851-11412-1-git-send-email-hannes@cmpxchg.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner , Andrew Morton Cc: Dave Hansen , Michal Hocko , KOSAKI Motohiro , KAMEZAWA Hiroyuki , linux-mm@kvack.org, linux-kernel@vger.kernel.org On 02/07/2014 12:40 PM, Johannes Weiner wrote: > @@ -59,6 +60,9 @@ int drop_caches_sysctl_handler(ctl_table *table, int write, > if (ret) > return ret; > if (write) { > + printk_ratelimited(KERN_INFO "%s (%d): dropped kernel caches: %d\n", > + current->comm, task_pid_nr(current), > + sysctl_drop_caches); > if (sysctl_drop_caches & 1) > iterate_supers(drop_pagecache_sb, NULL); > if (sysctl_drop_caches & 2) > Would it be better to print this after the operation has completed? -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753299AbaBGR53 (ORCPT ); Fri, 7 Feb 2014 12:57:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52702 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751463AbaBGR51 (ORCPT ); Fri, 7 Feb 2014 12:57:27 -0500 Message-ID: <52F51E19.9000406@redhat.com> Date: Fri, 07 Feb 2014 12:55:37 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Johannes Weiner , Andrew Morton CC: Dave Hansen , Michal Hocko , KOSAKI Motohiro , KAMEZAWA Hiroyuki , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch] drop_caches: add some documentation and info message References: <1391794851-11412-1-git-send-email-hannes@cmpxchg.org> In-Reply-To: <1391794851-11412-1-git-send-email-hannes@cmpxchg.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/07/2014 12:40 PM, Johannes Weiner wrote: > @@ -59,6 +60,9 @@ int drop_caches_sysctl_handler(ctl_table *table, int write, > if (ret) > return ret; > if (write) { > + printk_ratelimited(KERN_INFO "%s (%d): dropped kernel caches: %d\n", > + current->comm, task_pid_nr(current), > + sysctl_drop_caches); > if (sysctl_drop_caches & 1) > iterate_supers(drop_pagecache_sb, NULL); > if (sysctl_drop_caches & 2) > Would it be better to print this after the operation has completed?